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

Download, rather than sccache-cache, LLVM in CI #99967

Merged
merged 4 commits into from
Aug 21, 2022

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented Jul 30, 2022

My hope/expectation is that we can do better than sccache in CI for cached builds -- currently it looks like on macOS those still take upwards of 10-11 minutes, which is a significant amount of time that we could potentially cut.

This enables this mode for all non-dist builders; this should avoid any problems with the artifacts we distribute, while also providing for faster test builders (since they'll make use of PGO'd LLVM on the platforms we do that on, which is hopefully a nice win). It slightly increases the chance of test builders starting to fail only after a PR is merged (if PGO changes runtime behavior), but that should hopefully never happen, so I think this is worthwhile.

Measurements on the PR for apple-1 don't show any noticeable improvement in CI times, but those can be pretty noisy -- I'm inclined to land this since it should pretty much always be better and we can reconsider if that ever turns out not to be the case.

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 30, 2022
@bors
Copy link
Contributor

bors commented Jul 31, 2022

☔ The latest upstream changes (presumably #99529) made this pull request unmergeable. Please resolve the merge conflicts.

@bors bors added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 31, 2022
@jyn514
Copy link
Member

jyn514 commented Jul 31, 2022

Noticed that this changed a bunch of different dockerfiles - I remember @pietroalbini suggesting a while ago that we could use named profiles (like the ones in x.py setup) for CI, maybe that would help reduce the burden here? I'm willing to put some time into that.

@Mark-Simulacrum
Copy link
Member Author

Note that this is just changing the CI config (we don't use docker on mac or windows).

Ultimately I think in this case if this works I'll stick it in src/ci/run.sh gated by isMacos or something like that, so I'm not too worried about this being gated on profiles of any kind.

@Mark-Simulacrum Mark-Simulacrum force-pushed the download-llvm-ci branch 2 times, most recently from a6c02e5 to 0dac895 Compare July 31, 2022 21:49
@rust-log-analyzer

This comment has been minimized.

@Mark-Simulacrum
Copy link
Member Author

r? @jyn514

This shouldn't be r+'d as is but I'll hold off on actually dropping the do not merge commit until we finish with any changes you suggest, so that we can actually test this change seems to work.

@Mark-Simulacrum Mark-Simulacrum 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 Aug 1, 2022
Copy link
Member

@jyn514 jyn514 left a comment

Choose a reason for hiding this comment

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

This is awesome! Would be very curious to see how much time it saves :)

It also makes me wonder if we can do the same for download-rustc - most PRs will modify compiler/, but we already have if-unchanged and I think @rylev has suggested "library only rollups" that would make it a lot more common to be able to reuse the cache. Future work though, llvm is already a great first step :)

src/bootstrap/config.rs Outdated Show resolved Hide resolved
src/ci/run.sh Outdated Show resolved Hide resolved
@jyn514
Copy link
Member

jyn514 commented Aug 1, 2022

It also makes me wonder if we can do the same for download-rustc

Related: I've been seeing various emails between Joel Marcey and @pietroalbini about how we use a truly enomous amount of S3 credits on static.rlo, I wonder if we could save in costs by redirecting downloads for rustc.tar.gz to the last time the tarball was modified, rather than reuploading it on each nightly. That seems maybe less worth the effort though, since usually some PR will modify compiler/ on any given day. Could maybe do it for other large components though, something to look into.

@Mark-Simulacrum Mark-Simulacrum force-pushed the download-llvm-ci branch 2 times, most recently from bf83297 to 28e70ad Compare August 1, 2022 12:38
@Mark-Simulacrum
Copy link
Member Author

Presuming CI passes I think this should be good for another review and presuming that looks good, I'll drop the apple-1 commit.

@jyn514
Copy link
Member

jyn514 commented Aug 1, 2022

Looks great! r=me with the last commit dropped :) very excited to see how much time this saves

@jyn514 jyn514 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 Aug 1, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors r+ rollup=never

