83 lines
2.8 KiB
YAML
83 lines
2.8 KiB
YAML
name: verify
|
|
|
|
# Full quality gate for pull requests to main.
|
|
on:
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: alkane-verify
|
|
env:
|
|
CARGO_TARGET_DIR: target
|
|
CARGO_BUILD_JOBS: 2
|
|
WX_PREFIX: /root/.cache/wx-3.3.3-linux
|
|
WX_RS_WXCONFIG: /root/.cache/wx-3.3.3-linux/bin/wx-config
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build dependencies
|
|
run: |
|
|
apt-get update -qq
|
|
apt-get install -y -qq --no-install-recommends \
|
|
libssl-dev pkg-config ca-certificates >/dev/null
|
|
|
|
- name: Compute wxWidgets cache key
|
|
id: wx-key
|
|
run: bash ci/wx-cache-key.sh
|
|
|
|
- name: Cache vendored wxWidgets build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-linux
|
|
key: ${{ steps.wx-key.outputs.key }}
|
|
|
|
- name: Build wxWidgets (once, then cached)
|
|
run: |
|
|
if [ ! -x "$WX_PREFIX/bin/wx-config" ]; then
|
|
bash scripts/build-wx-linux.sh
|
|
else
|
|
echo "wx prefix restored from cache"
|
|
fi
|
|
|
|
- name: Clippy (our crate, warnings are errors)
|
|
run: |
|
|
rustup component add clippy >/dev/null 2>&1 || true
|
|
cargo clippy -p alkane-gui --no-deps --release --bins --offline -- -D warnings
|
|
cargo clippy -p alkane-artifacts -p alkane-flash -p alkane-cli --all-targets --offline -- -D warnings
|
|
|
|
- name: Build
|
|
run: cargo build --release -p alkane-gui --offline
|
|
|
|
- name: Unit tests
|
|
run: |
|
|
cargo test -p alkane-gui --offline
|
|
cargo test -p alkane-artifacts -p alkane-flash -p alkane-cli --offline
|
|
|
|
- name: Microbenchmarks
|
|
run: cargo test -p alkane-gui -p alkane-artifacts --release --offline -- --ignored --nocapture bench_ --test-threads=1
|
|
|
|
- name: Headless UI self-test
|
|
run: |
|
|
apt-get update -qq && apt-get install -y -qq --no-install-recommends \
|
|
xvfb xauth dbus-x11 fonts-dejavu-core >/dev/null
|
|
BIN=target/release/alkane-toolkit
|
|
xvfb-run -a env GDK_BACKEND=x11 ALKANE_SELFTEST=1 "$BIN"
|
|
|
|
# Advisory audit is best-effort: it needs the RustSec DB over the network,
|
|
# which the vendored/offline build otherwise never touches, so a locked-down
|
|
# runner must not fail the gate on it. Accepted advisories live in
|
|
# .cargo/audit.toml.
|
|
- name: Dependency audit (best-effort)
|
|
continue-on-error: true
|
|
run: |
|
|
if command -v cargo-audit >/dev/null 2>&1; then
|
|
cargo audit || echo "cargo audit reported findings (see .cargo/audit.toml for accepted ones)"
|
|
else
|
|
echo "cargo-audit not installed on this runner; skipping"
|
|
fi
|
|
- name: Clean generated Toolkit build
|
|
if: always()
|
|
run: python3 ci/cleanup-generated.py
|