Skip to content

Commit a6c42d7

Browse files
committed
Stop the Linux CI job running out of disk, and cut its runtime
The ubuntu-latest job has been failing since at least 1 Aug, on unrelated dependabot PRs as well. The annotation is Unhandled exception. System.IO.IOException: No space left on device : '.../actions-runner/extracted/_diag/Worker_....log' The runner died writing its own diagnostic log, which is why the step logs are absent and the job's steps are still reported as in_progress. Three profiles of the same rattler-scale tree accumulate in rust/target before the existing `rm -rf rust/target` mitigation runs: debug from the editable install, instrumented from coverage, and release from `make build`. Locally that directory reaches 7.0G without a coverage run. - Free disk space: drops the unused Android/dotnet/GHC/Swift toolchains. Taken verbatim from the upstream template, which added it in b93abda after hitting the identical failure on another project; it reported free space going from 7G to 30G. nepenthe is 68 commits behind the template and its scheduled copier update has been failing, so it never received this. - Build: skipped on Linux. `make dist-rs` runs the same `cargo build --release`, and cibuildwheel then rebuilds from scratch in the manylinux container, so this was a third compile of the same tree and a third copy of it on disk. Still runs on macOS and Windows, where nothing else covers it. - cargo-nextest / cargo-llvm-cov: installed as prebuilt binaries rather than compiled from source on every run. `cargo install --force` rebuilt them unconditionally; nextest alone took 9m35s of the 24m dependency step. The make target now skips them when they are already on PATH, so it no longer undoes the prebuilt install, and repeat local runs get the same saving.
1 parent e0e918e commit a6c42d7

2 files changed

Lines changed: 21 additions & 2 deletions

File tree

.github/workflows/build.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,14 @@ jobs:
4545

4646
- uses: actions-ext/rust/setup@main
4747

48+
# `make develop` compiles these from source otherwise, ~10 minutes a run.
49+
# These are the prebuilt binaries; the Makefile skips its own install when
50+
# they are already on PATH.
51+
- name: Install cargo tools
52+
uses: taiki-e/install-action@cb33e69fad06166ca28a42b2575e4dadabf62ee8 # v2.85.8
53+
with:
54+
tool: cargo-nextest,cargo-llvm-cov
55+
4856
- name: Install dependencies
4957
run: make develop
5058

@@ -55,8 +63,12 @@ jobs:
5563
run: make checks
5664
if: matrix.os == 'ubuntu-latest'
5765

66+
# On Linux `make dist-rs` rebuilds this same release profile, and
67+
# cibuildwheel then rebuilds the tree again from scratch in the manylinux
68+
# container, so building here is a third compile and a third copy on disk.
5869
- name: Build
5970
run: make build
71+
if: matrix.os != 'ubuntu-latest'
6072

6173
- name: Test
6274
run: make coverage
@@ -85,6 +97,13 @@ jobs:
8597
platforms: all
8698
if: runner.os == 'Linux' && runner.arch == 'X64'
8799

100+
- name: Free disk space
101+
run: |
102+
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc /usr/local/.ghcup /usr/share/swift
103+
df -h /
104+
shell: bash
105+
if: matrix.os == 'ubuntu-latest'
106+
88107
- name: Make dist (Linux)
89108
run: |
90109
rm -rf dist

rust/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
requirements: ## install required dev dependencies
44
rustup component add rustfmt
55
rustup component add clippy
6-
cargo install --locked --force cargo-nextest
7-
cargo install --force cargo-llvm-cov
6+
command -v cargo-nextest >/dev/null || cargo install --locked cargo-nextest
7+
command -v cargo-llvm-cov >/dev/null || cargo install cargo-llvm-cov
88

99
develop: requirements ## install required dev dependencies
1010

0 commit comments

Comments
 (0)