fix: clear out space on ubuntu runners before running Rust tests (#7678)

When I put up https://github.com/openai/codex/pull/7617 for review,
initially I started seeing failures on the `ubuntu-24.04` runner used
for Rust test runs for the `x86_64-unknown-linux-gnu` architecture. Chat
suggested a number of things that could be removed to save space, which
seems to help.
This commit is contained in:
Michael Bolin 2025-12-06 21:46:07 -08:00 committed by GitHub
parent b2cb05d562
commit 7386e2efbc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -369,6 +369,22 @@ jobs:
steps:
- uses: actions/checkout@v6
# We have been running out of space when running this job on Linux for
# x86_64-unknown-linux-gnu, so remove some unnecessary dependencies.
- name: Remove unnecessary dependencies to save space
if: ${{ startsWith(matrix.runner, 'ubuntu') }}
shell: bash
run: |
set -euo pipefail
sudo rm -rf \
/usr/local/lib/android \
/usr/share/dotnet \
/usr/local/share/boost \
/usr/local/lib/node_modules \
/opt/ghc
sudo apt-get remove -y docker.io docker-compose podman buildah
- uses: dtolnay/rust-toolchain@1.90
with:
targets: ${{ matrix.target }}