Repository navigation
ci: speed up PR critical path in CI and Profile Performance - #1816
Conversation
Deploying swc-next with
|
| Latest commit: |
9972e01
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://4d305f6a.swc-next.pages.dev |
| Branch Preview URL: | https://ci-split-conformance-cache-f.swc-next.pages.dev |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f5ceed174a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
Binary size diffLinux x64 GNU · release · uncompressed, stripped bindings. Merge:
|
JavaScript API Gungraun benchmark diffBase: Values are shown as Download the raw Gungraun and Valgrind data (retained for 90 days). Callgrind metric changesMedian instruction counts from three processes, shown as compare / base in K (1,000), truncated to whole thousands. Percentages are rounded to at most three decimal places. Lower is better: 🟢 improvement, 🔴 regression, ⚪ unchanged or overlapping ranges (inconclusive). JIT disabled (--jitless); predictable mode enabled (--predictable). Counts are not wall time. Exact counts, ranges and profiles are retained in artifacts. Generate
Lang
Parse
Source type
Walk
Benchmark resultsExact instruction counts: median (min–max).
|
Gungraun benchmark diffBase SHA: 4033aa7 Values are shown as Download the raw Gungraun and Valgrind data (retained for 90 days). Callgrind metric changesCallgrind instruction counts (Ir) for the compare and base revisions. Values are shown as compare / base in K (1,000), truncated to whole thousands. Multi-part profiles use the part numbers from Gungraun and include an aggregated Total. New and Removed identify benchmarks that exist on only one side; the missing value is shown as a dash. Percentages are rounded to at most three decimal places. Lower is better: 🟢 improvement, 🔴 regression, ⚪ unchanged. Formatter
Generator
Minifier
Parser
Semantic
Transform
Type strip
Visit
Benchmark results |
## Motivation `Profile Performance` still rebuilds the `base` Gungraun benchmark binary on every pull request (~3–5 minutes), even when multiple PRs share the same `main` base commit. In addition, after splitting main-only tests into `cargo-test-main` in #1816, GitHub Actions renders the skipped PR job name literally as `Test (${{ matrix.name }})` because job-level `if` is evaluated before matrix expansion. ## Changes - **Cache `Profile Performance` base benchmark binaries (`.github/workflows/profile-perf.yml`)**: - Add a `push` trigger on `main` with a `warm-base` job that builds the Gungraun benchmark binary for each `main` commit and caches `$RUNNER_TEMP/gungraun-bin/base` by OS, architecture, active Rust toolchain, and commit SHA in the default branch cache scope (so all PRs can read it). - Share `cache-key: profile-perf-gungraun` in `setup-rust-toolchain` between `warm-base` and `gungraun` so PRs still get warm incremental Cargo caches when skipping the base build. - Restore the cached base binary in `gungraun` and skip checking out and building `base` on cache hits, falling back to building `base` on cache misses (such as Rust toolchain upgrades or stacked PRs). - **Fix skipped matrix job display name (`.github/workflows/CI.yml`)**: - Change `cargo-test-main` to use a static `name: Test` with a single `target: [windows-latest, s390x]` matrix dimension, so skipped PR checks display as `Test` while `main` push runs still display as `Test (windows-latest)` and `Test (s390x)`. ## Related Links - #1816
Motivation
Recent PR CI runs spend ~11m14s (P50) on the single
Conformancejob—which is the merge-blocking critical path on 100% of recent PRs—because Rust conformance (--profile conformance) and Node.js N-API release builds plus JS conformance run serially in one job, and external test fixtures are freshly cloned on every run (~1m02s). Across all unconditional PR workflows,Profile Performancefinishes last on ~74% of PRs (~12m48s P50), spending time rebuildinggungraun-runnerfrom source and transferring binaries between twoubuntu-24.04jobs.Changes
Conformancein.github/workflows/CI.yml: split into parallelConformance (Rust)andConformance (JavaScript)jobs so Rust conformance and Node.js release bindings + JS conformance/tests run concurrently with separate Rust build caches..github/workflows/CI.yml: cachetasks/testsuite/fixtureswithactions/cachekeyed onhashFiles('scripts/fixture-revisions.txt')and skip./scripts/clone_fixtures.shon cache hits.Test (windows-latest)andTest (s390x)tomain: run these twocargo-testmatrix entries only onpushtorefs/heads/main, while keepingCheck (windows-latest)andTest (ubuntu-latest)/Test (macos-latest)on PRs..github/workflows/profile-perf.yml:gungraun-runnerbinaries by runner OS, architecture, andgungraun-runnerversion to avoid compiling it from source on every PR.buildandgungrauninto a singlegungraunjob onubuntu-24.04, removing intermediate tarball packaging, artifact upload/download, and duplicate runner setup while keepingcomment-pull-requestisolated withpull-requests: write.Protect main - PR requiredruleset to replaceConformancewithConformance (Rust)andConformance (JavaScript), and removeTest (windows-latest)from required status checks.