-
Notifications
You must be signed in to change notification settings - Fork 1
110 lines (91 loc) · 2.86 KB
/
pull_request.yml
File metadata and controls
110 lines (91 loc) · 2.86 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
name: Pull Request
on:
pull_request:
branches:
- "main"
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: "-C target-feature=+pclmulqdq,+avx2,+aes"
jobs:
test:
name: Test
runs-on: "${{ matrix.os }}"
strategy:
matrix:
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
steps:
- &checkout
name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
- name: Show CPU info
if: ${{ matrix.os == 'ubuntu-latest' }}
run: lscpu
- name: Setup
uses: ./.github/actions/setup
- name: Install NASM
if: ${{ matrix.os == 'windows-latest' }}
uses: ilammy/setup-nasm@72793074d3c8cdda771dba85f6deafe00623038b # 1.5.2
- name: Run tests (all features)
run: cargo test --workspace --verbose --all-features --no-fail-fast ${{ runner.os == 'macOS' && '-- --test-threads=1' || '' }}
- name: Run tests (no features)
run: cargo test --workspace --verbose --no-fail-fast ${{ runner.os == 'macOS' && '-- --test-threads=1' || '' }}
miri:
name: Miri
runs-on: "ubuntu-latest"
steps:
- &checkout
name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 6.0.2
with:
submodules: recursive
fetch-depth: 0
persist-credentials: false
- name: Setup
uses: ./.github/actions/setup
with:
nightly: true
components: "miri"
- name: Run miri test
env:
RUSTFLAGS: "-C target-cpu=native"
MIRIFLAGS: "-Zmiri-disable-isolation"
run: cargo miri t -p cryprot-codes -p cryprot-core
lint:
name: Lint
runs-on: "ubuntu-latest"
steps:
- *checkout
- name: Setup
uses: ./.github/actions/setup
with:
nightly: true
components: "rustfmt"
- name: Check formatting
run: cargo fmt --all --check
# use stable toolchain for clippy to avoid CI failures due to unfinished lints
- name: Install toolchain
uses: dtolnay/rust-toolchain@efa25f7f19611383d5b0ccf2d1c8914531636bf9
with:
toolchain: "stable"
components: "clippy"
- name: Check Clippy
run: cargo clippy --workspace --all-features --examples --lib -- -D warnings
docs:
name: Docs
runs-on: "ubuntu-latest"
env:
# deny rustdoc warnings
RUSTDOCFLAGS: -D warnings
steps:
- *checkout
- name: Setup
uses: ./.github/actions/setup
with:
nightly: true
components: "rust-docs"
- name: Check docs
run: cargo doc --workspace --verbose --all-features --no-deps -Zunstable-options -Zrustdoc-scrape-examples