-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.35 KB
/
Copy pathci.yml
File metadata and controls
81 lines (67 loc) · 2.35 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
# opt into Node.js 24 for actions before the June 16 2026 forced migration
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
# RUSTFLAGS is set per-job; an empty global RUSTFLAGS passes a literal ""
# argument to kani-compiler and causes "multiple input filenames" crashes.
jobs:
test:
name: test + clippy
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- name: install nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: cache nix store
uses: actions/cache@v4
with:
path: /nix/store
key: nix-${{ runner.os }}-${{ hashFiles('flake.nix', 'flake.lock') }}
restore-keys: |
nix-${{ runner.os }}-
- name: clippy (deny warnings)
run: nix develop --command cargo clippy --all-targets --all-features -- -D warnings
- name: unit + integration tests
run: nix develop --command cargo test
- name: doc tests
run: nix develop --command cargo test --doc
kani:
name: kani proofs
runs-on: ubuntu-latest
# Kani manages its own toolchain; do not use nix here.
# The official action installs kani-verifier and the required nightly.
steps:
- uses: actions/checkout@v4
- name: remove toolchain override for kani
# rust-toolchain.toml pins nightly-2025-12-03 for local nix dev,
# but kani-github-action manages its own nightly. the file causes a
# version mismatch that crashes kani-compiler with "multiple input
# filenames" -- remove it so kani can use its own toolchain freely.
run: rm -f rust-toolchain.toml
- name: run kani proofs
uses: model-checking/kani-github-action@v1
with:
# --harness accepts a regex; this matches all proofs:: harnesses
args: "--harness proofs::"
bench-check:
name: benchmarks compile
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- name: install nix
uses: cachix/install-nix-action@v27
with:
nix_path: nixpkgs=channel:nixos-unstable
- name: check benchmarks compile
run: nix develop --command cargo bench --no-run