nautilus/.gitlab-ci.yml

221 lines
6.5 KiB
YAML
Raw Normal View History

variables:
2018-05-04 08:42:41 +00:00
GIT_SUBMODULE_STRATEGY: normal
BUNDLE: "nautilus-dev.flatpak"
stages:
2018-05-04 08:42:41 +00:00
- test
- cross_environment
- deploy
.test_template: &distro_test
script:
2018-05-04 08:42:41 +00:00
- meson _build .
- cd _build
- ninja test
.flatpak_template: &flatpak
script:
2018-05-04 08:42:41 +00:00
- flatpak-builder --stop-at=${FLATPAK_MODULE} app ${MANIFEST_PATH}
# Make sure to keep this in sync with the Flatpak manifest, all arguments
# are passed except the config-args because we build it ourselves
- flatpak build app meson --prefix=/app --libdir=lib ${MESON_ARGS} _build
2018-05-04 08:42:41 +00:00
- flatpak build app ninja -C _build install
- flatpak-builder --finish-only --repo=repo app ${MANIFEST_PATH}
# Run automatic tests inside the Flatpak env
# Setting LANG to avoid Tracker complaining and falling back to the same value,
# and setting NO_AT_BRIDGE, so that atk-bridge isnt initialized, preventing
# annoying warnings that dont affect the kinds of tests that we run.
- |
xvfb-run -a -s "-screen 0 1024x768x24" \
flatpak build \
--env=LANG=C.UTF-8 \
--env=NO_AT_BRIDGE=1 \
app \
dbus-run-session meson test -C _build
# Generate a Flatpak bundle
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${DBUS_ID}
# 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+\%).*$/'
artifacts:
paths:
2018-05-04 08:42:41 +00:00
- ${BUNDLE}
- _build/meson-logs/
- _build/coverage.html
2018-10-06 17:49:27 +00:00
# The Flatpak bundle is always generated at the end, meaning that there
# wont be one in case of failure, but the logs will be available for
# our expert investigators to dissect.
when: always
expire_in: 2 days
flatpak devel:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.30
stage: test
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.Nautilus.yml"
MESON_ARGS: "-Dprofile=Devel -Dtests=all -Db_coverage=true"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome.flatpakrepo"
DBUS_ID: "org.gnome.NautilusDevel"
<<: *flatpak
review:
stage: deploy
dependencies:
- "flatpak devel"
script:
- echo "Generating flatpak deployment"
artifacts:
paths:
- ${BUNDLE}
expire_in: 30 days
environment:
name: review/$CI_COMMIT_REF_NAME
url: https://gitlab.gnome.org/$CI_PROJECT_PATH/-/jobs/$CI_JOB_ID/artifacts/raw/${BUNDLE}
on_stop: stop_review
except:
- master@GNOME/nautilus
- tags
stop_review:
stage: deploy
script:
- echo "Stopping flatpak deployment"
when: manual
environment:
name: review/$CI_COMMIT_REF_NAME
action: stop
except:
- master@GNOME/nautilus
- tags
2018-10-09 11:04:03 +00:00
fedora rawhide:
image: fedora:rawhide
stage: cross_environment
2018-03-19 23:06:54 +00:00
before_script:
- dnf update -y --nogpgcheck
- dnf install -y 'dnf-command(builddep)' redhat-rpm-config libseccomp-devel gcovr --nogpgcheck
- dnf builddep -y nautilus --nogpgcheck
<<: *distro_test
only:
2018-05-04 08:42:41 +00:00
- schedules
- web
- tags
2018-10-09 11:04:03 +00:00
ubuntu devel:
image: ubuntu:devel
stage: cross_environment
2018-10-09 11:04:03 +00:00
variables:
DEPENDENCIES: |
git
gcc
meson
gettext
itstool
gobject-introspection
desktop-file-utils
libxml2-dev
libgtk-3-dev
libgexiv2-dev
libseccomp-dev
libgnome-autoar-0-dev
libgirepository1.0-dev
libtracker-sparql-2.0-dev
libtracker-control-2.0-dev
gsettings-desktop-schemas-dev
before_script:
2018-05-04 08:42:41 +00:00
# Ubuntu requires running update to fetch metadata and find packges
- apt-get update
2018-10-09 11:04:03 +00:00
- apt-get install -y $DEPENDENCIES
<<: *distro_test
only:
2018-05-04 08:42:41 +00:00
- schedules
- web
- tags
2018-10-09 11:04:03 +00:00
opensuse tumbleweed:
image: opensuse:tumbleweed
stage: cross_environment
2018-10-09 11:04:03 +00:00
variables:
DEPENDENCIES: |
git
gcc
meson
itstool
gtk3-devel
gettext-tools
libxml2-devel
tracker-devel
libgexiv2-devel
gettext-runtime
gnome-autoar-devel
desktop-file-utils
gobject-introspection-devel
gsettings-desktop-schemas-devel
libseccomp-devel
before_script:
2018-10-09 11:04:03 +00:00
- zypper install -y $DEPENDENCIES
<<: *distro_test
only:
2018-05-04 08:42:41 +00:00
- schedules
- web
- tags
flatpak master:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
stage: cross_environment
variables:
2018-07-14 09:35:25 +00:00
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusMaster.yml"
MESON_ARGS: "-Dprofile=Master -Dtests=all -Db_coverage=true"
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
2018-07-14 09:35:25 +00:00
DBUS_ID: "org.gnome.NautilusMaster"
<<: *flatpak
2018-07-14 09:35:25 +00:00
only:
- schedules
- web
- tags
flatpak gtk4:
2018-07-14 09:35:25 +00:00
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
stage: cross_environment
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusGtk4.yml"
MESON_ARGS: "-Dprofile=Gtk4 -Dtests=all -Db_coverage=true"
2018-07-14 09:35:25 +00:00
FLATPAK_MODULE: "nautilus"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
DBUS_ID: "org.gnome.NautilusGtk4"
<<: *flatpak
only:
- schedules
- web
- tags
pages:
stage: deploy
script:
- mkdir public
- mv _build/coverage.html ${CI_PROJECT_DIR}/public/index.html
artifacts:
paths:
- public
only:
- master