[gtk/ci-jobs: 2/2] ci: Refactor the CI pipeline
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/ci-jobs: 2/2] ci: Refactor the CI pipeline
- Date: Wed, 29 Jan 2020 09:41:35 +0000 (UTC)
commit 9ebbaaf931dc337d73c656ae7ab3768ca0e42b4d
Author: Emmanuele Bassi <ebassi gnome org>
Date: Wed Jan 29 10:35:10 2020 +0100
ci: Refactor the CI pipeline
We should have a single job for building both static and shared
versions of GTK. On the other hand, having a separate job for the
release build would be a plus.
Additionally, we shouldn't use an opaque script to build GTK; the only
step in the process that requires hand-holding is running the tests
suites under Xvfb, and having the build options visible from the YAML
file gives us a better idea of what kind of build we're running.
.gitlab-ci.yml | 46 +++++++++++++++++++++++++++++++++++++++++-----
.gitlab-ci/run-tests.sh | 11 +++++++++++
2 files changed, 52 insertions(+), 5 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2c3b35b62e..e1ea6ceb9c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -12,11 +12,38 @@ stages:
- subprojects/libepoxy/
- subprojects/pango/
-fedora-x86_64: &fedora-x86_64-defaults
+# Common variables
+variables:
+ COMMON_MESON_FLAGS: "--fatal-meson-warnings --werror"
+ MESON_TEST_TIMEOUT_MULTIPLIER: 2
+ G_MESSAGES_DEBUG: all
+
+fedora-x86_64:
image: registry.gitlab.gnome.org/gnome/gtk/master:v10
stage: build
+ variables:
+ EXTRA_MESON_FLAGS: "--buildtype=debug --default-library=both"
script:
- - bash -x ./.gitlab-ci/test-docker.sh
+ - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS}
+ -Dx11-backend=true
+ -Dwayland-backend=true
+ -Dbroadway-backend=true
+ -Dvulkan=true
+ -Dprofiler=true
+ _build
+ - ninja -C _build
+ - .gitlab-ci/run-tests.sh _build
+ - .gitlab-ci/meson-junit-report.py
+ --project-name=gtk
+ --job-id="${CI_JOB_NAME}"
+ --output=_build/report.xml
+ _build/meson-logs/testlog.json
+ - .gitlab-ci/meson-html-report.py
+ --project-name=gtk
+ --job-id="${CI_JOB_NAME}"
+ --reftest-output-dir="_build/testsuite/reftests/output"
+ --output=_build/report.html
+ _build/meson-logs/testlog.json
artifacts:
when: always
reports:
@@ -34,10 +61,19 @@ fedora-x86_64: &fedora-x86_64-defaults
key: "$CI_JOB_NAME"
<<: *cache-paths
-fedora-x86_64-staticlibs:
+fedora-x86_64-release:
+ image: registry.gitlab.gnome.org/gnome/gtk/master:v10
+ stage: build
variables:
- EXTRA_MESON_FLAGS: "-Ddefault_library=both"
- <<: *fedora-x86_64-defaults
+ EXTRA_MESON_FLAGS: "--buildtype=release"
+ script:
+ - meson ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS}
+ -Dx11-backend=true
+ -Dwayland-backend=true
+ -Dbroadway-backend=true
+ -Dvulkan=true
+ _build
+ - ninja -C _build
.mingw-defaults: &mingw-defaults
stage: build
diff --git a/.gitlab-ci/run-tests.sh b/.gitlab-ci/run-tests.sh
new file mode 100755
index 0000000000..ad3a4a7491
--- /dev/null
+++ b/.gitlab-ci/run-tests.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+set -e
+
+builddir=$1
+
+cd ${builddir}
+xvfb-run -a -s "-screen 0 1024x768x24" \
+ meson test --print-errorlogs \
+ --suite=gtk
+ --no-suite=gtk:a11y
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]