Files
orca/.github/workflows/ci-cache-warmup.yml
T
Neil 6bb2e13c35 refactor(tooling): organize remaining scripts by domain owners (#38407)
* refactor(tooling): group remaining scripts by concrete domain owners

* fix(tooling): preserve relocated launcher resource roots
2026-11-05 00:29:16 -08:00

111 lines
4.7 KiB
YAML

name: Warm shared CI caches
on:
# Cache-input pushes seed immediately; this schedule repairs eviction and image changes.
schedule:
- cron: '41 */6 * * *'
workflow_dispatch:
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-windows-cli-launcher/**'
- '.github/actions/prepare-git-compatibility/**'
- '.github/actions/prepare-headless-compiler/**'
- 'config/scripts/runtime-verification/headless-detector/headless-detector-compiler-cache.mjs'
- '.github/actions/prepare-linux-package-fixture/**'
- '.github/actions/prepare-wayland-clipboard/**'
- 'native/wayland-clipboard/**'
- 'config/scripts/native-build/linux/build-wayland-clipboard.mjs'
- 'config/docker/headless-serve-shutdown/**'
- 'config/docker/cli-launch-contract/**'
- 'config/docker/daemon-shutdown-descendants/**'
- 'package.json'
- 'pnpm-lock.yaml'
- 'pnpm-workspace.yaml'
- '.npmrc'
- 'config/pnpmfile.cjs'
- 'config/scripts/native-build/node-addons/ensure-native-runtime.mjs'
- 'config/scripts/native-build/windows/initialize-windows-native-toolchain.mjs'
- 'config/scripts/native-build/windows/capture-windows-native-environment.cmd'
- 'config/scripts/native-build/node-addons/rebuild-native-deps.mjs'
- 'config/scripts/native-build/node-addons/node-pty-job-ownership.cjs'
- 'config/scripts/native-build/windows/windows-pe-machine.cjs'
- 'config/scripts/native-build/windows/windows-process-tree-gyp-rebuild.mjs'
- 'config/scripts/native-build/windows/windows-process-tree-creation-time.cjs'
- 'config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs'
- 'config/scripts/electron-installation/platform-layout/electron-platform-path.mjs'
- 'config/scripts/zip-extractor-command.mjs'
- 'src/shared/zip-extractor-command.ts'
- 'config/scripts/electron-installation/shared-dist-cache/shared-electron-dist-cache.mjs'
- 'config/scripts/artifact-storage/reflink-copy/space-sharing-copy.mjs'
- 'config/patches/**'
- 'native/windows-registry/**'
- 'native/windows-security/**'
pull_request:
types: [opened, synchronize, reopened, ready_for_review, converted_to_draft]
paths:
- '.github/workflows/ci-cache-warmup.yml'
- '.github/actions/prepare-headless-compiler/**'
- 'config/scripts/runtime-verification/headless-detector/headless-detector-compiler-cache.mjs'
- '.github/actions/prepare-wayland-clipboard/**'
permissions:
contents: read
concurrency:
group: ci-cache-warmup-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
warm:
if: github.event_name != 'pull_request' || github.event.pull_request.draft != true
concurrency:
group: ci-cache-warmup-linux-x64-${{ matrix.runner }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: ${{ github.event_name != 'schedule' }}
# Blacksmith and GitHub-hosted jobs restore from separate cache stores; warm both.
strategy:
fail-fast: false
matrix:
runner: [blacksmith-4vcpu-ubuntu-2404, ubuntu-24.04]
runs-on: ${{ matrix.runner }}
timeout-minutes: 10
env:
ORCA_BACKGROUND_LAUNCH: '1'
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
# Default-branch caches can be restored by every PR; PR caches cannot.
- uses: ./.github/actions/install-node-dependencies
with:
native-runtime: node
node-version: '24'
cache-electron-package: 'true'
# No hosted job restores the root store, so keep it out of GitHub's cache quota.
cache-pnpm-store: ${{ startsWith(matrix.runner, 'blacksmith-') }}
cache-pnpm-store-lookup-only: 'true'
- uses: ./.github/actions/prepare-headless-compiler
with:
seed: 'true'
- name: Populate shared Electron archive
run: node config/scripts/electron-installation/platform-layout/install-electron-package-binary.mjs
- uses: ./.github/actions/prepare-git-compatibility
- uses: ./.github/actions/prepare-wayland-clipboard
with:
save-cache: 'true'
warm-platforms:
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/ci-cache-warmup-platform-jobs.yml