CI: optimize Windows lane by splitting bundle and dropping duplicate lanes

This commit is contained in:
Vincent Koc
2026-03-02 18:58:32 -08:00
parent 806803b7ef
commit f2c37e543e

View File

@@ -344,26 +344,16 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
include: include:
- runtime: node
task: lint
shard_index: 0
shard_count: 1
command: pnpm lint
- runtime: node - runtime: node
task: test task: test
shard_index: 1 shard_index: 1
shard_count: 2 shard_count: 2
command: pnpm canvas:a2ui:bundle && pnpm test command: pnpm test
- runtime: node - runtime: node
task: test task: test
shard_index: 2 shard_index: 2
shard_count: 2 shard_count: 2
command: pnpm canvas:a2ui:bundle && pnpm test command: pnpm test
- runtime: node
task: protocol
shard_index: 0
shard_count: 1
command: pnpm protocol:check
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
@@ -389,20 +379,6 @@ jobs:
Write-Warning "Failed to apply Defender exclusions, continuing. $($_.Exception.Message)" Write-Warning "Failed to apply Defender exclusions, continuing. $($_.Exception.Message)"
} }
- name: Download dist artifact (lint lane)
if: matrix.task == 'lint'
uses: actions/download-artifact@v4
with:
name: dist-build
path: dist/
- name: Verify dist artifact (lint lane)
if: matrix.task == 'lint'
run: |
set -euo pipefail
test -s dist/index.js
test -s dist/plugin-sdk/index.js
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
@@ -440,6 +416,10 @@ jobs:
echo "OPENCLAW_TEST_SHARDS=${{ matrix.shard_count }}" >> "$GITHUB_ENV" echo "OPENCLAW_TEST_SHARDS=${{ matrix.shard_count }}" >> "$GITHUB_ENV"
echo "OPENCLAW_TEST_SHARD_INDEX=${{ matrix.shard_index }}" >> "$GITHUB_ENV" echo "OPENCLAW_TEST_SHARD_INDEX=${{ matrix.shard_index }}" >> "$GITHUB_ENV"
- name: Build A2UI bundle (Windows)
if: matrix.task == 'test'
run: pnpm canvas:a2ui:bundle
- name: Run ${{ matrix.task }} (${{ matrix.runtime }}) - name: Run ${{ matrix.task }} (${{ matrix.runtime }})
run: ${{ matrix.command }} run: ${{ matrix.command }}