Add ci release machinery

This commit is contained in:
Matthias Clasen 2025-01-24 14:28:42 -05:00
parent 7bb02b5c93
commit 8a3b0d7208
2 changed files with 26 additions and 7 deletions

View File

@ -1,6 +1,15 @@
include:
- project: 'gnome/citemplates'
file: 'flatpak/flatpak_ci_initiative.yml'
- component: gitlab.gnome.org/GNOME/citemplates/release-service@master
inputs:
dist-job-name: "fedora-distcheck"
tarball-artifact-path: "_build/meson-dist/${CI_PROJECT_NAME}+-${CI_COMMIT_TAG}.tar.xz"
stages: stages:
- build - build
- docs - docs
- deploy
cache: cache:
paths: paths:
@ -10,16 +19,23 @@ fedora-distcheck:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3 image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3
variables: variables:
DO_DISTCHECK: "yes" DO_DISTCHECK: "yes"
when: manual when: always
stage: build stage: build
script: script:
- git config --global --add safe.directory $CI_PROJECT_DIR
- bash -x ./.gitlab-ci/test-docker-meson.sh - bash -x ./.gitlab-ci/test-docker-meson.sh
artifacts:
when: always
name: "gtk3-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- "_build/meson-dist"
fedora-meson: fedora-meson:
image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3 image: registry.gitlab.gnome.org/gnome/gtk/fedora-gtk3:v3
stage: build stage: build
variables: variables:
EXTRA_MESON_FLAGS: "-Ddefault_library=both" EXTRA_MESON_FLAGS: "-Ddefault_library=both"
DO_TEST: "yes"
script: script:
- bash -x ./.gitlab-ci/test-docker-meson.sh - bash -x ./.gitlab-ci/test-docker-meson.sh
artifacts: artifacts:
@ -34,6 +50,7 @@ debian-meson:
stage: build stage: build
variables: variables:
EXTRA_MESON_FLAGS: "-Ddefault_library=both" EXTRA_MESON_FLAGS: "-Ddefault_library=both"
DO_TEST: "yes"
script: script:
- bash -x ./.gitlab-ci/test-docker-meson.sh - bash -x ./.gitlab-ci/test-docker-meson.sh
artifacts: artifacts:

View File

@ -22,9 +22,10 @@ meson \
cd _build cd _build
ninja ninja
# Meson < 0.57 can't exclude suites in a test_setup() so we have to if [ -n "${DO_TEST-}" ]; then
# explicitly leave out the failing and flaky suites. # Meson < 0.57 can't exclude suites in a test_setup() so we have to
xvfb-run -a -s "-screen 0 1024x768x24" \ # explicitly leave out the failing and flaky suites.
xvfb-run -a -s "-screen 0 1024x768x24" \
meson test \ meson test \
--timeout-multiplier 4 \ --timeout-multiplier 4 \
--print-errorlogs \ --print-errorlogs \
@ -32,15 +33,16 @@ xvfb-run -a -s "-screen 0 1024x768x24" \
--no-suite=flaky \ --no-suite=flaky \
--no-suite=failing --no-suite=failing
# We run the flaky and failing tests to get them reported in the CI logs, # We run the flaky and failing tests to get them reported in the CI logs,
# but if they fail (which we expect they often will), that isn't an error. # but if they fail (which we expect they often will), that isn't an error.
xvfb-run -a -s "-screen 0 1024x768x24" \ xvfb-run -a -s "-screen 0 1024x768x24" \
meson test \ meson test \
--timeout-multiplier 4 \ --timeout-multiplier 4 \
--print-errorlogs \ --print-errorlogs \
--suite=flaky \ --suite=flaky \
--suite=failing \ --suite=failing \
|| true || true
fi
if [ -n "${DO_DISTCHECK-}" ]; then if [ -n "${DO_DISTCHECK-}" ]; then
meson dist --no-tests meson dist --no-tests