authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-12-04 15:45:15-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2022-12-04 15:45:15-07:00
logbdb6fb57639a4508dda523301c5eaf31e8d89edf
treea150625e6ee39e0d304be92de5ab5b23443c508b
parente361740669e95b198cfbbcb7a600edc3a0de273a

CI: use cache directories local to the CI run

Override the cache directories because they won't actually help other CI runs which will be testing alternate versions of zig, and ultimately would just fill up space on the hard drive for no reason. In practice we did see one of the CI servers fill up too many files inside ~/.cache/zig, which caused certain file system operations to start returning ENOSPC, despite the hard drive having plenty of space left.

6 files changed, 43 insertions(+), 0 deletions(-)

ci/aarch64-linux-debug.sh+7
......@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
2626rm -rf build-debug
2727mkdir build-debug
2828cd build-debug
29
30# Override the cache directories because they won't actually help other CI runs
31# which will be testing alternate versions of zig, and ultimately would just
32# fill up space on the hard drive for no reason.
33export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
34export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
35
2936cmake .. \
3037 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
3138 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/aarch64-linux-release.sh+7
......@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
2626rm -rf build-release
2727mkdir build-release
2828cd build-release
29
30# Override the cache directories because they won't actually help other CI runs
31# which will be testing alternate versions of zig, and ultimately would just
32# fill up space on the hard drive for no reason.
33export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
34export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
35
2936cmake .. \
3037 -DCMAKE_INSTALL_PREFIX="stage3-release" \
3138 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/aarch64-macos.sh+7
......@@ -23,6 +23,13 @@ git fetch --tags
2323
2424mkdir build
2525cd build
26
27# Override the cache directories because they won't actually help other CI runs
28# which will be testing alternate versions of zig, and ultimately would just
29# fill up space on the hard drive for no reason.
30export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
31export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
32
2633PATH="$HOME/local/bin:$PATH" cmake .. \
2734 -DCMAKE_INSTALL_PREFIX="stage3-release" \
2835 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-linux-debug.sh+7
......@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
2626rm -rf build-debug
2727mkdir build-debug
2828cd build-debug
29
30# Override the cache directories because they won't actually help other CI runs
31# which will be testing alternate versions of zig, and ultimately would just
32# fill up space on the hard drive for no reason.
33export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
34export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
35
2936cmake .. \
3037 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
3138 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-linux-release.sh+7
......@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
2626rm -rf build-release
2727mkdir build-release
2828cd build-release
29
30# Override the cache directories because they won't actually help other CI runs
31# which will be testing alternate versions of zig, and ultimately would just
32# fill up space on the hard drive for no reason.
33export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
34export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
35
2936cmake .. \
3037 -DCMAKE_INSTALL_PREFIX="stage3-release" \
3138 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-macos.sh+8
......@@ -29,8 +29,16 @@ git config core.abbrev 9
2929git fetch --unshallow || true
3030git fetch --tags
3131
32rm -rf build
3233mkdir build
3334cd build
35
36# Override the cache directories because they won't actually help other CI runs
37# which will be testing alternate versions of zig, and ultimately would just
38# fill up space on the hard drive for no reason.
39export ZIG_GLOBAL_CACHE_DIR="$(pwd)/zig-global-cache"
40export ZIG_LOCAL_CACHE_DIR="$(pwd)/zig-local-cache"
41
3442cmake .. \
3543 -DCMAKE_INSTALL_PREFIX="stage3-release" \
3644 -DCMAKE_PREFIX_PATH="$PREFIX" \