name: Inference efficiency candidate
on:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: inference-efficiency-${{ github.ref }}
cancel-in-progress: false
jobs:
model-free:
if: github.ref == 'refs/heads/main'
runs-on: ${{ matrix.runner }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
include:
- runner: windows-11-arm
target: aarch64-pc-windows-msvc
- runner: windows-2025
target: x86_64-pc-windows-msvc
- runner: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
env:
CARGO_UNSTABLE_CHECKSUM_FRESHNESS: 'true'
CARGO_BUILD_FINGERPRINT: content
EFFICIENCY_TARGET: ${{ matrix.target }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 with:
persist-credentials: false
- uses: ./.github/actions/rust-toolchain
with:
toolchain: nightly-2026-10-22-${{ matrix.target }}
- name: Select external compiler and receipt storage
shell: pwsh
working-directory: ${{ runner.temp }}
run: |
"CARGO_TARGET_DIR=$(Join-Path $env:RUNNER_TEMP 'Prism-Efficiency-Target')" >> $env:GITHUB_ENV
"EFFICIENCY_EVIDENCE=$(Join-Path $env:RUNNER_TEMP 'Prism-Efficiency-Evidence')" >> $env:GITHUB_ENV
- name: Reuse locked dependencies and this compiler's candidate artifacts
uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 with:
path: |
~/.cargo/registry/index
~/.cargo/registry/cache
${{ env.CARGO_TARGET_DIR }}
key: prism-efficiency-v1-${{ matrix.target }}-${{ runner.os }}-${{ hashFiles('Cargo.lock', 'Cargo.toml', 'src/**', 'tests/**', 'tools/**', 'rust-toolchain.toml') }}
restore-keys: |
prism-efficiency-v1-${{ matrix.target }}-${{ runner.os }}-
- name: Require exact source correctness, analyzers and production linking
shell: pwsh
working-directory: ${{ runner.temp }}
run: |
$ErrorActionPreference = 'Stop'
$PSNativeCommandUseErrorActionPreference = $true
$manifest = Join-Path $env:GITHUB_WORKSPACE 'Cargo.toml'
python -B -m unittest discover -s (Join-Path $env:GITHUB_WORKSPACE '.github/ci') -p test_inference_efficiency.py
cargo +nightly-2026-10-22 fmt --manifest-path $manifest --all -- --check
cargo +nightly-2026-10-22 check --manifest-path $manifest --locked --release -p prism-inference --lib --no-default-features
python -B (Join-Path $env:GITHUB_WORKSPACE '.github/ci/inference_efficiency.py') --manifest $manifest --evidence $env:EFFICIENCY_EVIDENCE
cargo +nightly-2026-10-22 clippy --manifest-path $manifest --locked --release -p prism-inference -p prism-inference-server --all-targets --features prism-inference/parallel-rows,prism-inference-server/parallel-rows -- -D warnings
cargo +nightly-2026-10-22 build --manifest-path $manifest --locked --release -p prism-inference -p prism-inference-server --bins --features prism-inference/parallel-rows,prism-inference-server/parallel-rows
- name: Retain exact control receipts and failure logs
if: always() && env.EFFICIENCY_EVIDENCE != ''
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 with:
name: inference-efficiency-${{ matrix.target }}-${{ github.sha }}-${{ github.run_attempt }}
path: ${{ env.EFFICIENCY_EVIDENCE }}
if-no-files-found: error
retention-days: 14