ci: Optimize workflow performance with caching and parallel jobs#1072
ci: Optimize workflow performance with caching and parallel jobs#1072lamplis wants to merge 1 commit intotcgdex:masterfrom
Conversation
|
i tested the changes with act and created a benchmark. here's what improved: Before:
After:
Results:
verified with act dryrun - both jobs execute correctly in parallel. Tests
|
c3d2e63 to
d1d83b9
Compare
Final Summary: CI Workflow OptimizationThis PR has evolved significantly based on feedback and testing. Here's the complete summary of changes vs master: 🎯 Key Optimization: Git Metadata SharingThe main bottleneck was git metadata loading (~7 minutes per OS) running redundantly 3 times. Solution: Export git metadata once on Ubuntu, share via artifact to all OS compile jobs. 📊 Performance Results (Verified in CI)
📁 Files Changed (CI-related)
🔧 Compiler ChangesAdded CLI flags to the compiler:
Also added:
✅ All CI Jobs Pass
|
c3ebfe6 to
a7ce5c7
Compare
Build workflow: - Add concurrency control to cancel outdated builds - Add timeout-minutes to prevent hung workflows - Add Bun dependency caching via actions/cache - Scope Docker build cache per branch for better isolation Test workflow: - Split into 2-phase job: export-git-metadata (ubuntu, full history) then test (multi-OS, shallow clone with imported metadata) to eliminate redundant git loading on each OS - Switch trigger from pull_request_target to pull_request so workflow changes can be tested before merge - Add concurrency control and timeout - Add Bun dependency caching - Separate validation and Bruno integration steps - Remove server unit test step because upstream has no server test files and bun test exits non-zero when no tests are found Docker: - Improve .dockerignore to exclude CI, docs, and test files from the build context Compiler: - Add --export-git-metadata and --import-git-metadata flags to the compiler so git file timestamps can be shared across CI jobs via artifacts instead of each job loading full git history
a7ce5c7 to
e65b87a
Compare
|
PR updated @thomas-bassett |
this is a PR for @Aviortheking |
Changes
validate+api-tests)tsconfig.data.jsonfor fast data-only validationsleep 10with health check loop for server readinessfetch-depth: 0only where needed (api-tests job)Details
Parallel Jobs Structure
Benefits
Visual Timeline