This is an archive of the discontinued LLVM Phabricator instance.

workflows: Use new custom runners from github
Needs ReviewPublic

Authored by tstellar on May 26 2022, 4:16 PM.

Details

Reviewers
asl
Summary

Github now provides custom runners for us to use with more CPU,
memory, and disk, so we are switching from the default runners
to 8 core runners for Linux and Windows. This change also allows
us to consolidate jobs now that we have runners with more disk space.

Diff Detail

Event Timeline

tstellar created this revision.May 26 2022, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2022, 4:16 PM
Herald added a subscriber: jvesely. · View Herald Transcript
tstellar requested review of this revision.May 26 2022, 4:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2022, 4:16 PM

Comments below are totally unrelated to this patch, I'm just curious.

.github/workflows/clang-tests.yml
12–17 ↗(On Diff #432404)

What's the reason to include pull_request here if all pull requests are automatically closed?

.github/workflows/llvm-project-tests.yml
46–52

Did you consider using sccache here? I see that right now this job takes ~4 hours, and the majority of time is spent on builds, which correlates with my experience building llvm in github actions. Enabling sccache should bring that down to ~3-15 minutes (windows is still much slower than linux, but that's a big improvement over a few hours).

tstellar added inline comments.May 27 2022, 4:39 PM
.github/workflows/clang-tests.yml
12–17 ↗(On Diff #432404)

This patch is for the release branch where we use pull requests for pre-commit testing. We put the pull requests in the llvm/llvm-project-release-prs repo to keep them separate, so they aren't automatically closed.

.github/workflows/llvm-project-tests.yml
46–52

Is sccache something that is integrated with GitHub or do we have to set up our own server somewhere?

With these new runners, most jobs take around 30 minutes which is a big improvement over the old runners. Here is an example pull requests that uses the new runners: https://github.com/llvm/llvm-project-release-prs/pull/1

alexbatashev added inline comments.May 27 2022, 8:49 PM
.github/workflows/clang-tests.yml
12–17 ↗(On Diff #432404)

Oh, I see, makes sense then.

.github/workflows/llvm-project-tests.yml
46–52

That’s a fantastic improvement. But builds are still 39 minutes long.

For github-hosted machines I’ve had success with github.com/actions/cache (see for example https://github.com/intel/llvm/commit/95104c079bacd4dd2920c8439d97d3f93e601b18). In my config llvm produced ~1,5 gigs of binaries. 10 gigs cache was more than enough for that task.

On self-hosted machines that’s even easier. You can persist data on the machine itself: https://github.com/intel/llvm/blob/f6420c769d473c00be736b8df361e10dd98a6009/.github/workflows/sycl_windows_build_and_test.yml#L32

tstellar added inline comments.Jul 7 2022, 11:47 PM
.github/workflows/llvm-project-tests.yml
46–52

Thanks for this information. I will look into enabling this in a follow-up patch.

asl added a comment.Jul 12 2022, 6:59 AM

Looks like there are some typos in runner names

.github/workflows/libclang-abi-tests.yml
85

Should be ubuntu-20.04-16x64, no?

.github/workflows/llvm-project-tests.yml
35–36

ubuntu-20.04-16x64 and windows-2022-16x64

.github/workflows/llvm-tests.yml
72

See above

tstellar added inline comments.Jul 14 2022, 4:05 PM
.github/workflows/libclang-abi-tests.yml
85

I created generic labels for the machines, so we can change the machine types without updating the workflow definition.

tstellar added inline comments.Jul 14 2022, 4:20 PM
.github/workflows/libclang-abi-tests.yml
85

I just checked and it looks like the labels are gone now. It says that unassigned labels will be removed periodically, so maybe they were removed, because we weren't using them? I can add them back after I commit the patch, or if you think it's better, we can just use the labels provided by github.

asl added inline comments.Jul 26 2022, 2:56 AM
.github/workflows/clang-tests.yml
3 ↗(On Diff #432404)

I'd probably suggest to ignore forks here as well. And allow manual triggering

tstellar added inline comments.Jul 26 2022, 6:55 AM
.github/workflows/clang-tests.yml
3 ↗(On Diff #432404)

Alright this patch is meant to be applied on top of D129526, so I will fix it in that patch.

tstellar updated this revision to Diff 447798.Jul 26 2022, 12:25 PM

Rebase on top of the latest version of D129526.

Trass3r added inline comments.
.github/workflows/llvm-project-tests.yml
46–52

There is also hendrikmuhs/ccache-action which specializes the cache action for ccache/sccache. It's also of interest to cache the ThinLTO cache. The cache sizes need to be tuned a bit since GH limits the total size.
https://github.com/Trass3r/llvm-project/blob/main/.github/workflows/CI.yml

kwk added a subscriber: kwk.Nov 18 2022, 7:29 AM

This is just a ping. About the status of this patch.

This is on hold, until we figure out if GitHub will charge us from the custom runners.