diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 247eefa..3369251 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -68,3 +68,62 @@ check-po: # in this case - cd po/ - intltool-update -m 2>&1 | grep -qs '/.*\.c' && { intltool-update -m; exit 1; } || exit 0 + +# For some reason including https://gitlab.gnome.org/GNOME/citemplates/raw/master/flatpak/flatpak_ci_initiative.yml fails, therefore it's copied here +.flatpak: + image: 'registry.gitlab.gnome.org/gnome/gnome-runtime-images/gnome:master' + stage: 'test' + interruptible: true + tags: + - flatpak + script: + - rewrite-flatpak-manifest ${MANIFEST_PATH} ${FLATPAK_MODULE} ${CONFIG_OPTS} + - flatpak-builder --user --disable-rofiles-fuse flatpak_app --repo=repo ${BRANCH:+--default-branch=$BRANCH} ${MANIFEST_PATH} + # Generate a Flatpak bundle + - flatpak build-bundle repo ${BUNDLE} --runtime-repo=${RUNTIME_REPO} ${APP_ID} ${BRANCH} + - tar cf repo.tar repo/ + + # Run automatic tests inside the Flatpak env + # we need to recreate the build directory because cleanup would have deleted build dependencies + - rm -rf flatpak_app + - flatpak-builder --user --disable-rofiles-fuse --build-only flatpak_app ${MANIFEST_PATH} + - flatpak build-finish --socket=x11 --share=network flatpak_app + - > + xvfb-run -a -s "-screen 0 1024x768x24" + flatpak-builder --user --disable-rofiles-fuse --build-shell=${FLATPAK_MODULE} flatpak_app ${MANIFEST_PATH} <