CI: use MESON_BUILDDIR for the build directory

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1317>
This commit is contained in:
Peter Hutterer 2024-02-20 09:21:45 +10:00 committed by Marge Bot
parent ceb60b0cda
commit 0ab32a7587
2 changed files with 16 additions and 11 deletions

View File

@ -20,6 +20,7 @@ variables:
FDO_DISTRIBUTION_VERSION: bullseye-slim FDO_DISTRIBUTION_VERSION: bullseye-slim
FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh' FDO_DISTRIBUTION_EXEC: 'env FDO_CI_CONCURRENT=${FDO_CI_CONCURRENT} bash .gitlab-ci/debian-install.sh'
FDO_DISTRIBUTION_TAG: "2023-06-20-libei.0" FDO_DISTRIBUTION_TAG: "2023-06-20-libei.0"
MESON_BUILDDIR: "build"
include: include:
- project: 'freedesktop/ci-templates' - project: 'freedesktop/ci-templates'
@ -60,8 +61,8 @@ debian-bullseye:
artifacts: artifacts:
when: always when: always
paths: paths:
- build/meson-logs/ - $MESON_BUILDDIR/meson-logs/
- build/test/piglit-results/ - $MESON_BUILDDIR/test/piglit-results/
variables: variables:
CCACHE_COMPILERCHECK: content CCACHE_COMPILERCHECK: content
CCACHE_DIR: /cache/xserver/cache CCACHE_DIR: /cache/xserver/cache
@ -94,16 +95,16 @@ meson-nolibdecor:
mingw-cross-build: mingw-cross-build:
extends: .common-build-and-test extends: .common-build-and-test
script: script:
- meson --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true build/ - meson --cross-file=.gitlab-ci/cross-i686-w64-mingw32.txt -Dglx=false -Dsecure-rpc=false -Dlisten_tcp=true $MESON_BUILDDIR/
- ninja -j${FDO_CI_CONCURRENT:-4} -C build/ install - ninja -j${FDO_CI_CONCURRENT:-4} -C $MESON_BUILDDIR/ install
meson-dist: meson-dist:
extends: .common-build-and-test extends: .common-build-and-test
artifacts: artifacts:
when: always when: always
paths: paths:
- build/meson-logs/ - $MESON_BUILDDIR/meson-logs/
- build/xserver-*/build/meson-logs/ - $MESON_BUILDDIR/xserver-*/$MESON_BUILDDIR/meson-logs/
script: script:
- .gitlab-ci/dist.sh - .gitlab-ci/dist.sh

View File

@ -3,10 +3,14 @@
set -e set -e
set -o xtrace set -o xtrace
if [[ -z "$MESON_BUILDDIR" ]]; then
MESON_BUILDDIR=build
fi
check_piglit_results () check_piglit_results ()
{ {
local EXPECTED_RESULTS=build/test/piglit-results/$1 local EXPECTED_RESULTS="$MESON_BUILDDIR"/test/piglit-results/$1
local DEPENDENCY=build/$2 local DEPENDENCY="$MESON_BUILDDIR"/$2
if ! test -e $DEPENDENCY; then if ! test -e $DEPENDENCY; then
return return
@ -20,11 +24,11 @@ check_piglit_results ()
exit 1 exit 1
} }
meson -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true $MESON_EXTRA_OPTIONS build/ meson -Dc_args="-fno-common" -Dprefix=/usr -Dxephyr=true -Dwerror=true $MESON_EXTRA_OPTIONS "$MESON_BUILDDIR/"
export PIGLIT_DIR=/root/piglit XTEST_DIR=/root/xts LP_NUM_THREADS=0 export PIGLIT_DIR=/root/piglit XTEST_DIR=/root/xts LP_NUM_THREADS=0
ninja -j${FDO_CI_CONCURRENT:-4} -C build/ ninja -j${FDO_CI_CONCURRENT:-4} -C "$MESON_BUILDDIR/"
meson test --num-processes ${FDO_CI_CONCURRENT:-4} --print-errorlogs -C build/ meson test --num-processes ${FDO_CI_CONCURRENT:-4} --print-errorlogs -C "$MESON_BUILDDIR/"
check_piglit_results xephyr-glamor hw/kdrive/ephyr/Xephyr.p/ephyr_glamor.c.o check_piglit_results xephyr-glamor hw/kdrive/ephyr/Xephyr.p/ephyr_glamor.c.o
check_piglit_results xvfb hw/vfb/Xvfb check_piglit_results xvfb hw/vfb/Xvfb