-
Notifications
You must be signed in to change notification settings - Fork 5
121 lines (113 loc) · 3.53 KB
/
Copy pathci.yml
File metadata and controls
121 lines (113 loc) · 3.53 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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: CI
on:
push:
branches: [main]
pull_request:
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
MSRV: "1.96.0"
jobs:
test:
name: test (${{ matrix.os }}, ${{ matrix.toolchain }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
toolchain: ["1.96.0"]
include:
- os: ubuntu-latest
toolchain: stable
- os: ubuntu-latest
toolchain: beta
env:
HPKE_NG_SKIP_COMPILE_FAIL: ${{ matrix.toolchain != '1.96.0' && '1' || '' }}
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt
- name: cargo fmt
if: runner.os != 'Windows'
run: cargo fmt --check
- name: cargo fmt (fuzz workspace)
if: runner.os != 'Windows'
working-directory: fuzz
run: cargo fmt --check
- name: cargo clippy (default)
run: cargo clippy --all-targets -- -D warnings
- name: cargo clippy (no-default-features)
run: cargo clippy --lib --no-default-features -- -D warnings
- name: cargo clippy (all features)
run: cargo clippy --all-targets --features pq,hazmat-kat-internals,hazmat-differential -- -D warnings
- name: cargo test
run: cargo test
- name: cargo test (pq)
run: cargo test --features pq
- name: cargo test (pq + hazmat-kat-internals)
run: cargo test --features pq,hazmat-kat-internals
- name: cargo test (pq + both hazmat features)
run: cargo test --features pq,hazmat-differential,hazmat-kat-internals
- name: cargo build --release
run: cargo build --release
no-std:
name: no-std check (thumbv7em-none-eabihf)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
targets: thumbv7em-none-eabihf
- run: cargo check --target thumbv7em-none-eabihf --no-default-features
- run: cargo check --target thumbv7em-none-eabihf --no-default-features --features pq
doc:
name: cargo doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- env:
RUSTDOCFLAGS: -D warnings
run: cargo doc --no-deps --features pq
deny:
name: cargo-deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: EmbarkStudios/cargo-deny-action@v2
with:
command: check advisories bans licenses sources
package:
name: cargo package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.MSRV }}
- run: cargo package --locked
fuzz:
name: fuzz (${{ matrix.target }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- pk_from_bytes
- enc_from_bytes
- open
- key_schedule
- derive_key_pair
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@v2
with:
tool: cargo-fuzz
- name: cargo fuzz run ${{ matrix.target }}
run: cargo fuzz run --target "$(rustc -vV | sed -n 's/^host: //p')" ${{ matrix.target }} -- -max_total_time=60 -rss_limit_mb=4096