From 6b376e6227df6c6ca81d5a829bdd251f5b1c4207 Mon Sep 17 00:00:00 2001 From: gopal tathe <44522021+techgopal@users.noreply.github.com> Date: Sun, 6 Dec 2026 15:45:08 +0100 Subject: [PATCH] ci: the release nightly's coverage run frees more runner disk and builds on /mnt when that is the roomier disk (nightly 47650416343 coverage: disk full) Signed-off-by: gopal tathe <44522021+techgopal@users.noreply.github.com> --- .github/workflows/nightly.yml | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index c997e1167e..73f34942b0 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -241,7 +241,21 @@ jobs: /usr/share/swift /usr/local/share/powershell /usr/local/share/chromium /usr/local/share/boost \ /opt/microsoft /opt/az /usr/lib/google-cloud-sdk /usr/lib/mono /usr/local/julia* /usr/local/graalvm \ /opt/hostedtoolcache/Java_* /opt/hostedtoolcache/Ruby /opt/hostedtoolcache/go /opt/hostedtoolcache/PyPy - df -h / + # 2026-12-06 (nightly 47650416343, release/0.3.1): full again, 31 MB left with 4,032 of 14,412 tests + # to go (instrumented build 114 GB, .profraw 10.7 GB, 122 GB free after the removals above). Also drop + # the preinstalled container images (a test that needs one pulls it), the swap file and SDKs no step + # uses, and put the instrumented build on /mnt when that is its own, roomier filesystem. + if command -v docker > /dev/null; then sudo docker image prune --all --force > /dev/null || true; fi + sudo swapoff -a || true + sudo rm -rf /mnt/swapfile /swapfile /opt/hostedtoolcache/node /usr/local/lib/node_modules /opt/google \ + /usr/lib/firefox /usr/local/aws-cli /usr/local/aws-sam-cli /usr/share/miniconda /opt/pipx \ + /usr/local/share/vcpkg /usr/local/lib/heroku + df -h / /mnt 2> /dev/null || df -h / + if [ -d /mnt ] && [ "$(stat -c %d /mnt)" != "$(stat -c %d /)" ] \ + && [ "$(df --output=avail /mnt | tail -1)" -gt "$(df --output=avail / | tail -1)" ]; then + sudo mkdir -p /mnt/llvm-cov-target && sudo chown "$(id -u):$(id -g)" /mnt/llvm-cov-target + echo "CARGO_LLVM_COV_TARGET_DIR=/mnt/llvm-cov-target" >> "$GITHUB_ENV" + fi # Pinned (`COVERAGE_NIGHTLY` in xtask/src/coverage.rs): the nightly of 2026-10-31 # cannot compile apache-avro 0.22 (async-drop cycle), which ended every run since. - name: Nightly toolchain with llvm-tools (branch coverage) @@ -270,8 +284,10 @@ jobs: if: always() run: | df -h / - du -sh target/llvm-cov-target target/llvm-cov-target/debug/deps target/llvm-cov-target/debug/build 2> /dev/null || true - find target/llvm-cov-target -maxdepth 1 -name '*.profraw' -printf '%s\n' 2> /dev/null \ + b="${CARGO_LLVM_COV_TARGET_DIR:-target/llvm-cov-target}" + df -h "$b" 2> /dev/null || true + du -sh "$b" "$b/debug/deps" "$b/debug/build" 2> /dev/null || true + find "$b" -maxdepth 1 -name '*.profraw' -printf '%s\n' 2> /dev/null \ | awk '{ n++; s += $1 } END { printf "profraw: %d files, %.1f GB\n", n, s / 1e9 }' - name: Per-crate summary run: cargo xtask coverage-summary --markdown | tee -a "$GITHUB_STEP_SUMMARY"