Skip to content

ci: cache LLVM installation#31

Merged
tcrypt25519 merged 4 commits into
masterfrom
copilot/cache-llvm-installation
Feb 8, 2026
Merged

ci: cache LLVM installation#31
tcrypt25519 merged 4 commits into
masterfrom
copilot/cache-llvm-installation

Conversation

Copilot AI commented Feb 8, 2026

Copy link
Copy Markdown

LLVM installation via apt takes ~30s per CI run. Implemented GitHub Actions caching to reduce this to ~2-3s on cache hits.

Implementation

  • Cache LLVM 21 installation as tarball (/usr/lib/llvm-21, /usr/bin/llvm-config-21)
  • Tarball stored in $RUNNER_TEMP to avoid workspace pollution
  • Cache key: llvm-21-{runner.os}-{runner.arch}-{env.ImageOS}-{hash(install-llvm.sh, llvm.sh)}
  • Install step runs conditionally on cache miss
  • Tarball creation/extraction uses sudo for system directory access

Cache Behavior

Hit: Extract tarball → ~2-3s
Miss: Full installation → create tarball → ~30s (cache primed for next run)
Invalidation: Automatic when installation scripts change or runner image updates

Expected time savings: ~27-28s per run after initial cache population.

Original prompt

This section details on the original issue you should resolve

<issue_title>CI: Cache LLVM</issue_title>
<issue_description>Installing LLVM is costing 30 seconds every CI run. We should try to cache the LLVM installation and see how much that helps.</issue_description>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@semanticdiff-com

semanticdiff-com Bot commented Feb 8, 2026

Copy link
Copy Markdown

Review changes with  SemanticDiff

Changed Files
File Status
  .github/workflows/ci.yml  2% smaller

Cache LLVM 21 installation to reduce CI time. The installation
currently takes ~30 seconds on each run. This change:

- Uses GitHub Actions cache to store LLVM installation as tarball
- Only installs LLVM when cache miss occurs
- Restores from cache when available
- Cache key includes install scripts to invalidate on changes

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
Copilot AI changed the title [WIP] Cache LLVM installation to reduce CI run time ci: cache LLVM installation Feb 8, 2026
Copilot AI requested a review from tcrypt25519 February 8, 2026 04:25
@tcrypt25519
tcrypt25519 marked this pull request as ready for review February 8, 2026 04:33
Copilot AI review requested due to automatic review settings February 8, 2026 04:33

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds GitHub Actions caching for the LLVM 21 installation to reduce CI runtime by avoiding repeated apt installs, aligning with the repo’s LLVM-21-dependent Rust/inkwell build pipeline.

Changes:

  • Add an actions/cache step to cache a tarball of the LLVM 21 installation.
  • On cache hit, restore LLVM by extracting the tarball into /.
  • On cache miss, run the existing install script and then create the tarball for future runs.

Comment thread .github/workflows/ci.yml Outdated
Comment thread .github/workflows/ci.yml Outdated
- Move tarball to $RUNNER_TEMP to avoid polluting workspace
- Add runner.arch and env.ImageOS to cache key for binary compatibility
- Ensures cache invalidates when runner image changes

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
@tcrypt25519
tcrypt25519 merged commit b8c8cdc into master Feb 8, 2026
1 check passed
tcrypt25519 added a commit that referenced this pull request Feb 16, 2026
* Initial plan

* ci: add LLVM 21 installation caching

Cache LLVM 21 installation to reduce CI time. The installation
currently takes ~30 seconds on each run. This change:

- Uses GitHub Actions cache to store LLVM installation as tarball
- Only installs LLVM when cache miss occurs
- Restores from cache when available
- Cache key includes install scripts to invalidate on changes

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>

* ci: use $RUNNER_TEMP for tarball and add ImageOS to cache key

- Move tarball to $RUNNER_TEMP to avoid polluting workspace
- Add runner.arch and env.ImageOS to cache key for binary compatibility
- Ensures cache invalidates when runner image changes

Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: tcrypt25519 <212655132+tcrypt25519@users.noreply.github.com>
Co-authored-by: Tyler Smith <mail@tcry.pt>
@tcrypt25519
tcrypt25519 deleted the copilot/cache-llvm-installation branch February 16, 2026 20:02
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.

CI: Cache LLVM

3 participants