Skip to content

Conversation

@alandefreitas
Copy link
Collaborator

Recent PR runs exceeded GitHub Actions cache limits, causing LLVM to be recompiled on every job of the workflow run. This led to hours-long turnaround times to verify changes. As a workaround, the fork workflow was being used to test the PR.

This commit simplifies the cache key structure to reduce redundant cache entries:

  • Add llvm-os-key using container name or runs-on for OS versioning
  • Make llvm-archive-basename conditional based on MSan only
  • Transform cache keys to replace ":" with "-" for safety
  • Only build instrumented libc++ for MSan where it's required

MSan requires all code, including libc++ to be instrumented to track initialization state correctly. ASan and UBSan can effectively catch errors without instrumenting dependencies, making custom libc++ builds low-ROI for these sanitizers.

Resulting cache key structure:

  • MSan builds: include compiler, version, and sanitizer type (e.g., llvm-dc4cef8-release-ubuntu-24.04-clang-21-MSan)
  • All other builds: omit compiler info since ABI is compatible (e.g., llvm-dc4cef8-release-ubuntu-24.04)

Non-sanitizer builds, ASan builds, and UBSan builds across gcc/clang versions on the same OS now share a single cache entry, as they produce ABI-compatible LLVM binaries.

Fixes #981

@github-actions
Copy link

github-actions bot commented Dec 17, 2025

🚧 Danger.js checks for MrDocs are experimental; expect some rough edges while we tune the rules.

✨ Highlights

  • None noted.

🧾 Changes by Scope

Scope Lines Δ Lines + Lines - Files Δ Files + Files ~ Files ↔ Files -
⚙️ CI 18 13 5 1 - 1 - -
Total 18 13 5 1 - 1 - -

Legend: Files + (added), Files ~ (modified), Files ↔ (renamed), Files - (removed)

🔝 Top Files

  • .github/workflows/ci.yml (CI): 18 lines Δ (+13 / -5)

Generated by 🚫 dangerJS against 5ce9b10

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@cppalliance-bot
Copy link

cppalliance-bot commented Dec 17, 2025

An automated preview of the documentation is available at https://1134.mrdocs.prtest2.cppalliance.org/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2025-12-17 17:33:25 UTC

Recent PR runs exceeded GitHub Actions cache limits, causing LLVM to be recompiled on every workflow run. This led to hours-long turnaround times to verify changes. As a workaround, the fork workflow was being used to test the PR.

This commit simplifies the cache key structure to reduce redundant cache entries:

- Add `llvm-os-key` using container name or runs-on for OS versioning
- Make `llvm-archive-basename` conditional based on MSan only
- Transform cache keys to replace ":" with "-" for safety
- Only build instrumented libc++ for MSan where it's required

MSan requires all code, including libc++ to be instrumented to track initialization state correctly. ASan and UBSan can effectively catch errors without instrumenting dependencies, making custom libc++ builds low-ROI for these sanitizers.

Resulting cache key structure:
- MSan builds: include compiler, version, and sanitizer type
  (e.g., llvm-dc4cef8-release-ubuntu-24.04-clang-21-MSan)
- All other builds: omit compiler info since ABI is compatible
  (e.g., llvm-dc4cef8-release-ubuntu-24.04)

Non-sanitizer builds, ASan builds, and UBSan builds across gcc/clang versions on the same OS now share a single cache entry, as they produce ABI-compatible LLVM binaries.

Fixes cppalliance#981
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unify redundant llvm cache keys

2 participants