Skip to content

Enhance ccache integration for improved build performance - #81

Merged
omarghatasheh merged 1 commit into
mainfrom
ios/testing
Jun 2, 2026
Merged

Enhance ccache integration for improved build performance#81
omarghatasheh merged 1 commit into
mainfrom
ios/testing

Conversation

@MusaMisto

@MusaMistoMusaMisto commented Jun 2, 2026

Copy link
Copy Markdown
Member

This pull request enhances the iOS TestFlight GitHub Actions workflow by improving ccache integration for faster and more transparent builds. The key changes focus on better ccache configuration, visibility into ccache performance, and improved compatibility with different environments.

ccache integration and configuration improvements:

  • Added detection and export of the ccache binary path (CCACHE_BIN) and improved ccache configuration, including setting sloppiness=file_stat_matches for better cache hit rates. The workflow now also adds the correct ccache libexec directory to the PATH depending on the system setup, ensuring clang/clang++ use ccache wrappers. (.github/workflows/generic-ios-testflight.yml)
  • When ccache is enabled, new flags are injected into the xcodebuild command to use ccache as the compiler launcher for both C and C++ compilers, and to enable explicit modules with the compiler launcher. (.github/workflows/generic-ios-testflight.yml) [1][2]

ccache statistics and transparency:

  • Before the archive step, ccache statistics are reset to provide clear metrics for the current build. After the archive step, ccache statistics are appended to the GitHub Actions step summary for visibility into cache effectiveness. (.github/workflows/generic-ios-testflight.yml) [1][2]

Summary by CodeRabbit

  • Chores
    • Optimized the iOS TestFlight build pipeline with enhanced compilation caching configuration and improved build performance metrics tracking.

@MusaMistoMusaMisto self-assigned this Jun 2, 2026
@MusaMistoMusaMisto added the enhancement New feature or request label Jun 2, 2026
@coderabbitai

coderabbitaiBot commented Jun 2, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d202161f-b3d5-45fc-bad1-0219e3cc5b82

📥 Commits

Reviewing files that changed from the base of the PR and between cf7443e and b873a0d.

📒 Files selected for processing (1)
  • .github/workflows/generic-ios-testflight.yml

📝 Walkthrough

Walkthrough

The iOS TestFlight workflow's optional ccache support is enhanced with full binary detection, environment configuration, compiler launcher injection into the manual xcodebuild archive path, pre-archive stats reset, and post-archive stats reporting to the GitHub step summary.

Changes

ccache Integration for Manual Archive Path

Layer / File(s)Summary
ccache initialization and environment setup
.github/workflows/generic-ios-testflight.yml
Detects ccache binary path and applies compression, sloppiness, and Homebrew path configuration conditionally for /opt/homebrew or /usr/local. Exports CCACHE_DIR, CCACHE_BIN to job environment and prints final ccache configuration.
Pre-archive stats reset and compiler launcher preparation
.github/workflows/generic-ios-testflight.yml
Resets ccache statistics before archiving and constructs CCACHE_XCODE_FLAGS array with C/CXX compiler launchers and explicit modules configuration, all guarded by enable-ccache and use-manual-inline-archive conditions.
Manual archive execution with ccache flags and stats reporting
.github/workflows/generic-ios-testflight.yml
Injects CCACHE_XCODE_FLAGS into the manual inline xcodebuild archive command. Adds post-archive step to capture ccache --show-stats output and report it to the GitHub step summary in a fenced text block.

Sequence Diagram

sequenceDiagram
participant Runner as Workflow Runner
participant ccache as ccache Tool
participant xcodebuild as xcodebuild
participant Summary as GitHub Summary
Runner->>ccache: Detect binary and configure
Runner->>Runner: Export CCACHE_DIR and CCACHE_BIN
Runner->>Runner: Add Homebrew path to environment
Runner->>ccache: Reset statistics (zero-stats)
Runner->>Runner: Build CCACHE_XCODE_FLAGS array
Runner->>xcodebuild: Execute archive with launcher flags
xcodebuild->>ccache: Compile with ccache launcher
xcodebuild->>Runner: Archive complete
Runner->>ccache: Retrieve build statistics
Runner->>Summary: Append statistics to step summary
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • simplify9/.github#78: Both PRs modify the same manual inline xcodebuild archive command path with overlapping changes to argument lists and ccache configuration.
  • simplify9/.github#28: This PR extends the reusable iOS TestFlight workflow originally introduced in PR #28 with full ccache compiler launcher integration.

Suggested reviewers

  • omarghatasheh

Poem

🐰 A rabbit hops through build logs fast,
With ccache stats compiled at last,
Compiler launchers wired just right,
xcodebuild flies through GitHub's night! ⚡

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ios/testing

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@omarghatasheh
omarghatasheh merged commit 0ad57c6 into mainJun 2, 2026
1 of 2 checks passed
@omarghatasheh
omarghatasheh deleted the ios/testing branch June 2, 2026 15:36
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@MusaMisto@omarghatasheh