Skip to content
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

ci: remove more unused files and directories in free runners #136535

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

marcoieni
Copy link
Member

@marcoieni marcoieni commented Feb 4, 2025

Before

From the mingw-check job in another PR:
image

After

From the mingw-check job in this PR:
image

try-job: aarch64-gnu
try-job: aarch64-gnu-debug

@rustbot
Copy link
Collaborator

rustbot commented Feb 4, 2025

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

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Feb 4, 2025
@marcoieni marcoieni force-pushed the free-runners-remove-more-dirs branch 4 times, most recently from 70ff14d to 8c7d76c Compare February 4, 2025 11:16
@marcoieni
Copy link
Member Author

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 4, 2025
…irs, r=<try>

ci: remove more unused files and directories in free runners

try-job: aarch64-gnu
@bors
Copy link
Contributor

bors commented Feb 4, 2025

⌛ Trying commit 8c7d76c with merge 13ce81b...

@bors
Copy link
Contributor

bors commented Feb 4, 2025

☀️ Try build successful - checks-actions
Build commit: 13ce81b (13ce81b18428322e8d4db038af49ad4526c60536)

@marcoieni
Copy link
Member Author

@rustbot ready

Copy link
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.

I'm wondering if we should be more aggressive here. For example, I could imagine that instead of listing out various binaries in /usr/local/bin and such, we'd instead try to delete everything except exactly what we need. On Linux at least presumably that "set of needed things" can be quite small, perhaps even not coming from GitHub at all. (e.g., use a minimal ubuntu docker image's contents as the base)

IIUC, it should be possible to create a mount point at (say) /mnt for /, rm -rf /, then (roughly) cp /mnt/minimal-root-base / or so.

I'm fine with playing whack a mole too, but it seems like a long journey...

r=me with nit fixed or not

@rustbot rustbot added has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
@rustbot

This comment has been minimized.

@marcoieni marcoieni force-pushed the free-runners-remove-more-dirs branch from 1b99813 to 51f28a6 Compare February 11, 2025 16:42
@rustbot rustbot removed has-merge-commits PR has merge commits, merge with caution. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 11, 2025
@marcoieni marcoieni force-pushed the free-runners-remove-more-dirs branch from 51f28a6 to 0cb224d Compare February 11, 2025 16:42
@marcoieni marcoieni force-pushed the free-runners-remove-more-dirs branch from 0cb224d to 7f38958 Compare February 11, 2025 16:47
@marcoieni
Copy link
Member Author

marcoieni commented Feb 11, 2025

I like the approach of specifying what files are needed instead of the unnecessary ones, but instead of applying to the whole ubuntu image, I would apply it to single directories where useful. E.g. we could list the binaries we need from the /usr/local/bin/ directory instead of listing the binaries we don't.

In theory this can also be applied to packages. E.g. list the packages you need and delete the ones that don't depend on them 💡

I'll merge this PR as it is, but I'll definitely keep in mind this principle for the next ones :)

@marcoieni
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Feb 11, 2025

⌛ Trying commit 7f38958 with merge b85d92a...

@jieyouxu
Copy link
Member

I'm wondering if we should be more aggressive here. For example, I could imagine that instead of listing out various binaries in /usr/local/bin and such, we'd instead try to delete everything except exactly what we need. On Linux at least presumably that "set of needed things" can be quite small, perhaps even not coming from GitHub at all. (e.g., use a minimal ubuntu docker image's contents as the base)

That honestly might be a good approach to make GHA environmental changes less likely to influence build/test outcomes (e.g. accidentally relying on something from GHA env that can change between image updates)

@bors
Copy link
Contributor

bors commented Feb 11, 2025

💔 Test failed - checks-actions

@bors bors 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 Feb 11, 2025
@marcoieni
Copy link
Member Author

weird github error

@bors try

@bors
Copy link
Contributor

bors commented Feb 12, 2025

⌛ Trying commit 7f38958 with merge 8496d5a...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
…irs, r=<try>

ci: remove more unused files and directories in free runners

try-job: aarch64-gnu
@bors
Copy link
Contributor

bors commented Feb 12, 2025

☀️ Try build successful - checks-actions
Build commit: 8496d5a (8496d5a75af53da3512bd9711768b91c2096ca76)

@marcoieni
Copy link
Member Author

@bors try

@bors
Copy link
Contributor

bors commented Feb 12, 2025

⌛ Trying commit 7f38958 with merge 72240b3...

bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 12, 2025
…irs, r=<try>

ci: remove more unused files and directories in free runners

try-job: aarch64-gnu
try-job: aarch64-gnu-debug
@bors
Copy link
Contributor

bors commented Feb 12, 2025

☀️ Try build successful - checks-actions
Build commit: 72240b3 (72240b3eee182202a6a46944a3c6a17880e639fd)

@marcoieni
Copy link
Member Author

@bors r=Mark-Simulacrum rollup=never

@bors
Copy link
Contributor

bors commented Feb 12, 2025

📌 Commit 7f38958 has been approved by Mark-Simulacrum

It is now in the queue for this repository.

@bors bors 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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 12, 2025
@bors
Copy link
Contributor

bors commented Feb 13, 2025

⌛ Testing commit 7f38958 with merge cfe9ffc...

@bors
Copy link
Contributor

bors commented Feb 13, 2025

☀️ Test successful - checks-actions
Approved by: Mark-Simulacrum
Pushing cfe9ffc to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Feb 13, 2025
@bors bors merged commit cfe9ffc into rust-lang:master Feb 13, 2025
7 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 13, 2025
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (cfe9ffc): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

This benchmark run did not return any relevant results for this metric.

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 788.14s -> 788.303s (0.02%)
Artifact size: 347.85 MiB -> 347.81 MiB (-0.01%)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc merged-by-bors This PR was explicitly merged by bors. 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.

6 participants