ci: Build and publish system extensions

This commit is contained in:
Martin Abente Lahaye 2024-06-21 14:21:42 -04:00
parent 710ac8b356
commit f47ddeddac
2 changed files with 47 additions and 0 deletions

View file

@ -1,5 +1,6 @@
include:
- remote: 'https://gitlab.gnome.org/GNOME/citemplates/raw/HEAD/flatpak/flatpak_ci_initiative.yml'
- remote: 'https://gitlab.gnome.org/tchx84/citemplates/raw/sysext/sysext/sysext_ci_initiative.yml'
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/057b052e682d8e5a20c1eb2dd60d5b87d2b56856/templates/fedora.yml'
- remote: 'https://gitlab.freedesktop.org/freedesktop/ci-templates/-/raw/bc70242ffb8402243e934659ecc1a2d1c89eca2b/templates/ci-fairy.yml'
- project: 'Infrastructure/openshift-images/gnome-release-service'
@ -250,6 +251,18 @@ test-coverity:
paths:
- coverity
sysext:
stage: build
variables:
SYSEXT_MESON_OPTIONS:
--werror
--fatal-meson-warnings
-Dextensions_app=false
-Dextensions-tool:bash_completion=disabled
before_script:
- .gitlab-ci/install-sysext-dependencies.sh
extends: .sysext.meson-build
flatpak:
stage: build
needs: ["check_commit_log"]

View file

@ -0,0 +1,34 @@
#!/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.
if [ -z ${SYSEXT_DEST_DIR+x} ]; then
echo "SYSEXT_DEST_DIR is not defined"
exit 1
fi
# 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-sysext-dependencies.sh
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: