Skip to content

Commit d186c68

Browse files
committed
Reduce disk usage in CI
Recently github appears to have reduced the available free disk space in actions runs, causing CI to fail with out of space errors. Here we simply run `cargo clean` a few times in CI to reduce our disk usage somewhat.
1 parent 2c51080 commit d186c68

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
shellcheck ci/ci-tests.sh
5252
- name: Run CI script
5353
shell: bash # Default on Winblows is powershell
54-
run: ./ci/ci-tests.sh
54+
run: CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
5555

5656
coverage:
5757
strategy:

ci/ci-tests.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ if [ "$RUSTC_MINOR_VERSION" -gt 55 ]; then
8080
echo -e "\n\nTest Custom Message Macros"
8181
pushd lightning-custom-message
8282
cargo test --verbose --color always
83+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
8384
popd
8485
fi
8586

@@ -130,17 +131,20 @@ else
130131
[ "$RUSTC_MINOR_VERSION" -lt 60 ] && cargo update -p memchr --precise "2.5.0" --verbose
131132
cargo check --verbose --color always
132133
fi
134+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
133135
popd
134136

135137
# Test that we can build downstream code with only the "release pins".
136138
pushd msrv-no-dev-deps-check
137139
PIN_RELEASE_DEPS
138140
cargo check
141+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
139142
popd
140143

141144
if [ -f "$(which arm-none-eabi-gcc)" ]; then
142145
pushd no-std-check
143146
cargo build --target=thumbv7m-none-eabi
147+
[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean
144148
popd
145149
fi
146150

0 commit comments

Comments
 (0)