summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml21
-rw-r--r--.gitlab-ci/ci.template7
-rw-r--r--.gitlab-ci/config.yml11
-rwxr-xr-x.gitlab-ci/meson-build.sh1
-rw-r--r--.gitlab-ci/meson-prep.sh36
-rwxr-xr-x.gitlab-ci/meson-test.sh12
-rwxr-xr-x.gitlab-ci/start-in-systemd.sh2
7 files changed, 77 insertions, 13 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 42c48ef9..13cd24f5 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -76,7 +76,7 @@ variables:
# See the documentation here: #
# https://wayland.freedesktop.org/libinput/doc/latest/building_libinput.html #
###############################################################################
- FEDORA_PACKAGES: 'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel valgrind systemd-udev'
+ FEDORA_PACKAGES: 'git-core gcc gcc-c++ pkgconf-pkg-config meson check-devel libudev-devel libevdev-devel doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx_rtd_theme python3-pytest-xdist libwacom-devel cairo-devel gtk4-devel glib2-devel mtdev-devel diffutils wayland-protocols-devel valgrind systemd-udev qemu-img qemu-system-x86-core qemu-system-aarch64-core jq python3-click python3-rich'
DEBIAN_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev curl'
UBUNTU_PACKAGES: 'git gcc g++ pkg-config meson check libudev-dev libevdev-dev doxygen graphviz python3-sphinx python3-recommonmark python3-sphinx-rtd-theme python3-pytest-xdist libwacom-dev libcairo2-dev libgtk-3-dev libglib2.0-dev libmtdev-dev'
ARCH_PACKAGES: 'git gcc pkgconfig meson check libsystemd libevdev doxygen graphviz python-sphinx python-recommonmark python-sphinx_rtd_theme python-pytest-xdist libwacom gtk4 mtdev diffutils wayland-protocols'
@@ -88,12 +88,12 @@ variables:
# changing these will force rebuilding the associated image
# Note: these tags have no meaning and are not tied to a particular
# libinput version
- FEDORA_TAG: '2022-08-08.0'
- DEBIAN_TAG: '2022-08-08.0'
- UBUNTU_TAG: '2022-08-08.0'
- ARCH_TAG: '2022-08-08.0'
- ALPINE_TAG: '2022-08-08.0'
- FREEBSD_TAG: '2022-08-08.0'
+ FEDORA_TAG: '2022-09-02.0'
+ DEBIAN_TAG: '2022-09-02.0'
+ UBUNTU_TAG: '2022-09-02.0'
+ ARCH_TAG: '2022-09-02.0'
+ ALPINE_TAG: '2022-09-02.0'
+ FREEBSD_TAG: '2022-09-02.0'
FDO_UPSTREAM_REPO: libinput/libinput
@@ -397,7 +397,6 @@ freebsd:13.0@container-clean:
.build-in-b2c@template:
extends:
- .policy
- - .fdo.b2c-image@fedora
- .default_artifacts
tags:
- kvm
@@ -408,9 +407,14 @@ freebsd:13.0@container-clean:
B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE
B2C_COMMAND: .gitlab-ci/start-in-systemd.sh
script:
+ # first build in the host container
+ - .gitlab-ci/meson-build.sh --skip-test
+
# pull b2c
- curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/v0.9.8/vm2c.py
- chmod +x /app/boot2container
+
+ # runs the test suite only
- /app/boot2container
#
@@ -490,6 +494,7 @@ freebsd:13.0@container-clean:
.fedora:36@test-suite-vm:
extends:
+ - .fdo.distribution-image@fedora
- .test-suite-vm
variables:
FDO_DISTRIBUTION_VERSION: 36
diff --git a/.gitlab-ci/ci.template b/.gitlab-ci/ci.template
index 30885a66..dd7de663 100644
--- a/.gitlab-ci/ci.template
+++ b/.gitlab-ci/ci.template
@@ -273,7 +273,6 @@ check-commit:
.build-in-b2c@template:
extends:
- .policy
- - .fdo.b2c-image@fedora
- .default_artifacts
tags:
- kvm
@@ -284,9 +283,14 @@ check-commit:
B2C_IMAGE: $FDO_DISTRIBUTION_IMAGE
B2C_COMMAND: .gitlab-ci/start-in-systemd.sh
script:
+ # first build in the host container
+ - .gitlab-ci/meson-build.sh --skip-test
+
# pull b2c
- curl -L -o /app/boot2container https://gitlab.freedesktop.org/mupuf/boot2container/-/raw/{{b2c.version}}/vm2c.py
- chmod +x /app/boot2container
+
+ # runs the test suite only
- /app/boot2container
#
@@ -369,6 +373,7 @@ check-commit:
{% set version = "{}".format(distro.versions|last()) %}
.{{distro.name}}:{{version}}@test-suite-vm:
extends:
+ - .fdo.distribution-image@{{distro.name}}
- .test-suite-vm
variables:
FDO_DISTRIBUTION_VERSION: {{version}}
diff --git a/.gitlab-ci/config.yml b/.gitlab-ci/config.yml
index 776ec4e0..4615684c 100644
--- a/.gitlab-ci/config.yml
+++ b/.gitlab-ci/config.yml
@@ -3,7 +3,7 @@
#
# We're happy to rebuild all containers when one changes.
-.default_tag: &default_tag '2022-08-08.0'
+.default_tag: &default_tag '2022-09-02.0'
distributions:
- name: fedora
@@ -36,7 +36,14 @@ distributions:
- diffutils
- wayland-protocols-devel
- valgrind # for the valgrind run, optional
- - systemd-udev # for the qemu run, optional
+ # below packages are for the qemu runs, so optional
+ - systemd-udev # for the qemu run
+ - qemu-img
+ - qemu-system-x86-core
+ - qemu-system-aarch64-core
+ - jq
+ - python3-click
+ - python3-rich
- name: debian
tag: *default_tag
versions:
diff --git a/.gitlab-ci/meson-build.sh b/.gitlab-ci/meson-build.sh
index 4d5330df..11fe03ef 100755
--- a/.gitlab-ci/meson-build.sh
+++ b/.gitlab-ci/meson-build.sh
@@ -76,4 +76,3 @@ fi
if [[ -n "$MESON_RUN_TEST" ]]; then
meson test -C "$MESON_BUILDDIR" $MESON_TEST_ARGS --print-errorlogs
fi
-
diff --git a/.gitlab-ci/meson-prep.sh b/.gitlab-ci/meson-prep.sh
new file mode 100644
index 00000000..e2630fe8
--- /dev/null
+++ b/.gitlab-ci/meson-prep.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+set -x
+if [[ -f .meson_environment ]]; then
+ . .meson_environment
+fi
+
+if [[ -z "$MESON_BUILDDIR" ]]; then
+ echo "\$MESON_BUILDDIR undefined."
+ exit 1
+fi
+
+# emulate a few gitlab variables to make it easier to
+# run and debug locally.
+if [[ -z "$CI_JOB_ID" ]] || [[ -z "$CI_JOB_NAME" ]]; then
+ echo "Missing \$CI_JOB_ID or \$CI_JOB_NAME".
+ CI_JOB_ID=$(date +%s)
+ CI_JOB_NAME='libinput-job-local'
+ echo "Simulating gitlab environment: "
+ echo " CI_JOB_ID=$CI_JOB_ID"
+ echo " CI_JOB_NAME=$CI_JOB_NAME"
+fi
+
+if [[ -n "$FDO_CI_CONCURRENT" ]]; then
+ NINJA_ARGS="-j$FDO_CI_CONCURRENT $NINJA_ARGS"
+ MESON_TESTTHREADS="$FDO_CI_CONCURRENT"
+fi
+
+echo "*************************************************"
+echo "builddir: $MESON_BUILDDIR"
+echo "meson args: $MESON_ARGS"
+echo "ninja args: $NINJA_ARGS"
+echo "meson test args: $MESON_TEST_ARGS"
+echo "*************************************************"
+
+set -e
diff --git a/.gitlab-ci/meson-test.sh b/.gitlab-ci/meson-test.sh
new file mode 100755
index 00000000..ef72dfba
--- /dev/null
+++ b/.gitlab-ci/meson-test.sh
@@ -0,0 +1,12 @@
+#!/usr/bin/env bash
+
+DIR="${BASH_SOURCE%/*}"
+if [[ ! -d "$DIR" ]]; then DIR="$PWD"; fi
+. $DIR/meson-prep.sh
+
+if [[ -z "$MESON_TEST_ARGS" ]]; then
+ echo "\$MESON_TEST_ARGS undefined."
+ exit 1
+fi
+
+meson test -C "$MESON_BUILDDIR" $MESON_TEST_ARGS --print-errorlogs
diff --git a/.gitlab-ci/start-in-systemd.sh b/.gitlab-ci/start-in-systemd.sh
index b505b206..99650d22 100755
--- a/.gitlab-ci/start-in-systemd.sh
+++ b/.gitlab-ci/start-in-systemd.sh
@@ -37,7 +37,7 @@ Type=simple
StandardOutput=journal+console
EnvironmentFile=$B2C_WORKDIR/.b2c_env
WorkingDirectory=$WORKDIR
-ExecStart=$WORKDIR/.gitlab-ci/meson-build.sh
+ExecStart=$WORKDIR/.gitlab-ci/meson-build.sh --skip-setup --skip-build
# exit the container on termination
ExecStopPost=$post_command