mirror of
https://github.com/neovim/neovim.git
synced 2024-12-19 18:55:14 -07:00
ci(s390x): run build & test as a non-root user
This commit is contained in:
parent
1beef6cd21
commit
3d8cd0c5d3
18
.github/workflows/optional.yml
vendored
18
.github/workflows/optional.yml
vendored
@ -27,17 +27,21 @@ jobs:
|
|||||||
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
- run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
|
||||||
- uses: docker://multiarch/ubuntu-core:s390x-focal
|
- uses: docker://multiarch/ubuntu-core:s390x-focal
|
||||||
with:
|
with:
|
||||||
|
# Docker runs the command as root, but we want the build/test to run
|
||||||
|
# as non-root so permissions based tests run correctly
|
||||||
args: >
|
args: >
|
||||||
bash -c
|
bash -c
|
||||||
"
|
"
|
||||||
apt-get -y update &&
|
apt-get -y update &&
|
||||||
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev &&
|
DEBIAN_FRONTEND=noninteractive apt-get -y install build-essential cmake curl gettext ninja-build locales-all cpanminus git attr libattr1-dev &&
|
||||||
git clone --depth=1 https://github.com/neovim/neovim.git &&
|
useradd --create-home qemuci &&
|
||||||
|
chown -R qemuci. . &&
|
||||||
|
runuser -u qemuci -- git clone --depth=1 https://github.com/neovim/neovim.git &&
|
||||||
cd neovim &&
|
cd neovim &&
|
||||||
git fetch origin ${{ github.ref }}:pr &&
|
runuser -u qemuci -- git fetch origin ${{ github.ref }}:pr &&
|
||||||
git switch pr &&
|
runuser -u qemuci -- git switch pr &&
|
||||||
cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON &&
|
runuser -u qemuci -- cmake -S cmake.deps -B .deps -G Ninja -D USE_BUNDLED_LUAJIT=OFF -D USE_BUNDLED_LUA=ON &&
|
||||||
cmake --build .deps &&
|
runuser -u qemuci -- cmake --build .deps &&
|
||||||
cmake -B build -G Ninja -D PREFER_LUA=ON &&
|
runuser -u qemuci -- cmake -B build -G Ninja -D PREFER_LUA=ON &&
|
||||||
make ${{ matrix.test }}
|
runuser -u qemuci -- make ${{ matrix.test }}
|
||||||
"
|
"
|
||||||
|
Loading…
Reference in New Issue
Block a user