From d186c683b9954188d527b420fbb05cb0fa38eed8 Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Sat, 14 Oct 2023 18:41:34 +0000 Subject: [PATCH] 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. --- .github/workflows/build.yml | 2 +- ci/ci-tests.sh | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 45bd4d304..00ef76f78 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,7 +51,7 @@ jobs: shellcheck ci/ci-tests.sh - name: Run CI script shell: bash # Default on Winblows is powershell - run: ./ci/ci-tests.sh + run: CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh coverage: strategy: diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh index 6b89a98fd..c24f344f6 100755 --- a/ci/ci-tests.sh +++ b/ci/ci-tests.sh @@ -80,6 +80,7 @@ if [ "$RUSTC_MINOR_VERSION" -gt 55 ]; then echo -e "\n\nTest Custom Message Macros" pushd lightning-custom-message cargo test --verbose --color always + [ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean popd fi @@ -130,17 +131,20 @@ else [ "$RUSTC_MINOR_VERSION" -lt 60 ] && cargo update -p memchr --precise "2.5.0" --verbose cargo check --verbose --color always fi +[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean popd # Test that we can build downstream code with only the "release pins". pushd msrv-no-dev-deps-check PIN_RELEASE_DEPS cargo check +[ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean popd if [ -f "$(which arm-none-eabi-gcc)" ]; then pushd no-std-check cargo build --target=thumbv7m-none-eabi + [ "$CI_MINIMIZE_DISK_USAGE" != "" ] && cargo clean popd fi -- 2.39.5