5f988a8270
- Enhanced CI workflows and GitHub actions to support native artifact caching and parallel builds. - Added composite actions and scripts for computing sources, finding artifacts, and managing caches. - Updated infrastructure documentation and runner deployment scripts with revised resource limits.
91 lines
3.3 KiB
YAML
91 lines
3.3 KiB
YAML
name: Native prewarm
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: [CI]
|
|
types: [completed]
|
|
workflow_dispatch:
|
|
# Prewarming must never extend the required CI workflow. Keep one warmup running
|
|
# to completion so it publishes the target snapshot; GitHub coalesces newer
|
|
# pending runs in this concurrency group.
|
|
concurrency:
|
|
group: native-prewarm-main
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
actions: read
|
|
contents: read
|
|
|
|
jobs:
|
|
lookup:
|
|
name: Look up cross-platform artifacts
|
|
if: ${{ github.event_name == 'workflow_dispatch' || (github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main') }}
|
|
runs-on: omp-kata
|
|
outputs:
|
|
source-hash: ${{ steps.compute.outputs.source-hash }}
|
|
cross-platform-run-id: ${{ steps.find.outputs.cross-platform-run-id }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
|
|
- id: compute
|
|
uses: ./.github/actions/native-source-hash
|
|
- id: find
|
|
uses: ./.github/actions/find-native-artifacts
|
|
with:
|
|
hash: ${{ steps.compute.outputs.source-hash }}
|
|
|
|
cross_platform_kata:
|
|
name: "Prewarm native: ${{ matrix.platform }} ${{ matrix.libc || '' }} ${{ matrix.arch }}"
|
|
needs: [lookup]
|
|
if: ${{ needs.lookup.outputs.cross-platform-run-id == '' }}
|
|
strategy:
|
|
fail-fast: false
|
|
max-parallel: 2
|
|
matrix:
|
|
include:
|
|
- { platform: linux, arch: arm64, target: aarch64-unknown-linux-gnu }
|
|
- { platform: linux, libc: musl, arch: x64, target: x86_64-unknown-linux-musl, variant: baseline }
|
|
- { platform: linux, libc: musl, arch: arm64, target: aarch64-unknown-linux-musl }
|
|
- { platform: win32, arch: x64, target: x86_64-pc-windows-msvc, variant: baseline }
|
|
runs-on: omp-kata
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
|
|
- uses: ./.github/actions/build-native
|
|
with:
|
|
hash: ${{ needs.lookup.outputs.source-hash }}
|
|
platform: ${{ matrix.platform }}
|
|
libc: ${{ matrix.libc }}
|
|
arch: ${{ matrix.arch }}
|
|
variant: ${{ matrix.variant }}
|
|
target: ${{ matrix.target }}
|
|
skip_validation: "true"
|
|
save_cache: "true"
|
|
|
|
cross_platform_macos:
|
|
name: "Prewarm native: darwin ${{ matrix.arch }}"
|
|
needs: [lookup]
|
|
if: ${{ needs.lookup.outputs.cross-platform-run-id == '' }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- { os: macos-14, arch: x64, target: x86_64-apple-darwin, variant: baseline }
|
|
- { os: macos-14, arch: arm64 }
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_sha || github.sha }}
|
|
- uses: ./.github/actions/build-native
|
|
with:
|
|
hash: ${{ needs.lookup.outputs.source-hash }}
|
|
platform: darwin
|
|
arch: ${{ matrix.arch }}
|
|
variant: ${{ matrix.variant }}
|
|
target: ${{ matrix.target }}
|
|
skip_validation: "true"
|
|
save_cache: "true"
|