-
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (75 loc) · 2.12 KB
/
Copy pathci.yml
File metadata and controls
98 lines (75 loc) · 2.12 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
95
96
97
98
name: Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
checks:
name: Format, lint, test, and audit
runs-on: ubuntu-latest
timeout-minutes: 45
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
run: rustup show
- name: Cache Rust build output
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Install security tools
uses: taiki-e/install-action@v2
with:
tool: cargo-deny,cargo-audit,cargo-sbom
- name: Install cargo-license
run: cargo install --locked cargo-license --version 0.7.0
- name: Run checks
run: scripts/checks.sh
- name: Generate SBOM
run: scripts/generate-sbom.sh
- name: Reproducible package/build check
run: scripts/reproducible_build_check.sh
platform:
name: Platform tests (${{ matrix.os }})
runs-on: ${{ matrix.os }}
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install Rust toolchain
run: rustup show
- name: Cache Rust build output
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: Test default features
run: cargo test --all-targets
- name: Check no_std library build
run: cargo check --no-default-features --lib
- name: Test no default features
run: cargo test --no-default-features --all-targets
miri:
name: Miri
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout repository
uses: actions/checkout@v6
- name: Install nightly with Miri
run: |
rustup toolchain install nightly --component miri
cargo +nightly miri setup
- name: Run Miri tests
run: cargo +nightly miri test --no-default-features