mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-15 13:16:56 +00:00
docker: Determine nproc for darwin. (closes #52)
docker: Further separate apt and rust cache mounts. Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
1 parent
f4e6807a3c
commit
fc3fcf4526
5 files changed
+13
-17
No files matched your search
+3
-7
@@ -56,8 +56,6 @@ sys_targets="${env_sys_targets:-$default_sys_targets}"
|
||||
sys_versions="${env_sys_versions:-$default_sys_versions}"
|
||||
|
||||
docker_dir="$PWD/$BASEDIR"
|
||||
runner_name=$(echo $RUNNER_NAME | cut -d"." -f1)
|
||||
runner_num=$(echo $RUNNER_NAME | cut -d"." -f2)
|
||||
builder_name="${GITHUB_ACTOR:-owo}"
|
||||
toolchain_toml="$docker_dir/../rust-toolchain.toml"
|
||||
rust_msrv=$(grep "channel = " "$toolchain_toml" | cut -d'=' -f2 | sed 's/\s"\|"$//g')
|
||||
@@ -92,11 +90,9 @@ if test "$CI" = "true"; then
|
||||
args="$args --allow=network.host"
|
||||
fi
|
||||
|
||||
if test ! -z "$runner_num"; then
|
||||
#cpu_num=$(expr $runner_num % $(nproc))
|
||||
#args="$args --cpuset-cpus=${cpu_num}"
|
||||
#args="$args --set *.args.nprocs=1"
|
||||
# https://github.com/moby/buildkit/issues/1276
|
||||
if test "$(uname)" = "Darwin"; then
|
||||
nprocs=$(sysctl -n hw.logicalcpu)
|
||||
args="$args --set *.args.nprocs=${nprocs}"
|
||||
:
|
||||
else
|
||||
nprocs=$(nproc)
|
||||
|
||||
Reference in new issue
Block a user