[CI] Warm only Linux for compiler recipe changes (#28081)

* [CI] Warm only Linux for compiler recipe changes

* [CI] Follow cache warmer callers in policy contracts
This commit is contained in:
Neil
2026-10-12 16:34:58 -07:00
committed by GitHub
parent 1104402f5e
commit 845b723258
5 changed files with 145 additions and 74 deletions
@@ -0,0 +1,79 @@
name: Warm shared CI platform cache jobs
on:
workflow_call:
permissions:
contents: read
jobs:
warm-linux-arm:
concurrency:
group: ci-cache-warmup-linux-arm-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
node-version: '24'
cache-electron-package: 'true'
cache-pnpm-store-lookup-only: 'true'
- name: Populate shared Electron archive
run: node config/scripts/install-electron-package-binary.mjs
- name: Verify native cache is usable
run: node config/scripts/ensure-native-runtime.mjs --check-only
warm-windows:
concurrency:
group: ci-cache-warmup-windows-${{ matrix.os }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-11-arm]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
cache-pnpm-store-lookup-only: 'true'
- name: Verify native cache is usable
run: node config/scripts/ensure-native-runtime.mjs --check-only
warm-linux-package-fixtures:
concurrency:
group: ci-cache-warmup-linux-package-fixtures-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: daemon-shutdown-descendants
save-cache: ${{ github.event_name != 'pull_request' }}
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: headless-serve-shutdown
save-cache: ${{ github.event_name != 'pull_request' }}
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: cli-launch-contract
save-cache: ${{ github.event_name != 'pull_request' }}
@@ -0,0 +1,48 @@
name: Warm shared CI platform caches
on:
push:
branches: [main]
paths:
- '.github/workflows/ci-cache-warmup.yml'
- '.github/workflows/ci-cache-warmup-platform-jobs.yml'
- '.github/workflows/ci-cache-warmup-platforms.yml'
- '.github/actions/install-node-dependencies/**'
- '.github/actions/restore-pnpm-verification/**'
- '.github/actions/prepare-native-runtime/**'
- '.github/actions/prepare-git-compatibility/**'
- '.github/actions/prepare-linux-package-fixture/**'
- 'config/docker/headless-serve-shutdown/**'
- 'config/docker/cli-launch-contract/**'
- 'config/docker/daemon-shutdown-descendants/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.npmrc'
- '.pnpmfile.cjs'
- 'config/scripts/ensure-native-runtime.mjs'
- 'config/scripts/rebuild-native-deps.mjs'
- 'config/scripts/node-pty-job-ownership.cjs'
- 'config/scripts/windows-pe-machine.cjs'
- 'config/scripts/windows-process-tree-gyp-rebuild.mjs'
- 'config/scripts/windows-process-tree-creation-time.cjs'
- 'config/scripts/install-electron-package-binary.mjs'
- 'config/scripts/electron-platform-path.mjs'
- 'config/scripts/zip-extractor-command.mjs'
- 'src/shared/zip-extractor-command.ts'
- 'config/scripts/shared-electron-dist-cache.mjs'
- 'config/scripts/space-sharing-copy.mjs'
- 'config/patches/**'
- 'native/windows-registry/**'
pull_request:
paths:
- '.github/workflows/ci-cache-warmup.yml'
- '.github/workflows/ci-cache-warmup-platforms.yml'
- '.github/workflows/ci-cache-warmup-platform-jobs.yml'
permissions:
contents: read
jobs:
warm-platforms:
uses: ./.github/workflows/ci-cache-warmup-platform-jobs.yml
+10 -66
View File
@@ -9,6 +9,8 @@ on:
branches: [main]
paths:
- '.github/workflows/ci-cache-warmup.yml'
- '.github/workflows/ci-cache-warmup-platform-jobs.yml'
- '.github/workflows/ci-cache-warmup-platforms.yml'
- '.github/actions/install-node-dependencies/**'
- '.github/actions/restore-pnpm-verification/**'
- '.github/actions/prepare-native-runtime/**'
@@ -41,19 +43,19 @@ on:
pull_request:
paths:
- '.github/workflows/ci-cache-warmup.yml'
- '.github/workflows/ci-cache-warmup-platform-jobs.yml'
- '.github/workflows/ci-cache-warmup-platforms.yml'
- '.github/actions/prepare-headless-compiler/**'
- 'config/scripts/headless-detector-compiler-cache.mjs'
permissions:
contents: read
concurrency:
group: ci-cache-warmup-${{ github.event.pull_request.number || github.ref }}
# Scheduled retries must let an active warmer finish publishing its caches.
cancel-in-progress: ${{ github.event_name != 'schedule' }}
jobs:
warm:
concurrency:
group: ci-cache-warmup-linux-x64-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
runs-on: ubuntu-latest
timeout-minutes: 10
env:
@@ -80,64 +82,6 @@ jobs:
- uses: ./.github/actions/prepare-git-compatibility
warm-linux-arm:
runs-on: ubuntu-24.04-arm
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
node-version: '24'
cache-electron-package: 'true'
cache-pnpm-store-lookup-only: 'true'
- name: Populate shared Electron archive
run: node config/scripts/install-electron-package-binary.mjs
- name: Verify native cache is usable
run: node config/scripts/ensure-native-runtime.mjs --check-only
warm-windows:
strategy:
fail-fast: false
matrix:
os: [windows-2022, windows-11-arm]
runs-on: ${{ matrix.os }}
timeout-minutes: 20
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
cache-pnpm-store-lookup-only: 'true'
- name: Verify native cache is usable
run: node config/scripts/ensure-native-runtime.mjs --check-only
warm-linux-package-fixtures:
runs-on: ubuntu-latest
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: daemon-shutdown-descendants
save-cache: ${{ github.event_name != 'pull_request' }}
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: headless-serve-shutdown
save-cache: ${{ github.event_name != 'pull_request' }}
- uses: ./.github/actions/prepare-linux-package-fixture
with:
fixture: cli-launch-contract
save-cache: ${{ github.event_name != 'pull_request' }}
warm-platforms:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/ci-cache-warmup-platform-jobs.yml
@@ -283,19 +283,18 @@ describe('CI dependency download caches', () => {
const ssh = workflow('ssh-windows-hosts').jobs.hosts.steps.find(
(step) => step.uses === installer
)
const warmer = workflow('ci-cache-warmup').jobs['warm-windows'].steps.find(
(step) => step.uses === installer
)
const platformJobs = read(
workflow('ci-cache-warmup-platforms').jobs['warm-platforms'].uses
).jobs
const warmer = platformJobs['warm-windows'].steps.find((step) => step.uses === installer)
expect(action.inputs['cache-pnpm-store'].default).toBe('true')
expect(persistence.with['cache-pnpm-store']).toBe("${{ runner.os != 'Windows' }}")
expect(ssh.with['cache-pnpm-store']).toBe('false')
expect(warmer.with['cache-pnpm-store']).toBeUndefined()
expect(warmer.with['cache-pnpm-store-lookup-only']).toBe('true')
expect(persistence.with['cache-pnpm-store-lookup-only']).toBe('true')
for (const name of ['warm', 'warm-linux-arm']) {
const install = workflow('ci-cache-warmup').jobs[name].steps.find((step) =>
step.uses?.includes('install-node-dependencies')
)
for (const job of [workflow('ci-cache-warmup').jobs.warm, platformJobs['warm-linux-arm']]) {
const install = job.steps.find((step) => step.uses?.includes('install-node-dependencies'))
expect(install.with['cache-pnpm-store-lookup-only']).toBe('true')
}
})
@@ -121,7 +121,8 @@ it('uses exact context/platform keys and the same restore-only action in package
{ fixture: 'headless-serve-shutdown' },
{ fixture: 'cli-launch-contract' }
])
const warm = workflow('ci-cache-warmup').jobs['warm-linux-package-fixtures']
const platformSource = workflow('ci-cache-warmup-platforms').jobs['warm-platforms'].uses
const warm = parse(readFileSync(platformSource, 'utf8')).jobs['warm-linux-package-fixtures']
expect(warm.steps.slice(1).map((step) => step.with.fixture)).toEqual(
prepared.map((step) => step.with.fixture)
)