From 78cba869289c66be875a72850437f95fe7541e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alex=20R=C3=B8nne=20Petersen?= Date: Wed, 3 Dec 2025 21:29:51 +0100 Subject: [PATCH] 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". --- ci/aarch64-linux-debug.sh | 2 +- ci/aarch64-linux-release.sh | 2 +- ci/aarch64-macos-debug.sh | 1 + ci/aarch64-macos-release.sh | 1 + ci/aarch64-windows.ps1 | 2 ++ ci/loongarch64-linux-debug.sh | 2 +- ci/loongarch64-linux-release.sh | 2 +- ci/riscv64-linux-debug.sh | 2 +- ci/riscv64-linux-release.sh | 2 +- ci/s390x-linux-debug.sh | 2 +- ci/s390x-linux-release.sh | 2 +- ci/x86_64-freebsd-debug.sh | 2 +- ci/x86_64-freebsd-release.sh | 2 +- ci/x86_64-linux-debug-llvm.sh | 2 +- ci/x86_64-linux-debug.sh | 2 +- ci/x86_64-linux-release.sh | 2 +- ci/x86_64-windows-debug.ps1 | 3 ++- ci/x86_64-windows-release.ps1 | 3 ++- 18 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ci/aarch64-linux-debug.sh b/ci/aarch64-linux-debug.sh index 0892840f942ecd5607b0110af62d8870e1b0a376..7a4a6daa2aef60e1a9194184b1307f85992db3de 100755 --- a/ci/aarch64-linux-debug.sh +++ b/ci/aarch64-linux-debug.sh @@ -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 \ diff --git a/ci/aarch64-linux-release.sh b/ci/aarch64-linux-release.sh index 7b0947d385cad2f6b9723f115d2116be1bc8cb14..39ad9767ab62264b19846ef8bc22e2d6ad23ed85 100755 --- a/ci/aarch64-linux-release.sh +++ b/ci/aarch64-linux-release.sh @@ -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 \ diff --git a/ci/aarch64-macos-debug.sh b/ci/aarch64-macos-debug.sh index 2ae63e755593590824fef8a638bd1d2462f4aa14..a0681430dce8cb81e0030e2c4d6d0c94f385aa39 100755 --- a/ci/aarch64-macos-debug.sh +++ b/ci/aarch64-macos-debug.sh @@ -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 \ diff --git a/ci/aarch64-macos-release.sh b/ci/aarch64-macos-release.sh index 2e3a06a53bfa36e55e1fce9b70a0bc212354731b..46c611f100f00d17d045e76152710fa377849aa5 100755 --- a/ci/aarch64-macos-release.sh +++ b/ci/aarch64-macos-release.sh @@ -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 \ diff --git a/ci/aarch64-windows.ps1 b/ci/aarch64-windows.ps1 index 610f94a64f8a89ceec658983d476be66eaa90538..96e07642565019c9a805ecc8c5ac29f461341df1 100644 --- a/ci/aarch64-windows.ps1 +++ b/ci/aarch64-windows.ps1 @@ -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 ` diff --git a/ci/loongarch64-linux-debug.sh b/ci/loongarch64-linux-debug.sh index 9757542cbb4b98d749ce0e4dd5fa28943f41951b..4cba17b0319039daf2d132ece4908cfdf542cffa 100755 --- a/ci/loongarch64-linux-debug.sh +++ b/ci/loongarch64-linux-debug.sh @@ -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 \ diff --git a/ci/loongarch64-linux-release.sh b/ci/loongarch64-linux-release.sh index edb46d8565beec9bfc17e1ccfbc7a0475c653418..5b05284d26668d01020f204f09d3a73921883ce5 100755 --- a/ci/loongarch64-linux-release.sh +++ b/ci/loongarch64-linux-release.sh @@ -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 \ diff --git a/ci/riscv64-linux-debug.sh b/ci/riscv64-linux-debug.sh index 51e038b369d37caea42c1736b5a71178d1376a5c..5e7ae7785bb5c450a5412270a7d18015913f22f4 100755 --- a/ci/riscv64-linux-debug.sh +++ b/ci/riscv64-linux-debug.sh @@ -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 \ diff --git a/ci/riscv64-linux-release.sh b/ci/riscv64-linux-release.sh index 1de0335f42ec9be5fa848d4372811f486b37d107..92b3d43465d8b8667423c75f1ca75598776bc6b6 100755 --- a/ci/riscv64-linux-release.sh +++ b/ci/riscv64-linux-release.sh @@ -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 \ diff --git a/ci/s390x-linux-debug.sh b/ci/s390x-linux-debug.sh index ce5057634f6b9a630354e1c7d20becb767f23232..ffe4d0f02b3cada3b36e24fcc3572a1a14d5b389 100755 --- a/ci/s390x-linux-debug.sh +++ b/ci/s390x-linux-debug.sh @@ -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 \ diff --git a/ci/s390x-linux-release.sh b/ci/s390x-linux-release.sh index e474b89ffe12a10ef7217d2452446ed353b6ec4e..7fb6cd3641fa73752ca4f6eb1967f1a2de9dd8bf 100755 --- a/ci/s390x-linux-release.sh +++ b/ci/s390x-linux-release.sh @@ -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 \ diff --git a/ci/x86_64-freebsd-debug.sh b/ci/x86_64-freebsd-debug.sh index 570f46fb091968351385f62e33b3ed546d193e8b..c94dcfb2bb44a252143c40f24344a2242c059cb6 100755 --- a/ci/x86_64-freebsd-debug.sh +++ b/ci/x86_64-freebsd-debug.sh @@ -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 \ diff --git a/ci/x86_64-freebsd-release.sh b/ci/x86_64-freebsd-release.sh index d7641fb86ccd35e8b5cba08231b7fa86bd412f05..87092526a5f430ecabdbe2dda5484ce9adc351d2 100755 --- a/ci/x86_64-freebsd-release.sh +++ b/ci/x86_64-freebsd-release.sh @@ -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 \ diff --git a/ci/x86_64-linux-debug-llvm.sh b/ci/x86_64-linux-debug-llvm.sh index 3c11820352b5ffd014e27a062bf70e6790f5d31f..f6ac310ef72b2a486888b2a6955e662029e29d21 100755 --- a/ci/x86_64-linux-debug-llvm.sh +++ b/ci/x86_64-linux-debug-llvm.sh @@ -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 \ diff --git a/ci/x86_64-linux-debug.sh b/ci/x86_64-linux-debug.sh index fb280448777654eef6bd82ad04aaed3e2ea99b88..98d2ff2ee897e50d9d2b9d3359680261dab9748b 100755 --- a/ci/x86_64-linux-debug.sh +++ b/ci/x86_64-linux-debug.sh @@ -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 \ diff --git a/ci/x86_64-linux-release.sh b/ci/x86_64-linux-release.sh index c7b3dc7e364c34d16c0788fc1e2333a5cd07e41d..9f89d4370228b61c55218fd100feaccc818c0510 100755 --- a/ci/x86_64-linux-release.sh +++ b/ci/x86_64-linux-release.sh @@ -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 \ diff --git a/ci/x86_64-windows-debug.ps1 b/ci/x86_64-windows-debug.ps1 index 31389a1b994a74ad28b28d022ca0c9f5b81197e6..e6ba8b0861b18003daaca0ab1974dc8f3cfb6ad7 100644 --- a/ci/x86_64-windows-debug.ps1 +++ b/ci/x86_64-windows-debug.ps1 @@ -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 ` diff --git a/ci/x86_64-windows-release.ps1 b/ci/x86_64-windows-release.ps1 index c0ecb85c470ac28336b00c51dffcef10664cb7b6..e22e3af1c79d670d7e488664a715b21f2b9331ef 100644 --- a/ci/x86_64-windows-release.ps1 +++ b/ci/x86_64-windows-release.ps1 @@ -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 ` -- 2.54.0