.gitlab-ci.yml 3.58 KB
Newer Older
1 2
variables:
  GIT_SUBMODULE_STRATEGY: normal
3 4

stages:
5 6 7 8
- test
- cross_distro

.test_template: &distro_test
Carlos Soriano 's avatar
Carlos Soriano committed
9
  script:
10
    - meson _build .
11 12
    - cd _build
    - ninja test
13 14 15 16 17

flatpak:master:
    image: flatpak/flatpak-builder:gnome-3-28
    stage: test
    script:
18
    - flatpak-builder --stop-at=nautilus app build-aux/flatpak/org.gnome.Nautilus.json
19 20
    # Make sure to keep this in sync with the Flatpak manifest, all arguments
    # are passed except the config-args because we build it ourselves
21 22 23
    - flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json meson --prefix=/app --libdir=/app/lib -Dprofile=stable-flatpak _build
    - flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json ninja -C _build install
    - flatpak-builder --finish-only --repo=repo app build-aux/flatpak/org.gnome.Nautilus.json
24
    # Make a Flatpak Nautilus bundle for people to test
25
    - flatpak build-bundle repo --runtime-repo=https://sdk.gnome.org/gnome.flatpakrepo nautilus-dev.flatpak org.gnome.NautilusStableFlatpak 3.28
26
    # Run automatic tests inside the Flatpak env
27
    - flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json ninja -C _build test
28 29
    artifacts:
        paths:
30
        - nautilus-dev.flatpak
31
        - _build/meson-logs/meson-log.txt
32
        - _build/meson-logs/testlog.txt
33
        expire_in: 2 days
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104
    cache:
        paths:
        - .flatpak-builder/cache

# Pick any distro to build the coverage
fedora:rawhide:
    image: fedora:rawhide
    stage: cross_distro
    script:
    - dnf install -y 'dnf-command(builddep)' redhat-rpm-config gcovr
    # Waiting for gcovr 3.5 to be released.
    - pip install git+https://github.com/gcovr/gcovr.git
    - dnf builddep -y nautilus
    - meson _build . -Db_coverage=true
    # Coverage data contains paths relative to the build directory,
    # so changing to it makes writing filter expressions easier.
    #
    # _build/src/ contains generated sources, so that is filtered out as well.
    - cd _build
    - ninja test
    - gcovr --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: '/^TOTAL.*\s+(\d+\%)$/'
    only:
    - schedules
    - web
    - tags

ubuntu:devel:
    image: ubuntu:devel
    stage: cross_distro
    before_script:
    # Ubuntu requires running update to fetch metadata and find packges
    - apt update
    - apt install -y gcc meson gettext itstool git libgtk-3-dev
                     libgnome-autoar-0-dev libgnome-desktop-3-dev
                     gobject-introspection libxml2-dev
                     libtracker-control-2.0-dev desktop-file-utils libgexiv2-dev
                     libgail-3-dev libtracker-sparql-2.0-dev
                     libgirepository1.0-dev
    <<: *distro_test
    only:
    - schedules
    - web
    - tags

opensuse:tumbleweed:
    image: opensuse:tumbleweed
    stage: cross_distro
    before_script:
    - zypper install -y gcc meson gettext-runtime gettext-tools itstool git
                        gtk3-devel gnome-autoar-devel libgnome-desktop-3-devel
                        gobject-introspection-devel libxml2-devel tracker-devel
                        desktop-file-utils libgexiv2-devel
    <<: *distro_test
    only:
    - schedules
    - web
    - tags