CI is now two workflows: verify.yml (pull requests + non-main pushes) runs the clippy gate, build, unit tests, microbenchmarks, the headless self-test, and a best-effort dependency audit; release.yml (main) repeats the clippy gate + audit before its existing build/test/selftest/package/release, then refreshes the committed README badges and pushes any change back (best-effort, and a badges- only push does not bump the version, so it does not loop). Security: cargo audit found a build-time-only advisory (h2 0.3 in the wx-rs build script's reqwest 0.11 subtree, never linked into the runtime binary and never executed on Linux). The vendored/offline tree can't upgrade it without re-vendoring, so it is documented and accepted in .cargo/audit.toml (mirrored in deny.toml with the project's permissive-license policy). Badges: ci/gen-badges.py emits self-contained shields-style SVGs into badges/ (tests, coverage 36%, bench, LOC 12.5k, clippy clean, dependencies, license) -- committed and referenced by relative path so a self-hosted Gitea renders them with no external service. README rewritten around what the toolkit actually does today (discover / monitor / operate / install), with build, CLI, dev, and architecture sections and the dual-license note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Djv3oncM4LxTS5tb61Ako6
73 lines
2.6 KiB
YAML
73 lines
2.6 KiB
YAML
name: verify
|
|
|
|
# Pre-merge quality gate: clippy + build + tests + microbenchmarks + the headless
|
|
# UI self-test, plus a best-effort dependency audit. Runs on pull requests and on
|
|
# pushes to any branch EXCEPT main (main is gated by release.yml, which repeats
|
|
# these checks before it cuts a release -- so no work is duplicated on main).
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches-ignore: [main]
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: alkane-ci
|
|
env:
|
|
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: Cache vendored wxWidgets build
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: /root/.cache/wx-3.3.3-linux
|
|
key: wx-3.3.3-${{ runner.os }}-${{ hashFiles('thirdparty/wx-rs/VERSION') }}
|
|
|
|
- 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: cargo clippy -p alkane-gui --no-deps --release --bins --offline -- -D warnings
|
|
|
|
- name: Build
|
|
run: cargo build --release -p alkane-gui --offline
|
|
|
|
- name: Unit tests
|
|
run: cargo test -p alkane-gui --offline
|
|
|
|
- name: Microbenchmarks
|
|
run: cargo test -p alkane-gui --release --offline -- --ignored --nocapture bench_
|
|
|
|
- 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
|