This is an archive of the discontinued LLVM Phabricator instance.

[libc++][ci] Use ccache in the jobs that build Clang
ClosedPublic

Authored by ldionne on May 18 2023, 2:17 PM.

Details

Summary

This is an attempt to reduce the time taken by the Bootstrapping
build job and the Clang CI job that builds the compiler from scratch.

Diff Detail

Event Timeline

ldionne created this revision.May 18 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 2:17 PM
Herald added a subscriber: arichardson. · View Herald Transcript
ldionne requested review of this revision.May 18 2023, 2:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 18 2023, 2:17 PM
Herald added a reviewer: Restricted Project. · View Herald Transcript
Mordante accepted this revision.May 19 2023, 8:16 AM
Mordante added a subscriber: Mordante.

When the cache is preserved between runs we might want to do the same for libc++.

LGTM when the CI is green.

libcxx/utils/ci/buildkite-pipeline-clang.yml
26

This gives statistics of the cache usage. I think that will at least initially be useful. Maybe we want to tweak cache parameters, for example the size.

This revision is now accepted and ready to land.May 19 2023, 8:16 AM
philnik accepted this revision.May 19 2023, 8:40 AM
philnik added a subscriber: philnik.

When the cache is preserved between runs we might want to do the same for libc++.

I don't think that makes a lot of sense. The libc++ build takes only a few seconds and (unfortunately) relies on large parts of our headers, which change with pretty much every patch, making it probably not very profitable. Also, while it's not a big problem, it does add another point of failure to the build. It's most likely worth the small risk for clang builds, but I't not convinced it is for libc++ builds.

When the cache is preserved between runs we might want to do the same for libc++.

I don't think that makes a lot of sense. The libc++ build takes only a few seconds and (unfortunately) relies on large parts of our headers, which change with pretty much every patch, making it probably not very profitable. Also, while it's not a big problem, it does add another point of failure to the build. It's most likely worth the small risk for clang builds, but I't not convinced it is for libc++ builds.

I don't recall the last time I had issues with ccache. But as said we "might want to" consider it so we need to measure. I've no idea how much time the runners spend on building libc++. This is the same for a lot of runners since we always build it with C++20. Also not all headers are always touched.

ldionne updated this revision to Diff 526642.May 30 2023, 8:34 AM
ldionne marked an inline comment as done.

Poke CI now that images should contain ccache.

This revision was automatically updated to reflect the committed changes.
Mordante added inline comments.May 30 2023, 11:00 PM
libcxx/utils/ci/buildkite-pipeline-clang.yml
25
ldionne marked an inline comment as done.May 31 2023, 7:47 AM
ldionne added inline comments.
libcxx/utils/ci/buildkite-pipeline-clang.yml
25

Ah, thanks for the catch. Yeah this is an obvious mistake but I forgot to trigger the Clang CI to test this patch.