-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.29 KB
/
Copy pathci.yml
File metadata and controls
36 lines (34 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: ci
# amon is Windows-only by design (it is a Windows API monitor), so the build and the
# pure-logic self-checks run on windows-latest. `amon --selftest` exits non-zero when
# any check fails, which is what this workflow gates on.
on:
push:
branches: [main]
# Release tags must be built too: a tag whose own CI never ran is how a stale
# lockfile reached v0.1.1/v0.1.2 unnoticed.
tags: ['v*']
pull_request:
workflow_dispatch:
jobs:
build-and-selftest:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Build (release)
run: cargo build --release --locked
- name: Pure-logic self-checks
shell: pwsh
run: |
$root = Join-Path $env:RUNNER_TEMP 'amon-ci'
./target/release/amon.exe --selftest --root $root
if ($LASTEXITCODE -ne 0) { throw "selftest failed with exit $LASTEXITCODE" }
- name: Baseline + report smoke
shell: pwsh
run: |
$root = Join-Path $env:RUNNER_TEMP 'amon-ci'
./target/release/amon.exe --baseline --root $root
if ($LASTEXITCODE -ne 0) { throw "baseline failed" }
Test-Path (Join-Path $root 'baseline.json') | Out-Null
./target/release/amon.exe --report --root $root