nautilus/.gitlab-ci.yml
2018-03-18 15:43:24 +02:00

96 lines
3.4 KiB
YAML

variables:
GIT_SUBMODULE_STRATEGY: normal
stages:
- test
- cross_distro
flatpak:master:
image: flatpak/flatpak-builder:gnome-3-28
stage: test
script:
# This should be removed once the base image works with git submodules
- dnf install -y git
- flatpak-builder --stop-at=nautilus app build-aux/flatpak/org.gnome.Nautilus.json
- flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json meson --prefix=/app --libdir=/app/lib _build
- flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json ninja -C _build install
- flatpak-builder --finish-only app build-aux/flatpak/org.gnome.Nautilus.json
- flatpak build-export repo app
# Make a Flatpak Nautilus bundle for people to test
- flatpak build-bundle repo nautilus-dev.flatpak org.gnome.Nautilus
# Run automatic tests inside the Flatpak env
- flatpak-builder --run app build-aux/flatpak/org.gnome.Nautilus.json ninja -C _build test
artifacts:
paths:
- nautilus-dev.flatpak
expire_in: 2 days
artifacts:
when: on_failure
paths:
- .flatpak-builder/build/nautilus/_flatpak_build/meson-logs/meson-log.txt
- .flatpak-builder/build/nautilus/_flatpak_build/meson-logs/testslog.txt
# 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
ubuntu:devel:
image: ubuntu:devel
stage: cross_distro
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
- meson _build .
- cd _build
- ninja test
only:
- schedules
opensuse:tumbleweed:
image: opensuse:tumbleweed
stage: cross_distro
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
- meson _build .
- cd _build
- ninja test
only:
- schedules