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.
This commit is contained in:
Emmanuele Bassi 2022-12-14 19:00:32 +00:00
parent 7fca091371
commit a2b00f7ea7

View File

@ -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: