mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-08-25 10:45:41 +00:00
CI: Use the new citemplate repo wiht include:
This is a new gitlab feature which allows to import a file from somewhere else with predefined config and jobs. This helps us centralize the configuration of the flatpak jobs and keep them in sync easily. [1] https://docs.gitlab.com/ce/ci/yaml/README.html#include
This commit is contained in:
parent
19d141764a
commit
6720009d26
|
@ -1,3 +1,5 @@
|
|||
include: 'https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml'
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: normal
|
||||
BUNDLE: "nautilus-dev.flatpak"
|
||||
|
@ -14,39 +16,8 @@ stages:
|
|||
- cd _build
|
||||
- ninja test
|
||||
|
||||
.flatpak_template: &flatpak
|
||||
script:
|
||||
- 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
|
||||
- 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 isn’t initialized, preventing
|
||||
# annoying warnings that don’t 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}
|
||||
artifacts:
|
||||
paths:
|
||||
- ${BUNDLE}
|
||||
- _build/meson-logs/
|
||||
# The Flatpak bundle is always generated at the end, meaning that there
|
||||
# won’t 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_gcovr_template: &flatpak_gcovr
|
||||
extends: .flatpak_template
|
||||
.flatpak_gcovr:
|
||||
extends: .flatpak
|
||||
after_script:
|
||||
# Generate coverage report
|
||||
- cd _build
|
||||
|
@ -69,8 +40,14 @@ stages:
|
|||
--exclude=../test/
|
||||
coverage: '/^branches:.*\s+(\S+\%).*$/'
|
||||
artifacts:
|
||||
when: 'always'
|
||||
# overwrite the path array of the '.flatpak' job
|
||||
paths:
|
||||
- _build/coverage.html
|
||||
- "${BUNDLE}"
|
||||
- '_build/meson-logs/meson-log.txt'
|
||||
- '_build/meson-logs/testlog.txt'
|
||||
- '_build/coverage.html'
|
||||
expire_in: 2 days
|
||||
|
||||
flatpak devel:
|
||||
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:3.30
|
||||
|
@ -80,38 +57,18 @@ flatpak devel:
|
|||
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_gcovr
|
||||
APP_ID: "org.gnome.NautilusDevel"
|
||||
extends: '.flatpak_gcovr'
|
||||
|
||||
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
|
||||
- 'flatpak devel'
|
||||
extends: '.review'
|
||||
|
||||
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
|
||||
extends: '.stop_review'
|
||||
|
||||
fedora rawhide:
|
||||
image: fedora:rawhide
|
||||
|
@ -186,30 +143,28 @@ opensuse tumbleweed:
|
|||
- tags
|
||||
|
||||
flatpak master:
|
||||
image: registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master
|
||||
stage: cross_environment
|
||||
variables:
|
||||
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"
|
||||
DBUS_ID: "org.gnome.NautilusMaster"
|
||||
<<: *flatpak
|
||||
APP_ID: "org.gnome.NautilusMaster"
|
||||
extends: .flatpak
|
||||
only:
|
||||
- schedules
|
||||
- web
|
||||
- tags
|
||||
|
||||
flatpak gtk4:
|
||||
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"
|
||||
FLATPAK_MODULE: "nautilus"
|
||||
RUNTIME_REPO: "https://sdk.gnome.org/gnome-nightly.flatpakrepo"
|
||||
DBUS_ID: "org.gnome.NautilusGtk4"
|
||||
<<: *flatpak
|
||||
APP_ID: "org.gnome.NautilusGtk4"
|
||||
extends: .flatpak
|
||||
only:
|
||||
- schedules
|
||||
- web
|
||||
|
@ -242,4 +197,4 @@ triage:dry-run:
|
|||
- gitlab-triage --dry-run --token $nautilus_bot_token --project-id $CI_PROJECT_PATH --host-url https://gitlab.gnome/org
|
||||
only:
|
||||
- schedules
|
||||
when: manual
|
||||
when: manual
|
||||
|
|
Loading…
Reference in a new issue