Skip to content

release: prepare v0.20.0 #179

release: prepare v0.20.0

release: prepare v0.20.0 #179

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
jobs:
maintainer-ci:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- windows-latest
- macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
- name: Static verification — repo shape
run: node ./tests/static-verify.js
- name: Run unit and doc validation
run: npm test
- name: Run Rust CLI parity tests
run: cargo test --locked -p agent-guardrails-cli
- name: Build Rust native runtime
run: npm run build:rust-native
- name: Run unit and doc validation with packaged Rust runtime default
run: npm test
- name: Run bounded-scope demo
run: node ./examples/bounded-scope-demo/scripts/run-demo.mjs all
- name: Run pattern-drift demo
run: node ./examples/pattern-drift-demo/scripts/run-demo.mjs all
- name: Run interface-drift demo
run: node ./examples/interface-drift-demo/scripts/run-demo.mjs all
- name: Run boundary-violation demo
run: node ./examples/boundary-violation-demo/scripts/run-demo.mjs all
- name: Run source-test-relevance demo
run: node ./examples/source-test-relevance-demo/scripts/run-demo.mjs all
- name: Run OSS benchmark suite
run: npm run benchmark
- name: Run CLI help smoke
run: node ./bin/agent-guardrails.js help
- name: Run npm pack dry run
run: npm pack --dry-run
- name: Run install smoke
run: node ./tests/install-smoke.js
- name: Run installed Rust runtime smoke
run: npm run smoke:rust-installed
- name: Check Rust release readiness
run: npm run release:rust-readiness -- --require-rust-default
native-matrix:
name: Native ${{ matrix.platform }}-${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
platform: win32
arch: x64
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
platform: linux
arch: x64
- os: macos-15-intel
target: x86_64-apple-darwin
platform: darwin
arch: x64
- os: macos-15
target: aarch64-apple-darwin
platform: darwin
arch: arm64
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Setup Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Build native runtime
run: npm run build:rust-native -- --target ${{ matrix.target }} --platform ${{ matrix.platform }} --arch ${{ matrix.arch }}
- name: Run installed Rust runtime smoke on native runner
run: npm run smoke:rust-installed
- name: Upload native runtime
uses: actions/upload-artifact@v4
with:
name: native-${{ matrix.platform }}-${{ matrix.arch }}
path: native/${{ matrix.platform }}-${{ matrix.arch }}
if-no-files-found: error
native-package-smoke:
runs-on: ubuntu-latest
needs:
- native-matrix
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Download Windows native runtime
uses: actions/download-artifact@v4
with:
name: native-win32-x64
path: native/win32-x64
- name: Download Linux native runtime
uses: actions/download-artifact@v4
with:
name: native-linux-x64
path: native/linux-x64
- name: Download macOS x64 native runtime
uses: actions/download-artifact@v4
with:
name: native-darwin-x64
path: native/darwin-x64
- name: Download macOS arm64 native runtime
uses: actions/download-artifact@v4
with:
name: native-darwin-arm64
path: native/darwin-arm64
- name: Restore native executable bits
run: chmod +x native/linux-x64/agent-guardrails-rs native/darwin-x64/agent-guardrails-rs native/darwin-arm64/agent-guardrails-rs
- name: Check complete Rust release readiness
run: npm run release:rust-readiness -- --require-rust-default --require-complete-native-matrix
- name: Run npm pack dry run with full native matrix
run: npm pack --dry-run
- name: Run installed package smoke with full native matrix
run: npm run smoke:rust-installed