Repository navigation
Restore aarch64-apple-1 jobs with free disk space #165251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
67300e3
Mostly restore apple jobs
JonathanBrouwer 5f83957
ci: increase free disk space on macos-26 jobs
ubiratansoares fca1932
ci: add minor improvements to scripts
ubiratansoares 009ca55
ci: restore macos-26 jobs
ubiratansoares 44acbcf
ci: output df stats before and after clean-up
ubiratansoares 547b0bb
ci: free disk space also on macos-15
ubiratansoares 3b0fcf6
Remove the `-2` jobs
JonathanBrouwer 33b5a0d
Fix allocator flag
JonathanBrouwer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail | ||
| # ignore-tidy-file-linelength | ||
|
|
||
| # Free disk space on macOS GitHub action runners | ||
| # Achieved by removing all iOS simulator instance files and runtime images | ||
| # See https://developer.apple.com/documentation/xcode/xcode-command-line-tool-reference#Manage-the-Simulator | ||
|
|
||
| echo "Before clean-up:" | ||
| df -h | ||
|
|
||
| echo "deleting iOS simulator instance files and runtime images" | ||
|
|
||
| space_before=$(df -k "$GITHUB_WORKSPACE" | awk 'NR == 2 {print $4}') | ||
|
|
||
| xcrun simctl shutdown all | ||
| xcrun simctl delete all | ||
|
|
||
| # This subcommand runs asynchronously | ||
| xcrun simctl runtime delete all | ||
|
|
||
| # 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 -e 'length') | ||
| echo "Remaining simulator runtime images: $remaining" | ||
|
|
||
| if [[ "$remaining" == 0 ]]; then | ||
| break | ||
| fi | ||
| sleep 2 | ||
| done | ||
|
|
||
| if [[ "$remaining" != 0 ]]; then | ||
| echo "::warning::Simulator runtime deletion did not finish within the polling period." | ||
| fi | ||
|
|
||
| # Report net increase in available disk space | ||
| space_after=$(df -k "$GITHUB_WORKSPACE" | awk 'NR == 2 {print $4}') | ||
| extra_space=$(awk -v b="$space_before" -v a="$space_after" 'BEGIN { printf "%.2f", (a - b) / 1048576 }') | ||
| echo "Increase in available disk space: $extra_space GiB" | ||
|
|
||
| echo "After clean-up:" | ||
| df -h |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
| set -euo pipefail | ||
|
|
||
| script_dir=$(cd -- "$(dirname -- "$0")" && pwd) | ||
|
|
||
| # dispatch according to the Github Runner | ||
| case "${RUNNER_OS:-}" in | ||
| Linux) | ||
| exec "${script_dir}/free-disk-space-linux.sh" | ||
| ;; | ||
| macOS) | ||
| exec "${script_dir}/free-disk-space-mac.sh" | ||
| ;; | ||
| *) | ||
| echo "::error:: freeing disk space not supported for: '${RUNNER_OS:-unset}'" | ||
| exit 1 | ||
| ;; | ||
| esac |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.