diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41161caef..beb5e4217 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,6 +4,15 @@ include: - remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bc70242ffb8402243e934659ecc1a2d1c89eca2b/templates/ci-fairy.yml' - project: 'Infrastructure/openshift-images/gnome-release-service' file: '/ci-templates/release-module.yml' + - component: gitlab.gnome.org/GNOME/citemplates/gnomeos-build-sysext@1.0.0-alpha + inputs: + meson-options: + -Dextensions_app=false + -Dextensions-tool:bash_completion=disabled + +build-sysext: + before_script: + - .gitlab-ci/install-gnomeos-sysext-dependencies.sh $CI_PROJECT_DIR/extension stages: - pre_review diff --git a/.gitlab-ci/install-gnomeos-sysext-dependencies.sh b/.gitlab-ci/install-gnomeos-sysext-dependencies.sh new file mode 100755 index 000000000..66858004c --- /dev/null +++ b/.gitlab-ci/install-gnomeos-sysext-dependencies.sh @@ -0,0 +1,31 @@ +#!/bin/bash +# +# This script ensures that all dependencies required to build and run +# a GNOME Shell system extension are present in: +# +# The building environment, by installing these dependencies to the container. +# The running environment, by bundling these dependencies with the extension. +# + +set -e + +# Install dependencies to $SYSEXT_DEST_DIR to bundle these with the extension. + +SYSEXT_DEST_DIR="$(realpath $1)" + +# Ensure that we're building against (and bundling) the right mutter branch +# and its dependencies: + +SCRIPT_DIR="$(dirname $0)" + +$SCRIPT_DIR/checkout-mutter.sh +./mutter/.gitlab-ci/install-gnomeos-sysext-dependencies.sh $SYSEXT_DEST_DIR + +meson setup mutter/build mutter --prefix=/usr --libdir="lib/$(gcc -print-multiarch)" +meson compile -C mutter/build +meson install -C mutter/build --destdir $SYSEXT_DEST_DIR + +sudo meson install -C mutter/build + +# Ensure that any other dependency missing in GNOME OS is installed and bundled +# here as it was done with mutter: