ci: Use sudo to run meson install
Meson stopped using polkit for automatic privilege elevation, and will no longer attempt any priviledge elevation when not running interactively. Running the entire install command as root used to be problematic in the past, as it could result in ownership changes of files in the build directory that would result in build failures later, but the aforementioned change leaves us with little choice. Apparently `meson install` will spawn `ninja` with dropped privileges when a rebuild is needed, so hopefully this will no longer be an issue. Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2892>
This commit is contained in:
parent
ae86b58d59
commit
d353f2d367
@ -175,11 +175,11 @@ build:
|
|||||||
before_script:
|
before_script:
|
||||||
- .gitlab-ci/checkout-mutter.sh
|
- .gitlab-ci/checkout-mutter.sh
|
||||||
- meson mutter mutter/build --prefix=/usr
|
- meson mutter mutter/build --prefix=/usr
|
||||||
- meson install -C mutter/build
|
- sudo meson install -C mutter/build
|
||||||
script:
|
script:
|
||||||
- meson setup . build -Dbuildtype=debugoptimized -Dman=false --werror --fatal-meson-warnings
|
- meson setup . build -Dbuildtype=debugoptimized -Dman=false --werror --fatal-meson-warnings
|
||||||
- meson compile -C build
|
- meson compile -C build
|
||||||
- meson install -C build
|
- sudo meson install -C build
|
||||||
artifacts:
|
artifacts:
|
||||||
expire_in: 1 day
|
expire_in: 1 day
|
||||||
paths:
|
paths:
|
||||||
@ -194,7 +194,7 @@ test:
|
|||||||
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
XDG_RUNTIME_DIR: "$CI_PROJECT_DIR/runtime-dir"
|
||||||
NO_AT_BRIDGE: "1"
|
NO_AT_BRIDGE: "1"
|
||||||
before_script:
|
before_script:
|
||||||
- meson install -C mutter/build
|
- sudo meson install -C mutter/build
|
||||||
- mkdir -m 700 $XDG_RUNTIME_DIR
|
- mkdir -m 700 $XDG_RUNTIME_DIR
|
||||||
script:
|
script:
|
||||||
- dbus-run-session -- xvfb-run meson test -C build --no-rebuild
|
- dbus-run-session -- xvfb-run meson test -C build --no-rebuild
|
||||||
@ -217,7 +217,7 @@ test-coverity:
|
|||||||
variables:
|
variables:
|
||||||
GIT_SUBMODULE_STRATEGY: normal
|
GIT_SUBMODULE_STRATEGY: normal
|
||||||
before_script:
|
before_script:
|
||||||
- meson install -C mutter/build
|
- sudo meson install -C mutter/build
|
||||||
script:
|
script:
|
||||||
- .gitlab-ci/download-coverity-tarball.sh
|
- .gitlab-ci/download-coverity-tarball.sh
|
||||||
- CC=clang meson coverity-build -Dman=false
|
- CC=clang meson coverity-build -Dman=false
|
||||||
@ -255,7 +255,7 @@ dist:
|
|||||||
stage: deploy
|
stage: deploy
|
||||||
needs: ["build"]
|
needs: ["build"]
|
||||||
before_script:
|
before_script:
|
||||||
- meson install -C mutter/build
|
- sudo meson install -C mutter/build
|
||||||
- mkdir -m 700 $XDG_RUNTIME_DIR
|
- mkdir -m 700 $XDG_RUNTIME_DIR
|
||||||
script:
|
script:
|
||||||
- dbus-run-session xvfb-run meson dist -C build
|
- dbus-run-session xvfb-run meson dist -C build
|
||||||
|
Loading…
Reference in New Issue
Block a user