summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
blob: 26c724b8ab8cf5df581b74d58b662a3738178acc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'

cache:
  paths:
    - _ccache/

variables:
  BUNDLE: 'epiphany-git.flatpak'
  MANIFEST_PATH: 'org.gnome.Epiphany.json'
  RUNTIME_REPO: 'https://nightly.gnome.org/gnome-nightly.flatpakrepo'
  FLATPAK_MODULE: 'epiphany'
  APP_ID: 'org.gnome.Epiphany.Devel'

stages:
  - test

check-code-style:
  stage: .pre
  image: alpine:latest
  interruptible: true
  before_script:
    - apk update && apk add uncrustify bash python3
  script:
    - bash data/check-code-style

flatpak:
  extends: '.flatpak'
  variables:
    CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled --werror'
  except:
    - master

flatpak master:
  extends: '.flatpak'
  variables:
    CONFIG_OPTS: '-Dtech_preview=true -Dprofile=Devel'
  only:
    - master

flatpak scanbuild:
  extends: '.flatpak'
  variables:
    CONFIG_OPTS: '-Dprofile=Devel -Dunit_tests=enabled --werror'
  script:
    - flatpak-builder --user --disable-rofiles-fuse --stop-at=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH}
    - flatpak build flatpak_app meson --prefix=/app ${CONFIG_OPTS} _build
    - flatpak build flatpak_app ninja -C _build scan-build
    - bash -c 'if [[ -n "$(ls -A _build/meson-logs/scanbuild/)" ]]; then echo "Scan build log found, assuming defects exist"; exit 1; fi'
  artifacts:
    when: on_failure
    paths:
      - _build/meson-logs/scanbuild

nightly:
  extends: '.publish_nightly'
  stage: .post
  dependencies: ['flatpak master']