From 9a8efdfd50a7861d1b98a707754e345e40162efe Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 18:06:32 +0800 Subject: [PATCH 1/6] perf(ci): run gates in parallel, cancel superseded PR runs, cache compat builds - The compiler compatibility, reconstruction corpus and JS runtime jobs no longer wait for Rust quality; they pass no data to it. - Pull request runs share a concurrency group per PR and cancel in progress; main pushes keep a unique group. - Path filtering moves from workflow-level paths-ignore into a changes job, so the required Rust quality checks report on documentation-only changes instead of staying pending. - The compatibility gate and the macOS and Windows JS runtime jobs restore a target cache written by main. --- .github/workflows/ci.yml | 63 +++++++++++++++++++++++++++++++--------- 1 file changed, 50 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 85d0e0b1..98849251 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,24 +4,57 @@ on: workflow_dispatch: push: branches: ["main"] - paths-ignore: - - "**/*.md" - - "docs/**" pull_request: - paths-ignore: - - "**/*.md" - - "docs/**" permissions: contents: read +# A newer push to the same pull request supersedes the older run. Pushes to +# main never share a group, so each main commit keeps a complete run. +concurrency: + group: ci-${{ github.event.pull_request.number || github.sha }} + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + jobs: + # Skipped jobs still report their check names as passing, so a change that + # touches only documentation does not leave a required check pending. + changes: + name: Detect changes + runs-on: ubuntu-latest + timeout-minutes: 5 + permissions: + contents: read + pull-requests: read + outputs: + code: ${{ steps.filter.outputs.code }} + workflows: ${{ steps.filter.outputs.workflows }} + steps: + - name: Check out repository + if: github.event_name != 'pull_request' + uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + + - name: Filter paths + id: filter + uses: dorny/paths-filter@ceb8a2b8f2d89434be7ff52d3de7ec3738c5cc9d # v4.0.3 + with: + predicate-quantifier: every + filters: | + code: + - '**' + - '!**/*.md' + - '!docs/**' + workflows: + - '.github/workflows/**' + workflow-lint: name: Workflow lint + needs: changes + if: needs.changes.outputs.workflows == 'true' uses: wrightkit/.github/.github/workflows/actionlint.yml@main rust-quality: name: Rust (${{ matrix.toolchain }}) + needs: changes strategy: fail-fast: false matrix: @@ -34,10 +67,12 @@ jobs: toolchain: ${{ matrix.toolchain }} cache-shared-key: linux-quality all-features: true + skip: ${{ needs.changes.outputs.code != 'true' }} compiler-compatibility: name: Compiler compatibility gate - needs: rust-quality + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest timeout-minutes: 60 @@ -49,8 +84,8 @@ jobs: uses: wrightkit/.github/.github/actions/setup-rust@main with: toolchain: stable - cache-shared-key: linux-quality - cache-targets: false + cache-shared-key: compiler-compatibility + cache-save: ${{ github.ref == 'refs/heads/main' }} - name: Build public compiler CLI run: cargo build --locked -p opy-cli --bin opy-cli @@ -110,7 +145,8 @@ jobs: # reconstruction path cannot hide behind optional features (#646). reconstruction-corpus: name: Reconstruction corpus gate - needs: rust-quality + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest timeout-minutes: 45 @@ -130,7 +166,8 @@ jobs: macro-runtime-ports: name: JS runtime on ${{ matrix.os }} - needs: rust-quality + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ${{ matrix.os }} timeout-minutes: 20 strategy: @@ -148,9 +185,7 @@ jobs: uses: wrightkit/.github/.github/actions/setup-rust@main with: toolchain: stable - components: clippy, rustfmt cache-shared-key: macro-runtime-${{ runner.os }} - cache-targets: false cache-save: ${{ github.ref == 'refs/heads/main' }} - name: Run internal macro runtime tests @@ -158,6 +193,8 @@ jobs: release-order: name: Release promotion order + needs: changes + if: needs.changes.outputs.code == 'true' runs-on: ubuntu-latest timeout-minutes: 5 From 9cbd40742922f91e3cae17cc2fb2c806b01ea60a Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 18:06:33 +0800 Subject: [PATCH 2/6] ci: use the .github speed-up branch until it merges --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98849251..b618c076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: name: Workflow lint needs: changes if: needs.changes.outputs.workflows == 'true' - uses: wrightkit/.github/.github/workflows/actionlint.yml@main + uses: wrightkit/.github/.github/workflows/actionlint.yml@ci/speed-up rust-quality: name: Rust (${{ matrix.toolchain }}) @@ -62,7 +62,7 @@ jobs: - stable - 1.88.0 - uses: wrightkit/.github/.github/workflows/rust-quality.yml@main + uses: wrightkit/.github/.github/workflows/rust-quality.yml@ci/speed-up with: toolchain: ${{ matrix.toolchain }} cache-shared-key: linux-quality @@ -81,7 +81,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@main + uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up with: toolchain: stable cache-shared-key: compiler-compatibility @@ -155,7 +155,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@main + uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up with: toolchain: stable cache-shared-key: linux-quality @@ -182,7 +182,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@main + uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up with: toolchain: stable cache-shared-key: macro-runtime-${{ runner.os }} From d96cf76689521f30d40a875ee1d6d1f4ef48c22a Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 18:16:53 +0800 Subject: [PATCH 3/6] ci: TEMP seed caches from the PR --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b618c076..ffb913d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: with: toolchain: stable cache-shared-key: compiler-compatibility - cache-save: ${{ github.ref == 'refs/heads/main' }} + cache-save: true # TEMP: seed in the PR to measure - name: Build public compiler CLI run: cargo build --locked -p opy-cli --bin opy-cli @@ -186,7 +186,7 @@ jobs: with: toolchain: stable cache-shared-key: macro-runtime-${{ runner.os }} - cache-save: ${{ github.ref == 'refs/heads/main' }} + cache-save: true # TEMP: seed in the PR to measure - name: Run internal macro runtime tests run: cargo test --locked -p opy-rs --lib macro_js::tests From f3ffab067874b3596c63a17e61cb7320ede46058 Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 18:41:21 +0800 Subject: [PATCH 4/6] ci: save caches from main only again --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ffb913d2..b618c076 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -85,7 +85,7 @@ jobs: with: toolchain: stable cache-shared-key: compiler-compatibility - cache-save: true # TEMP: seed in the PR to measure + cache-save: ${{ github.ref == 'refs/heads/main' }} - name: Build public compiler CLI run: cargo build --locked -p opy-cli --bin opy-cli @@ -186,7 +186,7 @@ jobs: with: toolchain: stable cache-shared-key: macro-runtime-${{ runner.os }} - cache-save: true # TEMP: seed in the PR to measure + cache-save: ${{ github.ref == 'refs/heads/main' }} - name: Run internal macro runtime tests run: cargo test --locked -p opy-rs --lib macro_js::tests From 9efdb47b48f484d4ef016580d45ac08b43fb1421 Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 20:16:03 +0800 Subject: [PATCH 5/6] ci: reference the shared workflows on main again --- .github/workflows/ci.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b618c076..98849251 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: name: Workflow lint needs: changes if: needs.changes.outputs.workflows == 'true' - uses: wrightkit/.github/.github/workflows/actionlint.yml@ci/speed-up + uses: wrightkit/.github/.github/workflows/actionlint.yml@main rust-quality: name: Rust (${{ matrix.toolchain }}) @@ -62,7 +62,7 @@ jobs: - stable - 1.88.0 - uses: wrightkit/.github/.github/workflows/rust-quality.yml@ci/speed-up + uses: wrightkit/.github/.github/workflows/rust-quality.yml@main with: toolchain: ${{ matrix.toolchain }} cache-shared-key: linux-quality @@ -81,7 +81,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up + uses: wrightkit/.github/.github/actions/setup-rust@main with: toolchain: stable cache-shared-key: compiler-compatibility @@ -155,7 +155,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up + uses: wrightkit/.github/.github/actions/setup-rust@main with: toolchain: stable cache-shared-key: linux-quality @@ -182,7 +182,7 @@ jobs: uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - name: Set up Rust - uses: wrightkit/.github/.github/actions/setup-rust@ci/speed-up + uses: wrightkit/.github/.github/actions/setup-rust@main with: toolchain: stable cache-shared-key: macro-runtime-${{ runner.os }} From 130d1265fac761ee9923affc08205c751e49f880 Mon Sep 17 00:00:00 2001 From: Teakowa Date: Sun, 1 Nov 2026 20:32:44 +0800 Subject: [PATCH 6/6] ci: run the full suite on manual dispatch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 98849251..71f29f54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: contents: read pull-requests: read outputs: - code: ${{ steps.filter.outputs.code }} + code: ${{ github.event_name == 'workflow_dispatch' && 'true' || steps.filter.outputs.code }} workflows: ${{ steps.filter.outputs.workflows }} steps: - name: Check out repository