Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions .agents/skills/manage-ci/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,23 @@ contract; no downstream product's workflow topology applies here.
which runs it expects. Hosted offline
automation gates Quality canary and package jobs; Quality canary gates package
jobs whenever source checks apply. Full CI
runs Graph Contracts in parallel with fifteen build, package and smoke jobs.
runs Graph Contracts in parallel with sixteen package jobs.
Each CPU job supplies a shared platform CLI to its backend jobs. Routine CI
uses two device jobs and checks the three remaining CUDA archives on hosted
compiler-image runners.
Tagged releases add device smoke on those exact archives, including x64 CUDA 13.
Windows x64 CPU retains archive verification. Full CI additionally requires
Windows ARM64 CPU is package-only in full CI and releases. Windows x64 CPU
retains archive verification. Full CI additionally requires
two native Windows VM smoke jobs: CUDA 12 and 13 share one guest; ROCm has one.
Nightly, release and llama-upgrade callers reuse them. GPU manifest rows
require source/archive-bound inference receipts; short PR CI skips these jobs. Linux x64 ROCm builds and smokes on the native JY ROCm pool using
require source/archive-bound inference receipts. Short PR CI skips these jobs.
Linux x64 ROCm builds and smokes on the native JY ROCm pool using
the digest-pinned compiler container and the CPU job's verified CLI. Its
inference evidence is embedded in the tested product; no separate smoke
job or duplicate CLI build is needed. Restore candidate source before HIP
preflight, retain BLAS device kernels, normalize cached numeric owners, and
restore native workspace ownership after cache post hooks. The short plan
validates the whole manifest and excludes those seven `full_only` jobs
validates the whole manifest and excludes the eight `full_only` packages
independently of their smoke evidence policy. Vulkan Linux x64 and Windows x64 packages use pinned Vulkan SDK tooling.
Full CI tests the exact Linux Vulkan archive on both existing x64 NVIDIA CUDA 13
and AMD ROCm pools; both source- and archive-bound vendor receipts are required
Expand Down Expand Up @@ -166,7 +168,7 @@ contract; no downstream product's workflow topology applies here.
require publication credentials. The publisher can publish only the exact
candidate selected by successful full CI. The four established inference
models retain their separate PR/manual/nightly/release workflow.
- `ci/targets.json` owns four host definitions and fifteen runtime definitions.
- `ci/targets.json` owns five host definitions and sixteen runtime definitions.
`ci/windows-gpu-smoke.md` documents the public Windows VM recipe, host profiles
and native restoration contract. Missing AMD unload/task receipts or failed
native restoration retain quarantine. Keep the temporary rehearsal workflow
Expand Down
7 changes: 4 additions & 3 deletions .github/actions/ci-package/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ inputs:
description: Install the pinned command runner on a standard runner image.
default: 'false'
smoke:
description: Select inference or artifact smoke.
description: Select inference smoke, artifact smoke, or none for a package-only runtime.
default: inference
windows-cuda:
description: Pinned CUDA toolkit version to provision on the hosted Windows builder.
Expand Down Expand Up @@ -125,6 +125,7 @@ runs:
echo "::warning::Could not identify the native CUDA cache. Using the standard compiler cache."
fi
- uses: ./.github/actions/sccache
if: runner.os != 'Windows' || runner.arch != 'ARM64'
with:
scope: package-${{ inputs.runtime-id }}-${{ inputs.windows-cuda || inputs.windows-rocm || inputs.vulkan-version || env.SKIPPY_TOOLCHAIN_CACHE_KEY || 'native' }}-${{ env.SKIPPY_CUDA_ARCHITECTURE_MODE }}
native-windows-cuda-namespace: ${{ steps.cuda-cache.outputs.namespace }}
Expand Down Expand Up @@ -159,7 +160,7 @@ runs:
SMOKE_MODE: ${{ inputs.smoke }}
run: |
case "$SMOKE_MODE" in
inference) ;;
inference|none) ;;
artifact) export SKIPPY_CUDA_ARCHITECTURE_MODE=release ;;
*) echo "Invalid smoke mode: $SMOKE_MODE" >&2; exit 1 ;;
esac
Expand All @@ -175,7 +176,7 @@ runs:
if: inputs.smoke == 'inference'
with:
runtime_id: ${{ inputs.runtime-id }}
- name: Upload tested package
- name: Upload package
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: ${{ env.SKIPPY_ARTIFACT_SCOPE }}-product-${{ inputs.runtime-id }}
Expand Down
19 changes: 11 additions & 8 deletions .github/scripts/ci-gate.test.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ test('protected pull_request_target skips CI when trusted admission skips change
assert.equal(shouldRun({ changes: { result: 'success' } }), true);
});

