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.
This commit is contained in:
Emmanuele Bassi 2020-01-29 10:35:10 +01:00
parent 153e8a0c92
commit 56f9cdd99d
3 changed files with 53 additions and 5 deletions

View File

@ -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=yes
-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=yes
_build
- ninja -C _build
.mingw-defaults: &mingw-defaults
stage: build

View File

@ -61,6 +61,7 @@ RUN dnf -y install \
ninja-build \
pango-devel \
pcre-devel \
pygments \
python3 \
python3-jinja2 \
python3-pip \

11
.gitlab-ci/run-tests.sh Executable file
View File

@ -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