Skip to content
Commits on Source (7)
# vim: set expandtab shiftwidth=2 tabstop=8 textwidth=0:
.templates_sha: &template_sha 567700e483aabed992d0a4fea84994a0472deff6 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
.templates_sha: &template_sha 184ca628f89f3193c249b4e34e45afee2773a833 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
# This file uses the freedesktop ci-templates to build Weston and run our
# tests in CI.
#
......@@ -42,8 +42,8 @@
variables:
FDO_UPSTREAM_REPO: wayland/weston
FDO_REPO_SUFFIX: "$BUILD_OS/$BUILD_ARCH"
FDO_DISTRIBUTION_TAG: '2023-04-28-add-libdisplay-info.4'
FDO_REPO_SUFFIX: "$BUILD_OS-$FDO_DISTRIBUTION_VERSION/$BUILD_ARCH"
FDO_DISTRIBUTION_TAG: '2023-06-12-kernel-mesa-upgrade-2'
include:
......@@ -71,11 +71,19 @@ stages:
# Base variables used for anything using a Debian environment
.os-debian:
.os-debian-lts:
variables:
BUILD_OS: debian
LLVM_VERSION: 11
FDO_DISTRIBUTION_VERSION: bullseye
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} BUILD_ARCH=${BUILD_ARCH} KERNEL_IMAGE=${KERNEL_IMAGE} KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG} bash .gitlab-ci/debian-install.sh'
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} BUILD_ARCH=${BUILD_ARCH} KERNEL_IMAGE=${KERNEL_IMAGE} KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG} LLVM_VERSION=${LLVM_VERSION} FDO_DISTRIBUTION_VERSION=${FDO_DISTRIBUTION_VERSION} bash .gitlab-ci/debian-install.sh'
.os-debian:
variables:
BUILD_OS: debian
LLVM_VERSION: 15
FDO_DISTRIBUTION_VERSION: bookworm
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} BUILD_ARCH=${BUILD_ARCH} KERNEL_IMAGE=${KERNEL_IMAGE} KERNEL_DEFCONFIG=${KERNEL_DEFCONFIG} LLVM_VERSION=${LLVM_VERSION} FDO_DISTRIBUTION_VERSION=${FDO_DISTRIBUTION_VERSION} bash .gitlab-ci/debian-install.sh'
.ci-rules:
rules:
......@@ -99,6 +107,14 @@ check-commit:
reports:
junit: results.xml
.debian-lts-x86_64:
extends:
- .os-debian-lts
variables:
BUILD_ARCH: "x86-64"
KERNEL_IMAGE: "bzImage"
KERNEL_DEFCONFIG: "x86_64_defconfig"
.debian-x86_64:
extends:
- .os-debian
......@@ -107,12 +123,27 @@ check-commit:
KERNEL_IMAGE: "bzImage"
KERNEL_DEFCONFIG: "x86_64_defconfig"
.debian-lts-armv7:
extends:
- .os-debian-lts
variables:
BUILD_ARCH: "armv7"
.debian-armv7:
extends:
- .os-debian
variables:
BUILD_ARCH: "armv7"
.debian-lts-aarch64:
extends:
- .os-debian-lts
variables:
BUILD_ARCH: "aarch64"
KERNEL_IMAGE: "Image"
KERNEL_DEFCONFIG: "defconfig"
QEMU_SMP: 8 # built-in QEmu limit
.debian-aarch64:
extends:
- .os-debian
......@@ -125,6 +156,14 @@ check-commit:
# Build our base container image, which contains the core distribution, the
# toolchain, and all our build dependencies. This will be reused in the build
# stage.
x86_64-debian-lts-container_prep:
extends:
- .ci-rules
- .debian-lts-x86_64
- .fdo.container-build@debian
timeout: 30m
stage: "Base container"
x86_64-debian-container_prep:
extends:
- .ci-rules
......@@ -133,6 +172,18 @@ x86_64-debian-container_prep:
timeout: 30m
stage: "Base container"
armv7-debian-lts-container_prep:
extends:
- .ci-rules
- .debian-lts-armv7
- .fdo.container-build@debian
tags:
- aarch64
variables:
FDO_BASE_IMAGE: "arm32v7/debian:$FDO_DISTRIBUTION_VERSION"
timeout: 30m
stage: "Base container"
armv7-debian-container_prep:
extends:
- .ci-rules
......@@ -145,6 +196,16 @@ armv7-debian-container_prep:
timeout: 30m
stage: "Base container"
aarch64-debian-lts-container_prep:
extends:
- .ci-rules
- .debian-lts-aarch64
- .fdo.container-build@debian
tags:
- aarch64
timeout: 30m
stage: "Base container"
aarch64-debian-container_prep:
extends:
- .ci-rules
......@@ -170,8 +231,8 @@ aarch64-debian-container_prep:
.build-with-clang:
variables:
CC: clang-11
CC_LD: lld-11
CC: clang-$LLVM_VERSION
CC_LD: lld-$LLVM_VERSION
MESON_TOOLCHAIN_OPTIONS: "$MESON_OPTIONS -Db_lundef=false" # clang+ASan+undef=boom
# Extends the core build templates to also provide for running our testing. We
......@@ -222,6 +283,15 @@ aarch64-debian-container_prep:
- $PREFIX
# OS/architecture-specific variants
.build-env-debian-lts-x86_64:
extends:
- .debian-lts-x86_64
- .fdo.suffixed-image@debian
- .build-env
needs:
- job: x86_64-debian-lts-container_prep
artifacts: false
.build-env-debian-x86_64:
extends:
- .debian-x86_64
......@@ -231,6 +301,17 @@ aarch64-debian-container_prep:
- job: x86_64-debian-container_prep
artifacts: false
.build-env-debian-lts-armv7:
tags:
- aarch64
extends:
- .debian-lts-armv7
- .fdo.suffixed-image@debian
- .build-env
needs:
- job: armv7-debian-lts-container_prep
artifacts: false
.build-env-debian-armv7:
tags:
- aarch64
......@@ -242,6 +323,17 @@ aarch64-debian-container_prep:
- job: armv7-debian-container_prep
artifacts: false
.build-env-debian-lts-aarch64:
tags:
- aarch64
extends:
- .debian-lts-aarch64
- .fdo.suffixed-image@debian
- .build-env
needs:
- job: aarch64-debian-lts-container_prep
artifacts: false
.build-env-debian-aarch64:
tags:
- aarch64
......@@ -253,6 +345,16 @@ aarch64-debian-container_prep:
- job: aarch64-debian-container_prep
artifacts: false
.test-env-debian-lts-x86_64:
tags:
- kvm
extends:
- .build-env-debian-lts-x86_64
- .build-and-test
needs:
- job: x86_64-debian-lts-container_prep
artifacts: false
.test-env-debian-x86_64:
tags:
- kvm
......@@ -263,6 +365,16 @@ aarch64-debian-container_prep:
- job: x86_64-debian-container_prep
artifacts: false
.test-env-debian-lts-aarch64:
tags:
- kvm-aarch64
extends:
- .build-env-debian-lts-aarch64
- .build-and-test
needs:
- job: aarch64-debian-lts-container_prep
artifacts: false
.test-env-debian-aarch64:
tags:
- kvm-aarch64
......@@ -290,6 +402,11 @@ aarch64-debian-container_prep:
- ninja -C "$BUILDDIR" coverage-html > "$BUILDDIR/meson-logs/ninja-coverage-html.txt"
- ninja -C "$BUILDDIR" coverage-xml
x86_64-debian-lts-full-build:
extends:
- .test-env-debian-lts-x86_64
- .build-options-full
x86_64-debian-full-build:
extends:
- .test-env-debian-x86_64
......@@ -300,17 +417,34 @@ x86_64-debian-full-build:
coverage_format: cobertura
path: $BUILDDIR/meson-logs/coverage.xml
aarch64-debian-lts-full-build:
extends:
- .test-env-debian-lts-aarch64
- .build-options-full
aarch64-debian-full-build:
extends:
- .test-env-debian-aarch64
- .build-options-full
x86_64-clang-debian-lts-full-build:
extends:
- .test-env-debian-lts-x86_64
- .build-with-clang
- .build-options-full
x86_64-clang-debian-full-build:
extends:
- .test-env-debian-x86_64
- .build-with-clang
- .build-options-full
aarch64-clang-debian-lts-full-build:
extends:
- .test-env-debian-lts-aarch64
- .build-with-clang
- .build-options-full
aarch64-clang-debian-full-build:
extends:
- .test-env-debian-aarch64
......@@ -341,17 +475,35 @@ docs-build:
-Dwerror=true
-Dlauncher-libseat=true
x86_64-debian-lts-no-gl-build:
extends:
- .test-env-debian-lts-x86_64
- .build-options-no-gl
x86_64-debian-no-gl-build:
extends:
- .test-env-debian-x86_64
- .build-options-no-gl
armv7-debian-lts-no-gl-build:
extends:
- .build-env-debian-lts-armv7
- .build-no-test
- .build-options-no-gl
armv7-debian-no-gl-build:
extends:
- .build-env-debian-armv7
- .build-no-test
- .build-options-no-gl
armv7-clang-debian-lts-no-gl-build:
extends:
- .build-env-debian-lts-armv7
- .build-with-clang
- .build-no-test
- .build-options-no-gl
armv7-clang-debian-no-gl-build:
extends:
- .build-env-debian-armv7
......@@ -359,6 +511,11 @@ armv7-clang-debian-no-gl-build:
- .build-no-test
- .build-options-no-gl
aarch64-debian-lts-no-gl-build:
extends:
- .test-env-debian-lts-aarch64
- .build-options-no-gl
aarch64-debian-no-gl-build:
extends:
- .test-env-debian-aarch64
......
......@@ -11,18 +11,30 @@ set -o xtrace -o errexit
export MAKEFLAGS="-j${FDO_CI_CONCURRENT:-4}"
export NINJAFLAGS="-j${FDO_CI_CONCURRENT:-4}"
# When calling pip in newer versions, we're required to pass
# --break-system-packages so it knows that we did really want to call pip and
# aren't just doing it by accident.
PIP_ARGS="--user"
case "$FDO_DISTRIBUTION_VERSION" in
bullseye)
;;
*)
PIP_ARGS="$PIP_ARGS --break-system-packages"
;;
esac
# Build and install Meson. Generally we want to keep this in sync with what
# we require inside meson.build.
pip3 install --user git+https://github.com/mesonbuild/meson.git@1.0.0
pip3 install $PIP_ARGS git+https://github.com/mesonbuild/meson.git@1.0.0
export PATH=$HOME/.local/bin:$PATH
# Our docs are built using Sphinx (top-level organisation and final HTML/CSS
# generation), Doxygen (parse structures/functions/comments from source code),
# Breathe (a bridge between Doxygen and Sphinx), and we use the Read the Docs
# theme for the final presentation.
pip3 install sphinx==4.2.0 --user
pip3 install breathe==4.31.0 --user
pip3 install sphinx_rtd_theme==1.0.0 --user
pip3 install $PIP_ARGS sphinx==4.2.0
pip3 install $PIP_ARGS breathe==4.31.0
pip3 install $PIP_ARGS sphinx_rtd_theme==1.0.0
# Build a Linux kernel for use in testing. We enable the VKMS module so we can
# predictably test the DRM backend in the absence of real hardware. We lock the
......@@ -46,7 +58,7 @@ pip3 install sphinx_rtd_theme==1.0.0 --user
# The fork pulls in this support from the original GitHub PR, rebased on top of
# a newer upstream version which fixes AArch64 support.
if [[ -n "$KERNEL_DEFCONFIG" ]]; then
git clone --depth=1 --branch=v5.14 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
git clone --depth=1 --branch=v6.3 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git linux
cd linux
if [[ "${BUILD_ARCH}" = "x86-64" ]]; then
......@@ -86,7 +98,7 @@ if [[ -n "$KERNEL_DEFCONFIG" ]]; then
git clone https://github.com/fooishbar/virtme
cd virtme
git checkout -b snapshot 70e390c564cd09e0da287a7f2c04a6592e59e379
git checkout -b snapshot 036fc0c8b3ee0881a035abc47ab4f152546a4408
./setup.py install
cd ..
fi
......@@ -113,6 +125,17 @@ ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf wayland-protocols
# Build and install our own version of libdrm. Debian 11 (bullseye) provides
# libdrm 2.4.104 which doesn't have the IN_FORMATS iterator api, and Mesa
# depends on 2.4.109 as well.
git clone --branch libdrm-2.4.109 --depth=1 https://gitlab.freedesktop.org/mesa/drm.git
cd drm
meson build --wrap-mode=nofallback -Dauto_features=disabled \
-Dvc4=false -Dfreedreno=false -Detnaviv=false
ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf drm
# Build and install our own version of Mesa. Debian provides a perfectly usable
# Mesa, however llvmpipe's rendering behaviour can change subtly over time.
# This doesn't work for our tests which expect pixel-precise reproduction, so
......@@ -120,7 +143,7 @@ rm -rf wayland-protocols
# features from Mesa then bump this version and $FDO_DISTRIBUTION_TAG, however
# please be prepared for some of the tests to change output, which will need to
# be manually inspected for correctness.
git clone --branch 21.3 --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git
git clone --branch 23.0 --depth=1 https://gitlab.freedesktop.org/mesa/mesa.git
cd mesa
meson build --wrap-mode=nofallback -Dauto_features=disabled \
-Dgallium-drivers=swrast -Dvulkan-drivers= -Ddri-drivers=
......@@ -128,17 +151,6 @@ ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf mesa
# Build and install our own version of libdrm. Debian 11 (bullseye) provides
# libdrm 2.4.104 which doesn't have the IN_FORMATS iterator api. We can stop
# building and installing libdrm as soon as we move to Debian 12.
git clone --branch libdrm-2.4.108 --depth=1 https://gitlab.freedesktop.org/mesa/drm.git
cd drm
meson build --wrap-mode=nofallback -Dauto_features=disabled \
-Dvc4=false -Dfreedreno=false -Detnaviv=false
ninja ${NINJAFLAGS} -C build install
cd ..
rm -rf drm
# PipeWire is used for remoting support. Unlike our other dependencies its
# behaviour will be stable, however as a pre-1.0 project its API is not yet
# stable, so again we lock it to a fixed version.
......
......@@ -22,13 +22,13 @@ MESA_DEV_PKGS="
libxrandr-dev
libxshmfence-dev
libxrandr-dev
llvm-11-dev
llvm-${LLVM_VERSION}-dev
python3-mako
"
# Needed for running the custom-built mesa
MESA_RUNTIME_PKGS="
libllvm11
libllvm${LLVM_VERSION}
"
apt-get update
......@@ -36,7 +36,7 @@ apt-get -y --no-install-recommends install \
autoconf \
automake \
build-essential \
clang-11 \
clang-${LLVM_VERSION} \
curl \
doxygen \
graphviz \
......@@ -103,9 +103,9 @@ apt-get -y --no-install-recommends install \
libxkbcommon-dev \
libxml2-dev \
libxxf86vm-dev \
lld-11 \
llvm-11 \
llvm-11-dev \
lld-${LLVM_VERSION} \
llvm-${LLVM_VERSION} \
llvm-${LLVM_VERSION}-dev \
mesa-common-dev \
ninja-build \
pkg-config \
......