From a2b00f7ea7db9bd589ce3386c0e9d5be83265bb3 Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 14 Dec 2022 19:00:32 +0000 Subject: [PATCH] ci: Install tests in a separate prefix Avoid using `sudo` in the installed-tests CI job, since we're installing Meson as the current user. --- .gitlab-ci.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c78172c2dc..1f090b4748 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -150,20 +150,28 @@ installed-tests: stage: build needs: [] variables: - EXTRA_MESON_FLAGS: "--prefix=/usr --libdir=/usr/lib64 -Dinstall-tests=true" + EXTRA_MESON_FLAGS: "-Dinstall-tests=true" G_TEST_ACCESSIBLE: 1 script: - .gitlab-ci/show-info-linux.sh - export PATH="$HOME/.local/bin:$PATH" - pip3 install --user meson~=0.64 - meson subprojects download - - meson setup ${COMMON_MESON_FLAGS} ${EXTRA_MESON_FLAGS} ${BACKEND_FLAGS} ${FEATURE_FLAGS} _build + - meson setup + --prefix="${CI_PROJECT_DIR}/_installed" + ${COMMON_MESON_FLAGS} + ${EXTRA_MESON_FLAGS} + ${BACKEND_FLAGS} + ${FEATURE_FLAGS} + _build - meson compile -C _build - - sudo meson install -C _build + - meson install -C _build + - export LD_LIBRARY_PATH=${CI_PROJECT_DIR}/_install/lib64 - dbus-run-session xvfb-run -a -s "-screen 0 1024x768x24" gnome-desktop-testing-runner --report-directory=_build/installed-tests-report/failed/ --parallel=0 + --dirs "${CI_PROJECT_DIR}/_installed/share" gtk-4.0 artifacts: paths: