-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (65 loc) · 2.3 KB
/
ci.yml
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
name: CI
on: [push, pull_request]
env:
CARGO_INCREMENTAL: '0'
CARGO_PROFILE_DEV_DEBUG: '0'
CARGO_PROFILE_TEST_DEBUG: '0'
CARGO_TERM_COLOR: always
jobs:
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install --no-self-update --profile=minimal --component=rustfmt -- stable
- run: cargo fmt -- --check --color=always
test:
name: Test
runs-on: ubuntu-latest
env:
RUSTDOCFLAGS: --deny warnings
RUSTFLAGS: --warn rust-2018-idioms --deny warnings
RUST_BACKTRACE: '1'
strategy:
matrix:
toolchain:
- stable
- beta
- nightly
- '1.41.0'
features:
-
- alloc
- std
include:
- toolchain: stable
components: clippy
- toolchain: beta
components: clippy
- toolchain: nightly
components: clippy
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@21dc36fb71dd22e3317045c0c31a3f4249868b17
with:
toolchain: ${{ matrix.toolchain }}
components: ${{ matrix.components }}
- uses: Swatinem/rust-cache@v2
- run: cargo doc --verbose --no-default-features '--features=${{ matrix.features }}' --no-deps
- run: cargo check --verbose --no-default-features '--features=${{ matrix.features }}'
if: ${{ !contains(matrix.components, 'clippy') }}
- run: cargo clippy --verbose --tests --no-default-features '--features=${{ matrix.features }}'
if: contains(matrix.components, 'clippy')
- run: cargo build --verbose --tests --no-default-features '--features=${{ matrix.features }}'
if: contains(fromJSON('["stable", "beta", "nightly"]'), matrix.toolchain)
- run: cargo test --verbose --no-default-features '--features=${{ matrix.features }}'
if: contains(fromJSON('["stable", "beta", "nightly"]'), matrix.toolchain)
miri:
name: Soundness test with Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: rustup toolchain install --no-self-update nightly --profile=minimal --component=miri && rustup default nightly
- uses: Swatinem/rust-cache@v2
- run: cargo miri setup
- run: cargo miri test -- soundness