aboutsummaryrefslogtreecommitdiff
path: root/.cirrus.yml
diff options
context:
space:
mode:
authorEd Maste <emaste@FreeBSD.org>2020-09-17 18:47:23 +0000
committerEd Maste <emaste@FreeBSD.org>2020-09-17 18:47:23 +0000
commitdb853af62a612dc19b67c412d7c86676593a4b31 (patch)
tree9baed19d8332f26e36a61b12197dfafe5b52b273 /.cirrus.yml
parentacde2586c9fa53b525ff0ff93ac6f22b0f084391 (diff)
downloadsrc-db853af62a612dc19b67c412d7c86676593a4b31.tar.gz
src-db853af62a612dc19b67c412d7c86676593a4b31.zip
Cirrus-CI: build as an unprivileged user
The Cirrus-CI-provided working tree is owned by root. Leave that as is for simplicity but build as an unprivileged user; this tests building with an unmodifiable source tree as a side effect. Continue running the smoke test as root for now, as it failed when run as an unprivileged user - pkg reported "Fail to chmod /usr/bin/.pkgtemp.lpq.dUHpEqPGJ9pq:Operation not permitted" Sponsored by: The FreeBSD Foundation
Notes
Notes: svn path=/head/; revision=365846
Diffstat (limited to '.cirrus.yml')
-rw-r--r--.cirrus.yml8
1 files changed, 6 insertions, 2 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index e70ace73a5b0..3bb583b9c1a2 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -12,9 +12,13 @@ task:
timeout_in: 120m
install_script:
- pkg install -y qemu-devel uefi-edk2-qemu-x86_64
+ setup_user_script:
+ - pw useradd user
+ - mkdir -p /usr/obj/$(pwd -P)
+ - chown user:user /usr/obj/$(pwd -P)
script:
- - make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel
+ - su user -c "make -j$(sysctl -n hw.ncpu) WITHOUT_TOOLCHAIN=yes buildworld buildkernel"
package_script:
- - make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages
+ - su user -c "make WITHOUT_TOOLCHAIN=yes PKG_FORMAT=tar packages"
test_script:
- sh tools/boot/ci-qemu-test.sh