.gitlab-ci.yml 3.54 KB
Newer Older
1 2
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'

3
variables:
4
    GIT_SUBMODULE_STRATEGY: normal
5
    BUNDLE: "nautilus-dev.flatpak"
6

7
stages:
8
    - triage
9
    - test
10
    - cross_environment
11
    - deploy
12 13 14

.test_template: &distro_test
  script:
15 16 17
      - meson _build .
      - cd _build
      - ninja test
18

19 20
.flatpak_gcovr:
    extends: .flatpak
21
    after_script:
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
        # Generate coverage report
        - cd _build
        - flatpak build ../app gcovr
            --html-details
            -o coverage.html
            --print-summary
            --root=.
            --exclude=src/
            --exclude=../data/
            --exclude=../eel/check-program.c
            --exclude=../eel/eel-debug.c
            --exclude=../eel/eel-lib-self-check-functions.c
            --exclude=../eel/eel-self-checks.c
            --exclude=../src/animation/
            --exclude=../src/gtk/
            --exclude=../src/nautilus-lib-self-check-functions.c
            --exclude=../src/nautilus-self-check-functions.c
            --exclude=../subprojects/libgd/
            --exclude=../test/
    coverage: '/^branches:.*\s+(\S+\%).*$/'
42
    artifacts:
43 44
        when: 'always'
        # overwrite the path array of the '.flatpak' job
45
        paths:
46 47 48 49 50
            - "${BUNDLE}"
            - '_build/meson-logs/meson-log.txt'
            - '_build/meson-logs/testlog.txt'
            - '_build/coverage.html'
        expire_in: 2 days
51 52

flatpak devel:
53
    image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.32
54 55 56
    stage: test
    variables:
        MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.yml"
57
        MESON_ARGS: "-Dprofile=Devel -Dtests=all"
58 59
        FLATPAK_MODULE: "nautilus"
        RUNTIME_REPO: "https://sdk.gnome.org/gnome.flatpakrepo"
60
        APP_ID: "org.gnome.NautilusDevel"
61
    extends: '.flatpak'
62 63 64 65

review:
    stage: deploy
    dependencies:
66 67
        - 'flatpak devel'
    extends: '.review'
68 69 70

stop_review:
    stage: deploy
71
    extends: '.stop_review'
72

73
fedora rawhide:
74
    image: fedora:rawhide
75
    stage: cross_environment
76
    before_script:
77 78 79
        - dnf update -y --nogpgcheck
        - dnf install -y 'dnf-command(builddep)' redhat-rpm-config libseccomp-devel gcovr --nogpgcheck
        - dnf builddep -y nautilus --nogpgcheck
80
    <<: *distro_test
81
    only:
82 83 84
        - schedules
        - web
        - tags
85

86
flatpak master:
87
    stage: cross_environment
88
    variables:
89
        MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusMaster.yml"
90
        MESON_ARGS: "-Dprofile=Devel -Dtests=all -Db_coverage=true"
91
        FLATPAK_MODULE: "nautilus"
92
        RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
93
        APP_ID: "org.gnome.NautilusDevel"
94
    extends: .flatpak
95 96 97 98
    only:
        - schedules
        - web
        - tags
99 100 101

pages:
  stage: deploy
Jordan Petridis's avatar
Jordan Petridis committed
102 103
  dependencies:
    - 'flatpak devel'
104 105
  script:
    - mkdir public
106
    - mv _build/coverage.html ${CI_PROJECT_DIR}/public/index.html
107 108 109
  artifacts:
    paths:
      - public
110

111
  only:
112
    - master
113 114 115 116 117
  except:
    variables:
      # Don't run for translation commits
      - $CI_COMMIT_TITLE =~ /^Update.*translation$/

118 119

triage:
120
  image: ruby:2.4
121 122 123
  stage: triage
  script:
    - gem install gitlab-triage
124
    - gitlab-triage --token $TRIAGE_BOT_TOKEN --project-id $CI_PROJECT_PATH --host-url https://gitlab.gnome.org
125 126 127 128
  only:
    - schedules

triage:dry-run:
129
  image: ruby:2.4
130 131 132
  stage: triage
  script:
    - gem install gitlab-triage
133
    - gitlab-triage --dry-run --token $TRIAGE_BOT_TOKEN --project-id $CI_PROJECT_PATH --host-url https://gitlab.gnome.org
134 135
  only:
    - schedules
136
  when: manual