@bors
Copy link
Contributor

bors commented Aug 1, 2022

📌 Commit 197218b10d2d87c902d83623ed05f29f4011b23f 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 Aug 1, 2022
@Mark-Simulacrum
Copy link
Member Author

@bors r- r=jyn514

@bors
Copy link
Contributor

bors commented Aug 1, 2022

📌 Commit 197218b10d2d87c902d83623ed05f29f4011b23f has been approved by jyn514

It is now in the queue for this repository.

@bors bors added the S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. label Aug 19, 2022
@bors
Copy link
Contributor

bors commented Aug 19, 2022

⌛ Testing commit ec09f02e221cb57d8f35a49cb11c5bacb9c619d0 with merge bc26f7fb5b85c73b6a523859d101320571d72a9b...

@bors
Copy link
Contributor

bors commented Aug 19, 2022

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Aug 19, 2022
@rust-log-analyzer

This comment has been minimized.

See comment added for details on the test builder restriction. This is primarily
intended for macOS CI, but is likely to be a slight win on other builders too.
@Mark-Simulacrum
Copy link
Member Author

@bors r=jyn514 rollup=never

@bors
Copy link
Contributor

bors commented Aug 20, 2022

📌 Commit d7b91c3 has been approved by jyn514

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-review Status: Awaiting review from the assignee but also interested parties. labels Aug 20, 2022
@bors
Copy link
Contributor

bors commented Aug 20, 2022

⌛ Testing commit d7b91c3 with merge fb80d2b...

@bors
Copy link
Contributor

bors commented Aug 21, 2022

☀️ Test successful - checks-actions
Approved by: jyn514
Pushing fb80d2b to master...

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (fb80d2b): comparison url.

Instruction count

  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions ❌
(primary)
0.9% 0.9% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 0.9% 0.9% 1

Max RSS (memory usage)

Results
  • Primary benchmarks: ✅ relevant improvement found
  • Secondary benchmarks: ✅ relevant improvements found
mean1 max count2
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% -2.1% 1
Improvements ✅
(secondary)
-2.6% -2.9% 2
All ❌✅ (primary) -2.1% -2.1% 1

Cycles

Results
  • Primary benchmarks: ❌ relevant regression found
  • Secondary benchmarks: no relevant changes found
mean1 max count2
Regressions ❌
(primary)
2.0% 2.0% 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) 2.0% 2.0% 1

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

Footnotes

  1. the arithmetic mean of the percent change 2 3

  2. number of relevant changes 2 3

@jyn514
Copy link
Member

jyn514 commented Aug 21, 2022

🎉 🎉

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 20, 2024
…k-Simulacrum

Fix git safe-directory path for docker images

This fixes the path for configuring the git safe.directory setting inside docker images. AFAIK, `~/gitconfig` without a dot is not something that git uses ([ref](https://git-scm.com/docs/git-config)). This was needed in my environment to avoid the ` fatal: detected dubious ownership in repository at '/checkout'` error. For context, this was added in rust-lang#99967.
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jul 20, 2024
…k-Simulacrum

Fix git safe-directory path for docker images

This fixes the path for configuring the git safe.directory setting inside docker images. AFAIK, `~/gitconfig` without a dot is not something that git uses ([ref](https://git-scm.com/docs/git-config)). This was needed in my environment to avoid the ` fatal: detected dubious ownership in repository at '/checkout'` error. For context, this was added in rust-lang#99967.
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 21, 2024
Rollup merge of rust-lang#127839 - ehuss:safe-directory-docker, r=Mark-Simulacrum

Fix git safe-directory path for docker images

This fixes the path for configuring the git safe.directory setting inside docker images. AFAIK, `~/gitconfig` without a dot is not something that git uses ([ref](https://git-scm.com/docs/git-config)). This was needed in my environment to avoid the ` fatal: detected dubious ownership in repository at '/checkout'` error. For context, this was added in rust-lang#99967.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) 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.

7 participants