nautilus/.gitlab-ci.yml
2018-08-10 20:23:00 +03:00

118 lines
3.5 KiB
YAML

variables:
GIT_SUBMODULE_STRATEGY: normal
BUNDLE: "nautilus-dev.flatpak"
stages:
- test
- cross_environment
- deploy
.test_template: &distro_test
script:
- meson _build .
- cd _build
- ninja test
flatpak:
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
stage: test
variables:
MANIFEST_PATH: "build-aux/flatpak/org.gnome.NautilusGtk4.yml"
MESON_ARGS: "-Dprofile=Devel -Dtests=all"
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
APP_ID: "org.gnome.NautilusGtk4"
before_script:
- tar -xzf cache.tar.gz .flatpak-builder/cache/ || true
script:
- flatpak-builder --keep-build-dirs --repo=repo app ${MANIFEST_PATH}
- xvfb-run -a -s "-screen 0 1024x768x24" flatpak-builder --run app ${MANIFEST_PATH} meson test -C /run/build/nautilus/_flatpak_build
- flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID}
after_script:
- tar -czf cache.tar.gz .flatpak-builder/cache/
artifacts:
paths:
- ${BUNDLE}
- ".flatpak-builder/build/nautilus/_flatpak_build/meson-logs/"
when: always
expire_in: 30 days
cache:
paths:
- cache.tar.gz
review:
stage: deploy
dependencies:
- flatpak
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
fedora:rawhide:
image: fedora:rawhide
stage: cross_environment
before_script:
- dnf install -y 'dnf-command(builddep)' redhat-rpm-config libseccomp-devel
- dnf builddep -y nautilus
<<: *distro_test
only:
- schedules
- web
- tags
ubuntu:devel:
image: ubuntu:devel
stage: cross_environment
before_script:
# Ubuntu requires running update to fetch metadata and find packges
- apt-get update
- apt-get install -y gcc meson gettext itstool git libgtk-3-dev
libgnome-autoar-0-dev
gobject-introspection libxml2-dev
libtracker-control-2.0-dev desktop-file-utils libgexiv2-dev
libtracker-sparql-2.0-dev
libgirepository1.0-dev gsettings-desktop-schemas-dev
libseccomp-dev
<<: *distro_test
only:
- schedules
- web
- tags
opensuse:tumbleweed:
image: opensuse:tumbleweed
stage: cross_environment
before_script:
- zypper install -y gcc meson gettext-runtime gettext-tools itstool git
gtk3-devel gnome-autoar-devel
gobject-introspection-devel libxml2-devel tracker-devel
desktop-file-utils libgexiv2-devel gsettings-desktop-schemas-devel
libseccomp-devel
<<: *distro_test
only:
- schedules
- web
- tags