Skip to content

ci(free-disk-space): remove more tools and fix warnings#155958

Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
marcoieni:ci-remove-edge-chrome-and-more
Apr 30, 2026
Merged

ci(free-disk-space): remove more tools and fix warnings#155958
rust-bors[bot] merged 1 commit intorust-lang:mainfrom
marcoieni:ci-remove-edge-chrome-and-more

Conversation

@marcoieni
Copy link
Copy Markdown
Member

@marcoieni marcoieni commented Apr 29, 2026

With this PR I remove more space and improve the free-disk-space-linux script.
If you prefer me to split this PR into multiple ones, let me know.

Discussed in #t-infra > some jobs running out of disk space

Test

I tested this change in marcoieni/actions-test@196ce70. As you can see the workflows run without warnings, which ensures that we can remove all the space possible from the arm runners.

I also tested this change in this repository, by commenting out the mechanism to skip disk cleanup in case there is sufficient available disk space. ( see 86529fb )
If I don't comment out the code, it can happen that the CI skips the code I edited because there's enough disk space in the runners that this CI is running.

Here's the change of that commit:

# sufficientSpaceEarlyExit
# checkAlternative

Storage saved

In that temporary commit, I measured how much we are saving. It looks like this PR saves ~2GB:

@rustbot rustbot added A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Apr 29, 2026
# Remove Docker images.
# Ubuntu 22 runners have docker images already installed.
# They aren't present in ubuntu 24 runners.
# Remove preinstalled Docker images.
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed this comment because there are some docker images in ubuntu 24 as well.

View changes since the review

@marcoieni marcoieni changed the title ci: remove edge, chrome and other tools to free disk space ci(free-disk-space): remove more tools and fix warnings Apr 29, 2026
@marcoieni marcoieni force-pushed the ci-remove-edge-chrome-and-more branch from 5a7dd95 to e5493ea Compare April 29, 2026 08:22
)

