-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (84 loc) · 2.55 KB
/
Copy pathci.yml
File metadata and controls
94 lines (84 loc) · 2.55 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
82
83
84
85
86
87
88
89
90
91
92
93
94
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Caliper CI — runs on every push and pull request.
# Mirrors PLAN.md §7 verification matrix.
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-D warnings"
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
fmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
with:
components: rustfmt
- run: cargo fmt --all --check
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy --workspace --all-targets -- -D warnings
test:
name: test (${{ matrix.target.name }})
runs-on: ${{ matrix.target.os }}
strategy:
fail-fast: false
matrix:
target:
- { name: linux-gnu, os: ubuntu-latest, triple: x86_64-unknown-linux-gnu }
- { name: linux-musl, os: ubuntu-latest, triple: x86_64-unknown-linux-musl }
- { name: linux-arm64, os: ubuntu-24.04-arm, triple: aarch64-unknown-linux-gnu }
- { name: macos-x86_64, os: macos-13, triple: x86_64-apple-darwin }
- { name: macos-arm64, os: macos-latest, triple: aarch64-apple-darwin }
- { name: windows, os: windows-latest, triple: x86_64-pc-windows-msvc }
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
with:
targets: ${{ matrix.target.triple }}
- uses: Swatinem/rust-cache@v2
- run: cargo test --workspace --target ${{ matrix.target.triple }}
deny:
name: cargo-deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
miri:
name: miri (caliper-anvil)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: miri
- uses: Swatinem/rust-cache@v2
- run: cargo +nightly miri test -p caliper-anvil
audit:
name: xtask audits
runs-on: ubuntu-latest
needs: [fmt]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.88.0
- uses: Swatinem/rust-cache@v2
- run: cargo xtask spdx-audit
- run: cargo xtask utf8-audit
- run: cargo xtask network-audit