Skip to content

Add cache support for Homebrew and intermediate compile in build workflow#5

Merged
tagliala merged 2 commits into
developfrom
copilot/fix-0ecd88db-1a38-4002-8cdb-f43fe68727fd
Sep 25, 2025
Merged

Add cache support for Homebrew and intermediate compile in build workflow#5
tagliala merged 2 commits into
developfrom
copilot/fix-0ecd88db-1a38-4002-8cdb-f43fe68727fd

Conversation

Copilot AI commented Sep 25, 2025

Copy link
Copy Markdown

This PR adds comprehensive caching to the GitHub Actions build workflow to significantly improve build performance by avoiding redundant operations.

Changes Made

Homebrew Package Cache

Added caching for Homebrew packages and dependencies using actions/cache@v4:

  • Caches /usr/local/{Cellar,opt,bin,lib,include} and ~/Library/Caches/Homebrew
  • Cache key includes hashes of configure and README.md to invalidate when dependencies change
  • Smart installation logic checks if packages already exist before running brew install
  • Expected savings: ~5-10 minutes per build when cache hits

Intermediate Build Artifacts Cache

Added caching for compiled artifacts and build intermediates:

  • Caches ~/build directory (ninja build output) and ~/.cache (LTO cache from default.rave)
  • Cache key includes hashes of all source files (661+ C++/ObjC++ files) to ensure cache validity
  • Build type differentiation (release/debug) in cache keys
  • Works seamlessly with TextMate's existing @@cache compilation transformation system in bin/rave
  • Expected savings: Substantial reduction in compilation time for unchanged files

Technical Details

  • Uses latest actions/cache@v4 for improved performance and reliability
  • Proper hierarchical cache keys with fallback restore keys for partial matches
  • Compatible with existing TextMate build system architecture (rave, ninja, internal caches)
  • Respects GitHub Actions 10GB cache size limits
  • No changes to source code or build logic - purely additive caching layer

Performance Impact

First build: Normal duration but populates caches
Subsequent builds:

  • Homebrew dependencies: ~5-10 minutes saved when packages unchanged
  • Compilation: Significant time savings when source files unchanged
  • LTO linking: Faster with persistent cache

This addresses the performance bottlenecks in CI builds while maintaining full compatibility with the existing build system.

Original prompt

Please add cache to homebrew and the intermediate compile in build workflow


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

…flow

Co-authored-by: tagliala <556268+tagliala@users.noreply.github.com>
Copilot AI changed the title [WIP] Please add cache to homebrew and the intermediate compile in build workflow Add cache support for Homebrew and intermediate compile in build workflow Sep 25, 2025
Copilot AI requested a review from tagliala September 25, 2025 14:38
@tagliala tagliala marked this pull request as ready for review September 25, 2025 14:39
@tagliala tagliala merged commit e3e1a00 into develop Sep 25, 2025
2 checks passed
@tagliala tagliala deleted the copilot/fix-0ecd88db-1a38-4002-8cdb-f43fe68727fd branch September 25, 2025 14:45
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.

2 participants