Skip to content

deps(ci): bump actions/checkout from 6 to 7 #243

deps(ci): bump actions/checkout from 6 to 7

deps(ci): bump actions/checkout from 6 to 7 #243

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
jobs:
quality:
name: Quality Gates (ubuntu)
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.92.0
components: rustfmt, clippy
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Format check
run: cargo fmt --all -- --check
- name: Lint
run: cargo clippy --workspace --all-targets -- -D warnings
- name: Test workspace
run: cargo test --workspace
- name: Validate Vitis feature path
run: cargo check -p inference_bridge --features vitis
stdin-integration:
name: CLI stdin integration (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain (pwsh)
shell: pwsh
run: |
rustup toolchain install 1.92.0 --profile minimal
rustup default 1.92.0
rustup show active-toolchain
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Run stdin integration tests
run: cargo test -p wraithrun --test stdin_integration
cross-platform:
name: Cross-platform compile (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macos-latest
- windows-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.92.0
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Workspace check
run: cargo check --workspace
live-metrics-benchmark:
name: Live metrics benchmark regression (ubuntu)
runs-on: ubuntu-latest
timeout-minutes: 20
env:
LIVE_BENCH_MAX_FIRST_TOKEN_MS: "15000"
LIVE_BENCH_MAX_TOTAL_MS: "30000"
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.92.0
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Capture live-mode metrics output
run: |
cargo run -p wraithrun -- \
--task "Investigate unauthorized SSH keys" \
--live \
--model ./models/__ci_missing_model__.onnx \
--live-fallback-policy dry-run-on-error \
--format json > live-metrics.json
- name: Enforce live metrics regression thresholds
run: |
python - <<'PY'
import json
import os
import sys
with open("live-metrics.json", "r", encoding="utf-8") as handle:
payload = json.load(handle)
metrics = payload.get("live_run_metrics")
if metrics is None:
raise SystemExit("missing live_run_metrics in live run output")
required = [
"total_run_duration_ms",
"live_attempt_duration_ms",
"live_attempt_count",
"live_success_count",
"fallback_count",
"live_success_rate",
"fallback_rate",
]
missing = [field for field in required if field not in metrics]
if missing:
raise SystemExit(f"missing required live_run_metrics fields: {missing}")
first_token_latency_ms = metrics.get("first_token_latency_ms")
total_run_duration_ms = metrics.get("total_run_duration_ms")
live_success_rate = metrics.get("live_success_rate")
fallback_rate = metrics.get("fallback_rate")
top_failure_reasons = metrics.get("top_failure_reasons", [])
if first_token_latency_ms is None:
raise SystemExit("first_token_latency_ms should be present for fallback benchmark output")
if not isinstance(top_failure_reasons, list) or not top_failure_reasons:
raise SystemExit("top_failure_reasons should include at least one live failure reason in fallback benchmark output")
max_first_token_ms = int(os.environ["LIVE_BENCH_MAX_FIRST_TOKEN_MS"])
max_total_ms = int(os.environ["LIVE_BENCH_MAX_TOTAL_MS"])
if first_token_latency_ms > max_first_token_ms:
raise SystemExit(
f"first_token_latency_ms regression: {first_token_latency_ms} > {max_first_token_ms}"
)
if total_run_duration_ms > max_total_ms:
raise SystemExit(
f"total_run_duration_ms regression: {total_run_duration_ms} > {max_total_ms}"
)
if not (0.0 <= live_success_rate <= 1.0):
raise SystemExit(f"live_success_rate out of range: {live_success_rate}")
if not (0.0 <= fallback_rate <= 1.0):
raise SystemExit(f"fallback_rate out of range: {fallback_rate}")
print(
"validated live metrics:",
{
"first_token_latency_ms": first_token_latency_ms,
"total_run_duration_ms": total_run_duration_ms,
"live_success_rate": live_success_rate,
"fallback_rate": fallback_rate,
"top_failure_reasons": top_failure_reasons,
},
)
PY
live-success-e2e:
name: Live success e2e (self-hosted windows)
if: ${{ vars.WRAITHRUN_LIVE_SUCCESS_E2E_ENABLED == 'true' }}
runs-on:
- self-hosted
- Windows
- X64
timeout-minutes: 45
env:
WRAITHRUN_LIVE_E2E_MODEL: ${{ vars.WRAITHRUN_LIVE_E2E_MODEL }}
WRAITHRUN_LIVE_E2E_TOKENIZER: ${{ vars.WRAITHRUN_LIVE_E2E_TOKENIZER }}
WRAITHRUN_LIVE_E2E_TASK: ${{ vars.WRAITHRUN_LIVE_E2E_TASK }}
WRAITHRUN_LIVE_E2E_MAX_STEPS: ${{ vars.WRAITHRUN_LIVE_E2E_MAX_STEPS }}
WRAITHRUN_LIVE_E2E_MAX_NEW_TOKENS: ${{ vars.WRAITHRUN_LIVE_E2E_MAX_NEW_TOKENS }}
WRAITHRUN_LIVE_E2E_INCLUDE_ADAPTER: ${{ vars.WRAITHRUN_LIVE_E2E_INCLUDE_ADAPTER }}
WRAITHRUN_ORT_DYLIB_PATH: ${{ vars.WRAITHRUN_LIVE_E2E_ORT_DYLIB_PATH }}
WRAITHRUN_LIVE_E2E_ARTIFACT_DIR: live-e2e-artifacts
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain
shell: powershell
run: |
$cargobin = "$env:USERPROFILE\.cargo\bin"
$env:Path = "$cargobin;$env:Path"
if (-not (Get-Command rustup -ErrorAction SilentlyContinue)) {
Write-Host "rustup not found, installing..."
Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe
.\rustup-init.exe -y --default-toolchain 1.92.0 --profile minimal
Remove-Item .\rustup-init.exe
}
rustup toolchain install 1.92.0 --profile minimal
rustup default 1.92.0
# Resolve the real toolchain bin directory (cargo proxy may be absent)
$realBin = Split-Path (& rustup which cargo)
Write-Host "Toolchain bin: $realBin"
$env:Path = "$realBin;$env:Path"
cargo --version
$utf8 = New-Object System.Text.UTF8Encoding($false)
[IO.File]::AppendAllText($env:GITHUB_ENV, "CARGO_BIN=$realBin`n", $utf8)
[IO.File]::AppendAllText($env:GITHUB_PATH, "$realBin`n", $utf8)
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
continue-on-error: true
- name: Validate live e2e fixture configuration
shell: powershell
run: |
if ([string]::IsNullOrWhiteSpace($env:WRAITHRUN_LIVE_E2E_MODEL) -or [string]::IsNullOrWhiteSpace($env:WRAITHRUN_LIVE_E2E_TOKENIZER)) {
Write-Error "WRAITHRUN_LIVE_E2E_MODEL and WRAITHRUN_LIVE_E2E_TOKENIZER must be configured when WRAITHRUN_LIVE_SUCCESS_E2E_ENABLED=true"
exit 1
}
- name: Run live success e2e test (no fallback)
shell: powershell
run: |
$bin = if ($env:CARGO_BIN) { $env:CARGO_BIN } else { "$env:USERPROFILE\.cargo\bin" }
$env:Path = "$bin;$env:Path"
Write-Host "cargo at: $(Get-Command cargo -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)"
cargo test -p wraithrun --features inference_bridge/onnx --test stdin_integration live_mode_e2e_success_without_fallback_when_fixture_is_configured -- --exact --nocapture
- name: Upload live success e2e artifacts
uses: actions/upload-artifact@v7
with:
name: live-success-e2e-artifacts
path: cli/live-e2e-artifacts/*.json
if-no-files-found: error