-
Notifications
You must be signed in to change notification settings - Fork 14
π€ Optimize CI: Fix duplicate typecheck and add dependency caching #208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Focus on static check optimizations and low-hanging fruit: - Caching strategies for dependencies, tools, and build artifacts - Eliminating redundant typecheck runs - ESLint and Prettier caching - Prioritized implementation roadmap with expected 40-60% speedup Generated with `cmux`
Deep dive into current static check bottlenecks: - Identified duplicate typecheck execution (10-12s waste) - Tool-by-tool caching strategies for ESLint, Prettier, TypeScript - Phase-by-phase implementation guide with timing analysis - Expected 60% improvement on cached runs Generated with `cmux`
Track progress of CI optimization phases: - Phase 1: Immediate wins (dedupe + caching) - Phase 2: TypeScript incremental builds - Phase 3: Measurement & validation - Baseline metrics and success criteria Generated with `cmux`
Comprehensive quick-reference guide: - Fast-track implementation steps for Phase 1 - Expected results and success criteria - Verification commands and troubleshooting - Links to detailed documentation Generated with `cmux`
High-level overview of findings and recommendations: - Critical issue: duplicate typecheck (10-20s waste) - Missing: dependency caching (90-180s waste) - Phase 1 ROI: 40 min work β 40-60% speedup - Recommendation: Implement Phase 1 immediately Generated with `cmux`
Two high-impact optimizations: 1. Remove duplicate typecheck execution (save 10-20s) - scripts/lint.sh no longer calls typecheck.sh - Makefile static-check already runs typecheck separately - Was wasting 10-12s per CI run with redundant parallel execution 2. Add bun dependency caching (save 90-180s total) - Cache ~/.bun/install/cache across all CI jobs - Applies to: static-check, test, integration-test, e2e-test - Also cache shfmt binary (save 3-5s) - Updated composite action for build workflows Expected improvement: 40-50% faster CI on subsequent runs _Generated with `cmux`_
β¦ile lint target - Use bun.lockb for Actions cache keys (proper invalidation) - Align shfmt cache key with install strategy (latest) - Update Makefile help text for lint to reflect new behavior Minor readability, structure, and performance improvements. _Generated with `cmux`_
The lockfile is bun.lock in this repo, not bun.lockb. Revert to correct filename. _Generated with `cmux`_
Replace duplicate setup steps (Bun + cache + install) in all CI jobs with the existing setup-cmux composite action. Reduces ~60 lines of duplication. Single source of truth for dependency setup makes future changes easier. _Generated with `cmux`_
Remove multi-line format that was causing issues. _Generated with `cmux`_
Combine install and PATH setup into single step, and verify shfmt is available before proceeding to avoid PATH timing issues in GitHub Actions. _Generated with `cmux`_
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Two high-impact CI optimizations that reduce runtime by 40-50% on subsequent runs, plus reduced duplication for maintainability.
Changes
1. Fix Duplicate TypeCheck Execution β‘ (save 10-20s)
make -j3 static-checkscripts/lint.shcalledtypecheck.shMakefilealso rantypecheckdirectlylint.sh, let Makefile handle orchestrationscripts/lint.sh,Makefile(updated help text)2. Add Dependency Caching π (save 90-180s total)
bun install --frozen-lockfilefrom scratch (30-60s per job)~/.bun/install/cachewith GitHub Actions cache via composite action-latestkey to match install strategy (save 3-5s).github/actions/setup-cmux/action.yml3. Reduce Duplication π§Ή (60 lines removed)
setup-cmuxcomposite action consistently.github/workflows/ci.ymlExpected Impact
Before:
After (first run):
After (cached runs):
Testing
make static-checkruns correctlyLow Risk
Generated with
cmux