ci(free-disk-space): remove more tools and fix warnings#155958
ci(free-disk-space): remove more tools and fix warnings#155958rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
| # Remove Docker images. | ||
| # Ubuntu 22 runners have docker images already installed. | ||
| # They aren't present in ubuntu 24 runners. | ||
| # Remove preinstalled Docker images. |
There was a problem hiding this comment.
Removed this comment because there are some docker images in ubuntu 24 as well.
5a7dd95 to
e5493ea
Compare
| ) | ||
|
|
||
| # Paths only present in x86 runners | ||
| local github_runner_x86_paths=( |
There was a problem hiding this comment.
I extracted these paths from the array above because they are not present in arm. Trying to remove them was emitting a warning.
| ) | ||
| local x86_only_packages=( | ||
| 'google-chrome-stable' | ||
| 'microsoft-edge-stable' |
There was a problem hiding this comment.
edge and the new packages from temurin to skopeo are new (they weren't removed before)
| # Microsoft Edge and powershell | ||
| "/opt/microsoft" | ||
|
|
||
| "/opt/pipx" | ||
| "/opt/pipx_bin" |
There was a problem hiding this comment.
These paths are new
| if [ -z "$images" ]; then | ||
| echo "=> No docker images to remove." | ||
| return | ||
| fi |
There was a problem hiding this comment.
Attempting to remove all docker images when there were none, produced a warning (because the measured saved space was less than zero)
| 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) |
There was a problem hiding this comment.
here and below I fixed a shellcheck lint that suggested to declare the variable before assigning it
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
The CI was successful, I'm reverting the commit 86529fb
|
86529fb to
e5493ea
Compare
…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`
…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.)
…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`
…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)
…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)
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`
…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)

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:
Storage saved
In that temporary commit, I measured how much we are saving. It looks like this PR saves ~2GB:
Total saved: Saved 35GiBTotal saved: Saved 37GiB