test('all fifteen runtime packages match the planned matrix and depend on the canary', () => {
assert.equal(packageJobs.length, 15);
test('all sixteen runtime packages match the planned matrix and depend on the canary', () => {
assert.equal(packageJobs.length, 16);
assert.deepEqual(declared.filter(job => job.startsWith('package_')).sort(), packageJobs.sort());
for (const row of rows) {
const job = `package_${row.id.replaceAll('-', '_')}`;
Expand All @@ -59,7 +59,8 @@ test('all fifteen runtime packages match the planned matrix and depend on the ca
assert.equal(body.includes("needs.changes.outputs.packages == 'true'"), prPackages.includes(job));
const needsSeparateSmoke = releaseSmokes.includes(job.replace('package_', 'release_smoke_'));
assert.equal(body.includes('smoke: artifact'), row.host === 'windows-x86_64' || needsSeparateSmoke || row.id === 'linux-x86_64-vulkan');
if (row.validation === 'artifact') assert.ok(body.includes(row.runner[0]));
assert.equal(body.includes("smoke: 'none'"), row.validation === 'package');
if (row.validation === 'artifact' || row.validation === 'package') assert.ok(body.includes(row.runner[0]));
if (row.host === 'windows-x86_64' && row.backend === 'cuda') {
assert.ok(body.includes(`windows-cuda: '${row.toolkit}'\n`));
}
Expand Down Expand Up @@ -129,6 +130,7 @@ test('release publication consumes prepared assets and independently verifies th
assert.match(publish, /cmp release-receipt\/release.json dist\/release\/release.json/);
assert.doesNotMatch(publish, /release-prepare-candidate|release-product-/);
assert.match(publish, /ARTIFACT_ONLY: \$\{\{ needs.verify.outputs.artifact_only \}\}/);
assert.match(publish, /PACKAGE_ONLY: \$\{\{ needs.verify.outputs.package_only \}\}/);
});

test('crates.io publishes from the verified stable tag when enabled', () => {
Expand All @@ -153,18 +155,19 @@ test('PR plans exclude full-only targets independently of their smoke evidence',
const pr = plan('pr').runtimes.include;
const full = plan('full').runtimes.include;
assert.equal(pr.length, 8);
assert.equal(full.length, 15);
assert.equal(full.length, 16);
assert.ok(pr.every(row => row.validation === 'inference'));
assert.deepEqual(full.filter(row => !row.full_only), pr);
const rocm = full.find(row => row.id === 'linux-x86_64-rocm');
assert.equal(rocm.validation, 'inference');
assert.equal(rocm.full_only, true);
assert.equal(full.filter(row => row.validation === 'artifact').length, 2);
assert.deepEqual(full.filter(row => row.validation === 'package').map(row => row.id), ['windows-aarch64-cpu']);
assert.ok(!pr.some(row => row.id === rocm.id));
const release = results({ full: true, release: true });
release.plan.outputs.runtimes = JSON.stringify({ include: full });
assert.doesNotThrow(() => gate(release, true));
// An eight-package controller must reject a fifteen-package candidate.
// An eight-package controller must reject a sixteen-package candidate.
for (const row of full.filter(row => row.full_only)) {
delete release['package_' + row.id.replaceAll('-', '_')];
}
Expand Down Expand Up @@ -310,7 +313,7 @@ test('the repository switch routes Windows CUDA 13 and eligible Linux and macOS
assert.ok(labels.some(label => label.includes('SKIPPY_DEPOT_RUNNERS_ENABLED')), name);
for (const label of labels) {
if (name.startsWith('llama-upgrade') && label === '${{ matrix.runner }}') continue;
if (name === 'ci' && label === 'windows-2022') continue;
if (name === 'ci' && ['windows-2022', 'windows-11-arm'].includes(label)) continue;
assert.match(label, /vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true'.*depot-/, name);
}
}
Expand All @@ -319,7 +322,7 @@ test('the repository switch routes Windows CUDA 13 and eligible Linux and macOS
const body = workflow.split(`\n ${job}:\n`)[1].split(/\n \w+:\n/)[0];
const expected = job === 'package_windows_x86_64_cuda13'
? "${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-windows-2022-8' || 'windows-2022' }}"
: 'windows-2022';
: job === 'package_windows_aarch64_cpu' ? 'windows-11-arm' : 'windows-2022';
assert.equal(body.match(/^ runs-on: (.+)$/m)?.[1], expected, job);
}
});
Expand Down Expand Up @@ -529,7 +532,7 @@ test('main can reuse only a receipt for the exact release dispatch and candidate

test('every candidate checkout opts in to fork code only for the approved-fork controller (real #222 context)', () => {
const refs = workflow.match(/^ +ref: \$\{\{ env\.SKIPPY_CI_SOURCE_REF \}\}\n.*$/gm);
assert.equal(refs.length, 26);
assert.equal(refs.length, 27);
for (const ref of refs) assert.match(ref, /\n +allow-unsafe-pr-checkout: \$\{\{ inputs\.approved_fork_pr != '' \}\}$/);
assert.equal(workflow.match(/allow-unsafe-pr-checkout:/g).length, refs.length);
});
Expand Down
26 changes: 25 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -885,6 +885,29 @@ jobs:
download-package: 'true'
candidate_artifact: ${{ inputs.candidate_artifact }}
candidate_sha: ${{ inputs.candidate_sha }}
package_windows_aarch64_cpu:
name: Build and package · Windows ARM64 CPU
needs: [plan, quality]
if: needs.plan.outputs.profile == 'full'
runs-on: windows-11-arm
timeout-minutes: 240
env:
SKIPPY_CI_PROFILE: ${{ needs.plan.outputs.profile }}
steps:
- uses: actions/checkout@fbc6f3992d24b796d5a048ff273f7fcc4a7b6c09 # v5.1.0
with:
ref: ${{ env.SKIPPY_CI_SOURCE_REF }}
allow-unsafe-pr-checkout: ${{ inputs.approved_fork_pr != '' }}
persist-credentials: false
- uses: ./.github/actions/ci-package
with:
runtime-id: windows-aarch64-cpu
host-id: windows-aarch64
build-cli: 'true'
setup-host: 'true'
smoke: 'none'
candidate-artifact: ${{ inputs.candidate_artifact }}
candidate-sha: ${{ inputs.candidate_sha }}
package_windows_x86_64_cpu:
name: Build and verify archive · Windows x64 CPU
needs: [plan, quality]
Expand Down Expand Up @@ -1172,7 +1195,8 @@ jobs:
package_darwin_aarch64_cpu, package_darwin_aarch64_metal,
package_linux_x86_64_cpu, package_linux_x86_64_cuda12, package_linux_x86_64_cuda13, package_linux_x86_64_rocm, package_linux_x86_64_vulkan,
package_linux_aarch64_cpu, package_linux_aarch64_cuda12, package_linux_aarch64_cuda13,
package_windows_x86_64_cpu, package_windows_x86_64_cuda12, package_windows_x86_64_cuda13, package_windows_x86_64_rocm, package_windows_x86_64_vulkan,
package_windows_aarch64_cpu, package_windows_x86_64_cpu, package_windows_x86_64_cuda12,
package_windows_x86_64_cuda13, package_windows_x86_64_rocm, package_windows_x86_64_vulkan,
smoke_linux_x86_64_vulkan_nvidia, smoke_linux_x86_64_vulkan_amd,
release_smoke_linux_x86_64_cuda12, release_smoke_linux_aarch64_cuda12, release_smoke_linux_x86_64_cuda13,
smoke_windows_cuda, smoke_windows_rocm
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ jobs:
verify:
outputs:
artifact_only: ${{ steps.inventory.outputs.artifact_only }}
package_only: ${{ steps.inventory.outputs.package_only }}
needs: [admission, validation, inference, documentation_validation]
runs-on: ${{ vars.SKIPPY_DEPOT_RUNNERS_ENABLED == 'true' && 'depot-ubuntu-24.04-4' || 'ubuntu-24.04' }}
timeout-minutes: 120
Expand Down Expand Up @@ -237,12 +238,16 @@ jobs:
RELEASE_TAG: ${{ needs.admission.outputs.tag }}
SOURCE_SHA: ${{ needs.admission.outputs.source }}
ARTIFACT_ONLY: ${{ needs.verify.outputs.artifact_only }}
PACKAGE_ONLY: ${{ needs.verify.outputs.package_only }}
PRERELEASE: ${{ needs.admission.outputs.prerelease }}
run: |
notes="Skippy source: $SOURCE_SHA"
if [[ -n "$ARTIFACT_ONLY" ]]; then
notes+=$'\n\n'"Build and archive checks only. Inference qualification is pending for $ARTIFACT_ONLY."
fi
if [[ -n "$PACKAGE_ONLY" ]]; then
notes+=$'\n\n'"Package verification only for $PACKAGE_ONLY."
fi
gh release edit "$RELEASE_TAG" --draft=false --prerelease="$PRERELEASE" --notes "$notes"
publish_crates:
needs: [admission, publish]
Expand Down
8 changes: 8 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ Use `just build cpu` for a portable CPU runtime. macOS defaults to Metal;
Linux and Windows default to CPU unless a backend is supplied. CUDA builds
require the matching pinned toolkit and architecture list.

On Windows, `just build cpu` defaults to the machine's architecture. To build
the Windows ARM64 CPU runtime and CLI from x64, run
`scripts/build-windows.ps1 -Backend cpu -TargetArch arm64`. Install the Rust
`aarch64-pc-windows-msvc` target and the Visual Studio ARM64 MSVC and LLVM
Clang components. The Windows build places its runtime beside the executable
in Cargo's `<target-dir>/<triple>/<profile>` directory. Full CI and tagged
releases package Windows ARM64 CPU builds and verify the archive inputs.

Default tests are offline. Model-backed and accelerator qualification use
explicit certification commands and immutable fixtures. Do not make default
tests depend on a network, writable home directory, or undeclared system tools.
Expand Down
8 changes: 4 additions & 4 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ skippy: build
skippy-cli-build:
@cargo build --locked -p skippy-cli --features dynamic-native-runtime

skippy-cli-release-build:
@cargo build --release --locked -p skippy-cli --features dynamic-native-runtime
skippy-cli-release-build target="":
@cargo build --release --locked -p skippy-cli --features dynamic-native-runtime {{ if target == "" { "" } else { "--target " + quote(target) } }}

[unix]
release-runtime-build backend="" target="":
Expand All @@ -73,12 +73,12 @@ release-runtime-build backend="" target="":
scripts/package-native-runtime.sh "${args[@]}"

[windows]
release-runtime-build backend="cpu" target="x86_64-pc-windows-msvc":
release-runtime-build backend="cpu" target="":
@powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build-windows.ps1 -Backend "{{ backend }}" -Target "{{ target }}" -BuildProfile release -RuntimeOnly

release-build backend="" target="":
@just release-runtime-build "{{ backend }}" "{{ target }}"
@just skippy-cli-release-build
@just skippy-cli-release-build "{{ target }}"

package-builder-release-build backend="cpu":
@just release-runtime-build "{{ backend }}"
Expand Down
24 changes: 13 additions & 11 deletions ci/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ concurrency coalescing. If prior coverage cannot be verified, require both
device smokes and Graph Contracts. The gate rejects missing, skipped, failed
or cancelled selected jobs. Exact promoted-release receipt reuse avoids
repeating validated work. Scheduled, manual and reusable full validation
require all fifteen packages and Graph Contracts. Main merges do not start the
require all sixteen packages and Graph Contracts. Main merges do not start the
separate Spark qualification ladder.

The protected inference workflow has its own qualification paths, separate from
Expand Down Expand Up @@ -269,7 +269,7 @@ for the Linux ARM64 CUDA 13 device job. Compiler-only CUDA builds always use the
manifest architecture lists. The only source override is the immutable bundle
produced by the protected-main llama upgrade workflow.

`targets.json` defines four hosts and fifteen active runtimes. After the
`targets.json` defines five hosts and sixteen active runtimes. After the
automation checks and Quality canary, each CPU job builds and verifies its
runtime and the shared CLI for that platform. Linux x64 builds its shared CLI
on Ubuntu 24.04 for compatibility with the compiler images. Each backend
Expand All @@ -284,21 +284,23 @@ CUDA device job uses the existing ARM64 CUDA 13 runner group to use the larger
Spark pool; x64 CUDA 13 device coverage remains required for releases. The full
CI gate matches all package jobs to the plan and checks required device results.

Full CI and releases also require archive checks for Windows x64 CPU, CUDA 12,
CUDA 13 and ROCm 7.2.0. The Windows jobs use Windows
Server 2022 for the pinned SDKs and compatible MSVC toolset. CUDA
Full CI and releases also package Windows ARM64 CPU on Windows 11 ARM64
and verify the CLI and runtime archive inputs without running smoke.
Windows x64 CPU, CUDA 12, CUDA 13, ROCm 7.2.0 and Vulkan require archive smoke.
The x64 Windows jobs use Windows Server 2022 for the pinned SDKs and
compatible MSVC toolset. CUDA
components and the HIP SDK are downloaded from checksum-pinned inputs. The
Windows CUDA installer includes the NVML development component for both pinned
toolkits and requires a nonempty `include/nvml.h` before exposing the toolkit
to package builds. This supplies headers for llama.cpp's driver-library lookup.
The Linux ROCm job uses the published compiler image resolved to a digest and
adds the SHA-256-pinned ROCm 7.2.4 BLAS libraries to a job-local prefix for
compilation and packaged GPU inference smoke.
Windows users need the Microsoft Visual C++ x64 Redistributable and, for CUDA,
a compatible NVIDIA driver. Linux ROCm users need a matching ROCm runtime
Windows users need the Microsoft Visual C++ Redistributable for their
architecture and, for CUDA, a compatible NVIDIA driver. Linux ROCm users need a matching ROCm runtime
visible to the system loader. The three Windows CUDA/ROCm variants require real Windows inference in two native
JY VM jobs: CUDA 12 and 13 share a guest, and ROCm runs independently after its
archive builds. Full CI requires both results. Windows CPU and Vulkan retain archive-only
archive builds. Full CI requires both results. Windows x64 CPU and Vulkan retain archive-only
verification. See [Windows GPU smoke](windows-gpu-smoke.md) for profiles and recovery.

## Vulkan packages and device smoke
Expand All @@ -307,7 +309,7 @@ Full CI, scheduled nightly CI, release validation and llama-upgrade full CI
build Linux x64 and Windows x64 Vulkan packages with Vulkan SDK 1.4.328.1.
Both reuse the existing platform CLI producer. SDK version, header hash and
shader compiler identity travel inside the source-bound runtime receipt. The short PR/main profile stays
at eight runtimes; the full roster has fifteen.
at eight runtimes. The full roster has sixteen.

The Linux archive is built on hosted Ubuntu 24.04, then the same bytes run
on the existing x64 CUDA 13 NVIDIA pool and the x64 ROCm AMD pool. Both literal-pool device
Expand Down Expand Up @@ -354,11 +356,11 @@ Native runners carry `self-hosted`, `Linux`, `X64`, `skippy-ephemeral`, and

The job remains full-only: nightly, manual full CI, release candidates and
llama-upgrade full validation require it; routine PR and main-push checks do
not run it. The short plan retains eight runtimes and full CI retains fifteen.
not run it. The short plan retains eight runtimes and full CI retains sixteen.
`full_only` selects scheduling independently of the manifest's `validation`
evidence requirement. Linux ROCm requires inference evidence within its package
job. Windows CUDA/ROCm runtimes require detached inference evidence from the two
full-only Windows VM jobs. Windows CPU and Vulkan remain archive-only. Neither
full-only Windows VM jobs. Windows x64 CPU and Vulkan remain archive-only. Neither
backend retains a standalone rehearsal workflow.

The existing plan resolves the ROCm compiler image to a digest. The ROCm job
Expand Down
Loading
Loading