# Paths only present in x86 runners
local github_runner_x86_paths=(
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I extracted these paths from the array above because they are not present in arm. Trying to remove them was emitting a warning.

View changes since the review

)
local x86_only_packages=(
'google-chrome-stable'
'microsoft-edge-stable'
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

edge and the new packages from temurin to skopeo are new (they weren't removed before)

View changes since the review

Comment on lines +136 to +140
# Microsoft Edge and powershell
"/opt/microsoft"

"/opt/pipx"
"/opt/pipx_bin"
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These paths are new

View changes since the review

if [ -z "$images" ]; then
echo "=> No docker images to remove."
return
fi
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Attempting to remove all docker images when there were none, produced a warning (because the measured saved space was less than zero)

View changes since the review

sufficientSpaceEarlyExit() {
local available_space_kb=$(df -k . --output=avail | tail -n 1)
local available_space_kb
available_space_kb=$(df -k . --output=avail | tail -n 1)
Copy link
Copy Markdown
Member Author

@marcoieni marcoieni Apr 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here and below I fixed a shellcheck lint that suggested to declare the variable before assigning it

View changes since the review

@marcoieni marcoieni marked this pull request as ready for review April 29, 2026 08:37
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 29, 2026
@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 29, 2026
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 29, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: infra-ci
  • infra-ci expanded to Kobzol, Mark-Simulacrum, jdno, jieyouxu, marcoieni
  • Random selection from Mark-Simulacrum, jdno, jieyouxu

@marcoieni marcoieni marked this pull request as draft April 29, 2026 08:46
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2026
@marcoieni
Copy link
Copy Markdown
Member Author

marcoieni commented Apr 29, 2026

image The CI was successful, I'm reverting the commit 86529fb

@marcoieni marcoieni force-pushed the ci-remove-edge-chrome-and-more branch from 86529fb to e5493ea Compare April 29, 2026 10:54
@marcoieni marcoieni marked this pull request as ready for review April 29, 2026 10:55
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Apr 29, 2026
Copy link
Copy Markdown
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 29, 2026

📌 Commit e5493ea has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 29, 2026
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 29, 2026
…d-more, r=Mark-Simulacrum

ci(free-disk-space): remove more tools and fix warnings

With this PR I remove more space and improve the free-disk-space-linux script.
If you prefer me to split this PR into multiple ones, let me know.

Discussed in [#t-infra > some jobs running out of disk space](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/some.20jobs.20running.20out.20of.20disk.20space/with/591666099)

## Test

I tested this change in marcoieni/actions-test@196ce70. As you can see the workflows run without warnings, which ensures that we can remove all the space possible from the arm runners.

I also tested this change in this repository, by commenting out the mechanism to skip disk cleanup in case there is sufficient available disk space. ( see rust-lang@86529fb )
If I don't comment out the code, it can happen that the CI skips the code I edited because there's enough disk space in the runners that this CI is running.

Here's the change of that commit:

```
# sufficientSpaceEarlyExit
# checkAlternative
```

## Storage saved

In that temporary commit, I measured how much we are saving. It looks like this PR saves ~2GB:

* Before this PR, from https://github.com/rust-lang/rust/actions/runs/25082499114/job/73490814240: `Total saved: Saved   35GiB`
* In this PR, from https://github.com/rust-lang/rust/actions/runs/25099446145/job/73544774148: `Total saved: Saved   37GiB`
rust-bors Bot pushed a commit that referenced this pull request Apr 29, 2026
…uwer

Rollup of 12 pull requests

Successful merges:

 - #155189 (simd_reduce_min/max: remove float support)
 - #155721 (When archive format is wrong produce an error instead of ICE)
 - #155794 (privacy: share effective visibility initialization)
 - #155856 (std_detect: support detecting more features on aarch64 Windows)
 - #155861 (Suggest `[const] Trait` bounds in more places)
 - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug)
 - #155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target)
 - #155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. )
 - #155950 (use the new `//@ needs-asm-mnemonic: ret` more)
 - #155958 (ci(free-disk-space): remove more tools and fix warnings)
 - #155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`)
 - #155951 (Make `FlatMapInPlaceVec` an unsafe trait.)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Apr 29, 2026
…d-more, r=Mark-Simulacrum

ci(free-disk-space): remove more tools and fix warnings

With this PR I remove more space and improve the free-disk-space-linux script.
If you prefer me to split this PR into multiple ones, let me know.

Discussed in [#t-infra > some jobs running out of disk space](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/some.20jobs.20running.20out.20of.20disk.20space/with/591666099)

## Test

I tested this change in marcoieni/actions-test@196ce70. As you can see the workflows run without warnings, which ensures that we can remove all the space possible from the arm runners.

I also tested this change in this repository, by commenting out the mechanism to skip disk cleanup in case there is sufficient available disk space. ( see rust-lang@86529fb )
If I don't comment out the code, it can happen that the CI skips the code I edited because there's enough disk space in the runners that this CI is running.

Here's the change of that commit:

```
# sufficientSpaceEarlyExit
# checkAlternative
```

## Storage saved

In that temporary commit, I measured how much we are saving. It looks like this PR saves ~2GB:

* Before this PR, from https://github.com/rust-lang/rust/actions/runs/25082499114/job/73490814240: `Total saved: Saved   35GiB`
* In this PR, from https://github.com/rust-lang/rust/actions/runs/25099446145/job/73544774148: `Total saved: Saved   37GiB`
rust-bors Bot pushed a commit that referenced this pull request Apr 29, 2026
…uwer

Rollup of 22 pull requests

Successful merges:

 - #154149 (resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities)
 - #155189 (simd_reduce_min/max: remove float support)
 - #155453 (apply Cortex-A53 errata 843419 mitigation to the AArch64 Linux targets)
 - #155562 (Add a missing `GenericTypeVisitable`, and avoid having interner traits for `FnSigKind` and `Abi`)
 - #155608 (rustc_middle: Implement the `partial_cmp` operation for `DefId`s)
 - #155721 (When archive format is wrong produce an error instead of ICE)
 - #155794 (privacy: share effective visibility initialization)
 - #155832 (c-variadic: more precise compatibility check in const-eval)
 - #155856 (std_detect: support detecting more features on aarch64 Windows)
 - #155861 (Suggest `[const] Trait` bounds in more places)
 - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug)
 - #155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target)
 - #155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. )
 - #155950 (use the new `//@ needs-asm-mnemonic: ret` more)
 - #155958 (ci(free-disk-space): remove more tools and fix warnings)
 - #155966 (miri subtree update)
 - #155711 (bump curl-sys and openssl-sys to support OpenSSL 4.0.x)
 - #155831 (Add `AcceptContext::expect_key_value`)
 - #155877 (Avoid misleading return-type note for foreign `Fn` callees)
 - #155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`)
 - #155951 (Make `FlatMapInPlaceVec` an unsafe trait.)
 - #155967 (Fix `doc_cfg` feature for extern items)
rust-bors Bot pushed a commit that referenced this pull request Apr 29, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - #155966 (miri subtree update)
 - #154149 (resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities)
 - #155189 (simd_reduce_min/max: remove float support)
 - #155562 (Add a missing `GenericTypeVisitable`, and avoid having interner traits for `FnSigKind` and `Abi`)
 - #155608 (rustc_middle: Implement the `partial_cmp` operation for `DefId`s)
 - #155721 (When archive format is wrong produce an error instead of ICE)
 - #155794 (privacy: share effective visibility initialization)
 - #155832 (c-variadic: more precise compatibility check in const-eval)
 - #155856 (std_detect: support detecting more features on aarch64 Windows)
 - #155861 (Suggest `[const] Trait` bounds in more places)
 - #155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug)
 - #155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target)
 - #155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. )
 - #155950 (use the new `//@ needs-asm-mnemonic: ret` more)
 - #155958 (ci(free-disk-space): remove more tools and fix warnings)
 - #155711 (bump curl-sys and openssl-sys to support OpenSSL 4.0.x)
 - #155831 (Add `AcceptContext::expect_key_value`)
 - #155877 (Avoid misleading return-type note for foreign `Fn` callees)
 - #155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`)
 - #155951 (Make `FlatMapInPlaceVec` an unsafe trait.)
 - #155967 (Fix `doc_cfg` feature for extern items)
@rust-bors rust-bors Bot merged commit 2fdbc8b into rust-lang:main Apr 30, 2026
13 of 22 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 30, 2026
rust-timer added a commit that referenced this pull request Apr 30, 2026
Rollup merge of #155958 - marcoieni:ci-remove-edge-chrome-and-more, r=Mark-Simulacrum

ci(free-disk-space): remove more tools and fix warnings

With this PR I remove more space and improve the free-disk-space-linux script.
If you prefer me to split this PR into multiple ones, let me know.

Discussed in [#t-infra > some jobs running out of disk space](https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/some.20jobs.20running.20out.20of.20disk.20space/with/591666099)

## Test

I tested this change in marcoieni/actions-test@196ce70. As you can see the workflows run without warnings, which ensures that we can remove all the space possible from the arm runners.

I also tested this change in this repository, by commenting out the mechanism to skip disk cleanup in case there is sufficient available disk space. ( see 86529fb )
If I don't comment out the code, it can happen that the CI skips the code I edited because there's enough disk space in the runners that this CI is running.

Here's the change of that commit:

```
# sufficientSpaceEarlyExit
# checkAlternative
```

## Storage saved

In that temporary commit, I measured how much we are saving. It looks like this PR saves ~2GB:

* Before this PR, from https://github.com/rust-lang/rust/actions/runs/25082499114/job/73490814240: `Total saved: Saved   35GiB`
* In this PR, from https://github.com/rust-lang/rust/actions/runs/25099446145/job/73544774148: `Total saved: Saved   37GiB`
pull Bot pushed a commit to LeeeeeeM/miri that referenced this pull request Apr 30, 2026
…uwer

Rollup of 21 pull requests

Successful merges:

 - rust-lang/rust#155966 (miri subtree update)
 - rust-lang/rust#154149 (resolve: Extend `ambiguous_import_visibilities` deprecation lint to glob-vs-glob ambiguities)
 - rust-lang/rust#155189 (simd_reduce_min/max: remove float support)
 - rust-lang/rust#155562 (Add a missing `GenericTypeVisitable`, and avoid having interner traits for `FnSigKind` and `Abi`)
 - rust-lang/rust#155608 (rustc_middle: Implement the `partial_cmp` operation for `DefId`s)
 - rust-lang/rust#155721 (When archive format is wrong produce an error instead of ICE)
 - rust-lang/rust#155794 (privacy: share effective visibility initialization)
 - rust-lang/rust#155832 (c-variadic: more precise compatibility check in const-eval)
 - rust-lang/rust#155856 (std_detect: support detecting more features on aarch64 Windows)
 - rust-lang/rust#155861 (Suggest `[const] Trait` bounds in more places)
 - rust-lang/rust#155899 (`dlltool`: Set the working directory to workaround `--temp-prefix` bug)
 - rust-lang/rust#155916 (Update with new LLVM 22 target for `wasm32-wali-linux-musl` target)
 - rust-lang/rust#155935 (remap OUT_DIR paths to fix build script path leakage in crate metadata. )
 - rust-lang/rust#155950 (use the new `//@ needs-asm-mnemonic: ret` more)
 - rust-lang/rust#155958 (ci(free-disk-space): remove more tools and fix warnings)
 - rust-lang/rust#155711 (bump curl-sys and openssl-sys to support OpenSSL 4.0.x)
 - rust-lang/rust#155831 (Add `AcceptContext::expect_key_value`)
 - rust-lang/rust#155877 (Avoid misleading return-type note for foreign `Fn` callees)
 - rust-lang/rust#155949 (Update `opt_ast_lowering_delayed_lints` query to allow "stealing" lints, allowing to use `FnOnce` instead of `Fn`)
 - rust-lang/rust#155951 (Make `FlatMapInPlaceVec` an unsafe trait.)
 - rust-lang/rust#155967 (Fix `doc_cfg` feature for extern items)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants