diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 131f46379..ccb36d5b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -182,6 +182,17 @@ jobs: if-no-files-found: error retention-days: 7 + # test:prepare caches only portable JS, skill, and catalog outputs. + # Native package jobs still run their build and prepack checks; Turbo + # restores matching outputs or rebuilds when their inputs differ. + - uses: actions/upload-artifact@v4 + with: + name: rea-build-cache + path: .turbo/cache/ + include-hidden-files: true + if-no-files-found: error + retention-days: 7 + test: name: Test (coverage + timing) needs: [changes, test-shard] @@ -298,7 +309,7 @@ jobs: package-e2e: name: Native package baseline (${{ matrix.platform }} ${{ matrix.architecture }}) - needs: [changes, windows-native-build] + needs: [changes, build, windows-native-build] if: needs.changes.outputs.runtime == 'true' strategy: fail-fast: false @@ -328,6 +339,10 @@ jobs: assert.equal(process.arch, process.env.EXPECTED_CI_ARCHITECTURE); console.log(JSON.stringify({ platform: process.platform, architecture: process.arch, node: process.version }));" - run: npm ci + - uses: actions/download-artifact@v4 + with: + name: rea-build-cache + path: .turbo/cache/ - uses: actions/download-artifact@v4 with: name: windows-native-controls diff --git a/docs/testing.md b/docs/testing.md index f249bbb04..59be84457 100644 --- a/docs/testing.md +++ b/docs/testing.md @@ -1015,6 +1015,12 @@ summary. Static checks, documentation, build, package verification, and real-system lanes remain separate jobs so one kind of evidence cannot stand in for another. +Native package jobs reuse the same workflow's Turbo cache for portable compiled +JavaScript, skills, and catalogs. They retain the normal build and prepack +commands, which restore matching outputs or rebuild on a cache miss. Native +artifacts, dependency installs, package archives, and runtime verification remain +host-local. Keep platform-dependent outputs out of this shared cache. + The PR acceptance target is a median `npm run check:pr` wall time below three minutes across three warm-build runs on the benchmark host. Keep Vitest caches cold unless separately identified. A PR that touches packaging or real-system