1 # This is the tag of the docker image used for the build jobs. If the
2 # image doesn't exist yet, the containers stage generates it.
4 # In order to generate a new image, one should generally change the tag.
5 # While removing the image from the registry would also work, that's not
6 # recommended except for ephemeral images during development: Replacing
7 # an image after a significant amount of time might pull in newer
8 # versions of gcc/clang or other packages, which might break the build
9 # with older commits using the same tag.
11 # After merging a change resulting in generating a new image to the
12 # main repository, it's recommended to remove the image from the source
13 # repository's container registry, so that the image from the main
14 # repository's registry will be used there as well.
15 .templates_sha: &template_sha 567700e483aabed992d0a4fea84994a0472deff6 # see https://docs.gitlab.com/ee/ci/yaml/#includefile
18 - project: 'freedesktop/ci-templates'
21 - '/templates/debian.yml'
22 - '/templates/freebsd.yml'
23 - '/templates/ci-fairy.yml'
26 FDO_UPSTREAM_REPO: mesa/drm
27 FDO_REPO_SUFFIX: "$BUILD_OS/$BUILD_ARCH"
42 FDO_DISTRIBUTION_VERSION: buster
43 FDO_DISTRIBUTION_PACKAGES: 'build-essential docbook-xsl libatomic-ops-dev libcairo2-dev libcunit1-dev libpciaccess-dev meson ninja-build pkg-config python3 python3-pip python3-wheel python3-setuptools python3-docutils valgrind'
44 FDO_DISTRIBUTION_EXEC: 'pip3 install meson==0.59.0'
45 # bump this tag every time you change something which requires rebuilding the
47 FDO_DISTRIBUTION_TAG: "2023-09-01.0"
70 FDO_DISTRIBUTION_VERSION: "13.2"
71 FDO_DISTRIBUTION_PACKAGES: 'meson ninja pkgconf libpciaccess py39-docutils cairo'
72 # bump this tag every time you change something which requires rebuilding the
74 FDO_DISTRIBUTION_TAG: "2023-07-20.0"
82 # Build our base container image, which contains the core distribution, the
83 # toolchain, and all our build dependencies. This will be reused in the build
85 x86_64-debian-container_prep:
89 - .fdo.container-build@debian
90 stage: "Base container"
94 aarch64-debian-container_prep:
98 - .fdo.container-build@debian
101 stage: "Base container"
105 armv7-debian-container_prep:
109 - .fdo.container-build@debian
112 stage: "Base container"
115 FDO_BASE_IMAGE: "arm32v7/debian:$FDO_DISTRIBUTION_VERSION"
117 x86_64-freebsd-container_prep:
121 - .fdo.qemu-build@freebsd@x86_64
122 stage: "Base container"
126 # Core build environment.
129 MESON_BUILD_TYPE: "-Dbuildtype=debug -Doptimization=0 -Db_sanitize=address,undefined"
131 # OS/architecture-specific variants
132 .build-env-debian-x86_64:
134 - .fdo.suffixed-image@debian
138 - job: x86_64-debian-container_prep
141 .build-env-debian-aarch64:
143 - .fdo.suffixed-image@debian
147 # At least with the versions we have, the LSan runtime makes fork unusably
148 # slow on AArch64, which is bad news since the test suite decides to fork
149 # for every single subtest. For now, in order to get AArch64 builds and
150 # tests into CI, just assume that we're not going to leak any more on
151 # AArch64 than we would on ARMv7 or x86-64.
152 ASAN_OPTIONS: "detect_leaks=0"
156 - job: aarch64-debian-container_prep
159 .build-env-debian-armv7:
161 - .fdo.suffixed-image@debian
167 - job: armv7-debian-container_prep
170 .build-env-freebsd-x86_64:
172 # Compiling with ASan+UBSan appears to trigger an infinite loop in the
173 # compiler shipped with FreeBSD 13.0, so we only use UBSan here.
174 # Additionally, sanitizers can't be used with b_lundef on FreeBSD.
175 MESON_BUILD_TYPE: "-Dbuildtype=debug -Db_sanitize=undefined -Db_lundef=false"
177 - .fdo.suffixed-image@freebsd
181 - job: x86_64-freebsd-container_prep
194 --auto-features=enabled
197 - ninja -C build test
198 - DESTDIR=$PWD/install ninja -C build install
209 # Start the VM and copy our workspace to the VM
212 # The `set +e is needed to ensure that we always copy the meson logs back to
213 # the workspace to see details about the failed tests.
216 /app/vmctl exec "pkg info; cd $CI_PROJECT_NAME ; meson build --auto-features=enabled -D etnaviv=disabled -D nouveau=disabled -D valgrind=disabled && ninja -C build"
218 scp -r vm:$CI_PROJECT_NAME/build/meson-logs .
219 /app/vmctl exec "ninja -C $CI_PROJECT_NAME/build install"
220 mkdir -p $PREFIX && scp -r vm:$PREFIX/ $PREFIX/
221 # Finally, shut down the VM.
228 # Full build and test.
231 - .build-env-debian-x86_64
234 aarch64-debian-build:
236 - .build-env-debian-aarch64
241 - .build-env-debian-armv7
247 - if: '$SCHEDULE == "arch-daily"'
250 image: archlinux/archlinux:base-devel
252 - pacman -Syu --noconfirm --needed
262 x86_64-freebsd-build:
264 - .build-env-freebsd-x86_64