Repository navigation
ci: increase free disk space on macos-26 jobs - #165148
ubiratansoares wants to merge 5 commits into
Conversation
|
@bors try jobs=test-aarch64-apple-macos-26-* |
ci: increase free disk space on macos-26 jobs try-job: test-aarch64-apple-macos-26-*
This comment has been minimized.
This comment has been minimized.
| done | ||
|
|
||
| if [[ "$remaining" != 0 ]]; then | ||
| echo "::warning::Runtime deletion did not finish within the polling period." |
There was a problem hiding this comment.
Nit:
| echo "::warning::Runtime deletion did not finish within the polling period." | |
| echo "::warning::Simlator runtime deletion did not finish within the polling period." |
| script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) | ||
|
|
||
| # dispatch according to the Github Runner | ||
| case "${RUNNER_OS:-}" in |
There was a problem hiding this comment.
Nit: Would it make sense to do uname here instead? That isn't GH-specific, so easier to understand IMO.
There was a problem hiding this comment.
I think we could use uname, but matching against one of the default GHA env vars does not look terrible.
| # Wait a max of 60 seconds to ensure the clean-up is done before any subsequential build steps | ||
| for ((attempt = 0; attempt < 30; attempt++)); do | ||
| remaining=$(xcrun simctl runtime list -j | jq 'length') | ||
| echo "Remaining runtime iOS simulator images : $remaining" |
There was a problem hiding this comment.
Nit: It's not just iOS simulator images.
| echo "Remaining runtime iOS simulator images : $remaining" | |
| echo "Remaining simulator runtime images : $remaining" |
There was a problem hiding this comment.
Also goes for the top-level comment.
| #!/bin/bash | ||
| set -euo pipefail | ||
|
|
||
| script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) |
There was a problem hiding this comment.
Nit: My bash-fu isn't strong... But I see that musl.sh uses:
SCRIPT_DIR=$(cd -- "$(dirname -- "$0")" && pwd)
What's the benefit to either? If you have no preference, then I'd prefer $0 just for consistency with our other shell scripts.
There was a problem hiding this comment.
I think "${BASH_SOURCE[0]}" works better if for some reason one wants to source this file within a bash environment, but maybe I'm missing something. I did some research and, for the current usage, "$0" and "${BASH_SOURCE[0]}" should be same, hence opted for consistency here
| xcrun simctl delete all | ||
|
|
||
| # This subcommand runs asynchronously | ||
| xcrun simctl runtime delete all |
There was a problem hiding this comment.
Remark: I'm a little bit hesitant to do this, since I have vague plans for running CI on the simulators... But I guess it's more important that CI actually runs, and I can probably tweak this script in the future to keep a few runtime images around.
There was a problem hiding this comment.
Thanks for sharing your concern! Happy to improve this later!
There was a problem hiding this comment.
we could also delete other stuff in the future instead of what you need 👍
This comment has been minimized.
This comment has been minimized.
f35f96e to
2a6ff6c
Compare
|
@bors try jobs=test-aarch64-apple-macos-26-* |
This comment has been minimized.
This comment has been minimized.
ci: increase free disk space on macos-26 jobs try-job: test-aarch64-apple-macos-26-*
| xcrun simctl delete all | ||
|
|
||
| # This subcommand runs asynchronously | ||
| xcrun simctl runtime delete all |
There was a problem hiding this comment.
we could also delete other stuff in the future instead of what you need 👍
|
Overall looks good, feel free to r=me when you are happy with this 👍 |
|
Warning If you are changing how CI LLVM is built or linked, make sure to bump cc @jieyouxu |
|
Feel free to r=me. |
|
Lets move with this :) @bors r=marcoieni |
…pace, r=marcoieni ci: increase free disk space on macos-26 jobs ## AI/LLM disclosure I wrote changes introduced by this single commit by hand. I used an LLM to ideate about changes, and also to review the code before submitting. I used both gpt6/astra and claude 5.5/opus as assistants. ## What A potential fix for rust-lang/infra-team#307 and a follow-up for rust-lang#165123. Here we introduce a dedicated script to free disk space on macOS Github runners. We do minimal changes to invoke this script accordingly from the CI Workflow. The new script works by deleting iOS simulator instance files and runtimes. I assumed these components are not needed and therefore, safe to delete. I ran a few related experiments [in this repo](https://github.com/ubiratansoares/macos-runners-disk-space-tests/actions/runs/40911961033). For `macos-26` this script reclaims ~ 120GB of space. That repo also tests most of `free-disk-space-mac.sh` behavior. I added a waiting logic after `xcrun simctl runtime delete all` (which runs asyncly) because in general this command finishes fast (less than 30 seconds) and the script can correctly calculate how much disk space was freed afterwards. I did not try to replicate the same funcionality available in the existing Linux couterpart of this script, e.g. earlier finishing if some amount of space is already available. I assume that can be a follow-up. r? marcoieni
…uwer Rollup of 22 pull requests Successful merges: - #164851 (Add behavior tests for `Arc` and `Rc`) - #164989 (rustdoc: Fix performance regression for private documented items) - #165079 (Remove GenericArgRef) - #161781 (Don't emit InlineAsm terminator if input operand is `!`.) - #162754 (optimize large elements for slice rotating) - #163252 (Remove windows-targets dependency from the root workspace) - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`) - #165104 (Use getrandom instead of /scheme/rand on Redox OS) - #165132 (Implement `advance_back_by` on `Fuse`) - #165142 (Remove the unused generic Graphviz writer) - #165148 (ci: increase free disk space on macos-26 jobs) - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output) - #163802 (fix RegionEq direction in canonical query responses) - #163986 (omit unconditionally invoking crate level limits query) - #164920 (Point at prior token on `let` when expression is expected) - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop) - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols) - #165114 (use native interpreter impl for funnel shifts intrinsics) - #165119 (remove unnecessary fast path from borrowck) - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX) - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`) - #165129 (Fix ICE in prelude edition lint) Failed merges: - #164981 (Reflection add TypeId::name) > [!WARNING] > This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
|
@bors p=1 |
…uwer Rollup of 22 pull requests Successful merges: - #164851 (Add behavior tests for `Arc` and `Rc`) - #164989 (rustdoc: Fix performance regression for private documented items) - #165079 (Remove GenericArgRef) - #161781 (Don't emit InlineAsm terminator if input operand is `!`.) - #162754 (optimize large elements for slice rotating) - #163252 (Remove windows-targets dependency from the root workspace) - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`) - #165104 (Use getrandom instead of /scheme/rand on Redox OS) - #165132 (Implement `advance_back_by` on `Fuse`) - #165142 (Remove the unused generic Graphviz writer) - #165148 (ci: increase free disk space on macos-26 jobs) - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output) - #163802 (fix RegionEq direction in canonical query responses) - #163986 (omit unconditionally invoking crate level limits query) - #164920 (Point at prior token on `let` when expression is expected) - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop) - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols) - #165114 (use native interpreter impl for funnel shifts intrinsics) - #165119 (remove unnecessary fast path from borrowck) - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX) - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`) - #165129 (Fix ICE in prelude edition lint) Failed merges: - #164981 (Reflection add TypeId::name) > [!WARNING] > This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
…uwer Rollup of 22 pull requests Successful merges: - #164851 (Add behavior tests for `Arc` and `Rc`) - #164989 (rustdoc: Fix performance regression for private documented items) - #165079 (Remove GenericArgRef) - #161781 (Don't emit InlineAsm terminator if input operand is `!`.) - #162754 (optimize large elements for slice rotating) - #163252 (Remove windows-targets dependency from the root workspace) - #163839 (Fix the floating point clobbers of RISC-V `clobber_abi`) - #165104 (Use getrandom instead of /scheme/rand on Redox OS) - #165132 (Implement `advance_back_by` on `Fuse`) - #165142 (Remove the unused generic Graphviz writer) - #165148 (ci: increase free disk space on macos-26 jobs) - #163371 (Don't suggest replacing foreign format specifiers in `concat!` output) - #163802 (fix RegionEq direction in canonical query responses) - #163986 (omit unconditionally invoking crate level limits query) - #164920 (Point at prior token on `let` when expression is expected) - #164987 (use adt_async_drop_tys for nested ADTs in needs_async_drop) - #165061 (Use a fixed-length encoding for hash disambiguators in v0 symbols) - #165114 (use native interpreter impl for funnel shifts intrinsics) - #165119 (remove unnecessary fast path from borrowck) - #165122 (fix MaybeDangling validity logic for ZST at usize::MAX) - #165128 (Move `doc(keyword)` and `doc(attribute)` attributes checks from `rustc_passes` to `rustc_attr_parsing`) - #165129 (Fix ICE in prelude edition lint) Failed merges: - #164981 (Reflection add TypeId::name) > [!WARNING] > This rollup conflicts with pending auto build #165205 and may need to be recreated if the pending build succeeds.
|
This pull request was unapproved. This PR was contained in a rollup (#165208), which was unapproved. |
| RUST_CONFIGURE_ARGS: >- | ||
| --enable-sanitizers | ||
| --enable-profiler | ||
| --set rust.jemalloc |
There was a problem hiding this comment.
This should use --set build.allocator=jemalloc, ditto for other instances (rust.jemalloc is the old deprecated version)
There was a problem hiding this comment.
Non-blocking: should the mac equivalent also have an early exit if there's already estimated sufficient disk space?
rust/src/ci/scripts/free-disk-space-linux.sh
Lines 318 to 326 in eec3f1e
|
These commits were cherry-picked into #165251 |
… r=jieyouxu Restore aarch64-apple-1 jobs with free disk space The `apple-1` jobs seem to work with the free disk space script that I've copied from rust-lang#165148 Lets re-enable them The commits are cherry-picked from rust-lang#165148 without changes, plus a few added commits to disable the `-2` jobs again. r? ghost
… r=jieyouxu Restore aarch64-apple-1 jobs with free disk space The `apple-1` jobs seem to work with the free disk space script that I've copied from rust-lang#165148 Lets re-enable them The commits are cherry-picked from rust-lang#165148 without changes, plus a few added commits to disable the `-2` jobs again. r? ghost
Rollup merge of #165251 - JonathanBrouwer:undo-apple-remove, r=jieyouxu Restore aarch64-apple-1 jobs with free disk space The `apple-1` jobs seem to work with the free disk space script that I've copied from #165148 Lets re-enable them The commits are cherry-picked from #165148 without changes, plus a few added commits to disable the `-2` jobs again. r? ghost
View all comments
AI/LLM disclosure
I wrote changes introduced by this single commit by hand. I used an LLM to ideate about changes, and also to review the code before submitting. I used both gpt6/astra and claude 5.5/opus as assistants.
What
A potential fix for rust-lang/infra-team#307 and a follow-up for #165123.
Here we introduce a dedicated script to free disk space on macOS Github runners. We do minimal changes to invoke this script accordingly from the CI Workflow.
The new script works by deleting iOS simulator instance files and runtimes. I assumed these components are not needed and therefore, safe to delete.
I ran a few related experiments in this repo. For
macos-26this script reclaims ~ 120GB of space. That repo also tests most offree-disk-space-mac.shbehavior.I added a waiting logic after
xcrun simctl runtime delete all(which runs asyncly) because in general this command finishes fast (less than 30 seconds) and the script can correctly calculate how much disk space was freed afterwards.I did not try to replicate the same funcionality available in the existing Linux couterpart of this script, e.g. earlier finishing if some amount of space is already available. I assume that can be a follow-up.
r? marcoieni