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"...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
26rm -rf build-debug26rm -rf build-debug
27mkdir build-debug27mkdir build-debug
28cd build-debug28cd 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
29cmake .. \36cmake .. \
30 -DCMAKE_INSTALL_PREFIX="stage3-debug" \37 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \38 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/aarch64-linux-release.sh+7
...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
26rm -rf build-release26rm -rf build-release
27mkdir build-release27mkdir build-release
28cd build-release28cd 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
29cmake .. \36cmake .. \
30 -DCMAKE_INSTALL_PREFIX="stage3-release" \37 -DCMAKE_INSTALL_PREFIX="stage3-release" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \38 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/aarch64-macos.sh+7
...@@ -23,6 +23,13 @@ git fetch --tags...@@ -23,6 +23,13 @@ git fetch --tags
2323
24mkdir build24mkdir build
25cd build25cd 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
26PATH="$HOME/local/bin:$PATH" cmake .. \33PATH="$HOME/local/bin:$PATH" cmake .. \
27 -DCMAKE_INSTALL_PREFIX="stage3-release" \34 -DCMAKE_INSTALL_PREFIX="stage3-release" \
28 -DCMAKE_PREFIX_PATH="$PREFIX" \35 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-linux-debug.sh+7
...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
26rm -rf build-debug26rm -rf build-debug
27mkdir build-debug27mkdir build-debug
28cd build-debug28cd 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
29cmake .. \36cmake .. \
30 -DCMAKE_INSTALL_PREFIX="stage3-debug" \37 -DCMAKE_INSTALL_PREFIX="stage3-debug" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \38 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-linux-release.sh+7
...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"...@@ -26,6 +26,13 @@ export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
26rm -rf build-release26rm -rf build-release
27mkdir build-release27mkdir build-release
28cd build-release28cd 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
29cmake .. \36cmake .. \
30 -DCMAKE_INSTALL_PREFIX="stage3-release" \37 -DCMAKE_INSTALL_PREFIX="stage3-release" \
31 -DCMAKE_PREFIX_PATH="$PREFIX" \38 -DCMAKE_PREFIX_PATH="$PREFIX" \
ci/x86_64-macos.sh+8
...@@ -29,8 +29,16 @@ git config core.abbrev 9...@@ -29,8 +29,16 @@ git config core.abbrev 9
29git fetch --unshallow || true29git fetch --unshallow || true
30git fetch --tags30git fetch --tags
3131
32rm -rf build
32mkdir build33mkdir build
33cd build34cd 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
34cmake .. \42cmake .. \
35 -DCMAKE_INSTALL_PREFIX="stage3-release" \43 -DCMAKE_INSTALL_PREFIX="stage3-release" \
36 -DCMAKE_PREFIX_PATH="$PREFIX" \44 -DCMAKE_PREFIX_PATH="$PREFIX" \