ci: set maxrss from $ZSF_MAX_RSS if provided by the runner

All of our runners now define this. When running a CI script locally, this will
not be set, so we default to 0, aka "all available system memory".
This commit is contained in:
Alex Rønne Petersen 2025-12-03 21:29:51 +01:00
parent 2d53eab799
commit 52b2ac31e3
No known key found for this signature in database
18 changed files with 21 additions and 15 deletions

View file

@ -44,7 +44,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-debug/bin/zig build test docs \
--maxrss 44918199637 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -44,7 +44,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-release/bin/zig build test docs \
--maxrss 44918199637 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -42,6 +42,7 @@ cmake .. \
ninja install
stage3-debug/bin/zig build test docs \
--maxrss ${ZSF_MAX_RSS:-0} \
--zig-lib-dir "$PWD/../lib" \
-Denable-macos-sdk \
-Dstatic-llvm \

View file

@ -51,6 +51,7 @@ stage3-release/bin/zig build test docs \
# Ensure that stage3 and stage4 are byte-for-byte identical.
stage3-release/bin/zig build \
--maxrss ${ZSF_MAX_RSS:-0} \
--prefix stage4-release \
-Denable-llvm \
-Dno-lib \

View file

@ -5,6 +5,7 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
$PREFIX_PATH = "$(Get-Location)\..\$ZIG_LLVM_CLANG_LLD_NAME"
$ZIG = "$PREFIX_PATH\bin\zig.exe"
$ZIG_LIB_DIR = "$(Get-Location)\lib"
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
if (!(Test-Path "..\$ZIG_LLVM_CLANG_LLD_NAME.zip")) {
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
@ -54,6 +55,7 @@ CheckLastExitCode
Write-Output "Main test suite..."
& "stage3-release\bin\zig.exe" build test docs `
--maxrss $ZSF_MAX_RSS `
--zig-lib-dir "$ZIG_LIB_DIR" `
--search-prefix "$PREFIX_PATH" `
-Dstatic-llvm `

View file

@ -45,7 +45,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-debug/bin/zig build test docs \
--maxrss 60129542144 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -45,7 +45,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-release/bin/zig build test docs \
--maxrss 60129542144 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -44,7 +44,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-debug/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-error-traces test-llvm-ir \
--maxrss 68719476736 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dskip-single-threaded \

View file

@ -44,7 +44,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-release/bin/zig build test-cases test-modules test-unit test-c-abi test-stack-traces test-error-traces test-llvm-ir \
--maxrss 68719476736 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dskip-single-threaded \

View file

@ -45,7 +45,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-debug/bin/zig build test docs \
--maxrss 30064771072 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -45,7 +45,7 @@ ninja install
# No -fqemu and -fwasmtime here as they're covered by the x86_64-linux scripts.
stage3-release/bin/zig build test docs \
--maxrss 30064771072 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-non-native \
-Dtarget=native-native-musl \

View file

@ -44,7 +44,7 @@ unset CXX
ninja install
stage3-debug/bin/zig build test docs \
--maxrss 42949672960 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-spirv \
-Dskip-wasm \

View file

@ -44,7 +44,7 @@ unset CXX
ninja install
stage3-release/bin/zig build test docs \
--maxrss 42949672960 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dstatic-llvm \
-Dskip-spirv \
-Dskip-wasm \

View file

@ -49,7 +49,7 @@ stage3-debug/bin/zig build \
-Dno-lib
stage3-debug/bin/zig build test docs \
--maxrss 21000000000 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dlldb=$HOME/deps/lldb-zig/Debug-e0a42bb34/bin/lldb \
-fqemu \
-fwasmtime \

View file

@ -48,7 +48,7 @@ stage3-debug/bin/zig build \
-Dno-lib
stage3-debug/bin/zig build test docs \
--maxrss 21000000000 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dlldb=$HOME/deps/lldb-zig/Debug-e0a42bb34/bin/lldb \
-fqemu \
-fwasmtime \

View file

@ -54,7 +54,7 @@ stage3-release/bin/zig build \
-Dno-lib
stage3-release/bin/zig build test docs \
--maxrss 21000000000 \
--maxrss ${ZSF_MAX_RSS:-0} \
-Dlldb=$HOME/deps/lldb-zig/Release-e0a42bb34/bin/lldb \
-fqemu \
-fwasmtime \

View file

@ -5,6 +5,7 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
$ZIG = "$PREFIX_PATH\bin\zig.exe"
$ZIG_LIB_DIR = "$(Get-Location)\lib"
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
if (!(Test-Path "$PREFIX_PATH.zip")) {
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
@ -54,7 +55,7 @@ CheckLastExitCode
Write-Output "Main test suite..."
& "stage3-debug\bin\zig.exe" build test docs `
--maxrss 32212254720 `
--maxrss $ZSF_MAX_RSS `
--zig-lib-dir "$ZIG_LIB_DIR" `
--search-prefix "$PREFIX_PATH" `
-Dstatic-llvm `

View file

@ -5,6 +5,7 @@ $ZIG_LLVM_CLANG_LLD_URL = "https://ziglang.org/deps/$ZIG_LLVM_CLANG_LLD_NAME.zip
$PREFIX_PATH = "$($Env:USERPROFILE)\$ZIG_LLVM_CLANG_LLD_NAME"
$ZIG = "$PREFIX_PATH\bin\zig.exe"
$ZIG_LIB_DIR = "$(Get-Location)\lib"
$ZSF_MAX_RSS = if ($Env:ZSF_MAX_RSS) { $Env:ZSF_MAX_RSS } else { 0 }
if (!(Test-Path "$PREFIX_PATH.zip")) {
Write-Output "Downloading $ZIG_LLVM_CLANG_LLD_URL"
@ -54,7 +55,7 @@ CheckLastExitCode
Write-Output "Main test suite..."
& "stage3-release\bin\zig.exe" build test docs `
--maxrss 32212254720 `
--maxrss $ZSF_MAX_RSS `
--zig-lib-dir "$ZIG_LIB_DIR" `
--search-prefix "$PREFIX_PATH" `
-Dstatic-llvm `