-
Notifications
You must be signed in to change notification settings - Fork 1
114 lines (91 loc) · 2.55 KB
/
rust.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
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
name: Rust
env:
RUSTFLAGS: -Dwarnings
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
CARGO_UNSTABLE_SPARSE_REGISTRY: true
on:
push:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
pull_request:
paths-ignore:
- 'README.md'
- 'LICENSE'
- '.gitignore'
jobs:
check_format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Check format
run: cargo fmt --all -- --check
run_clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --all --all-features --no-deps
test-32bit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@v2
with:
tool: nextest
- run: rustup target add i686-unknown-linux-musl
- uses: Swatinem/rust-cache@v2
- run: |
cargo nextest run --target i686-unknown-linux-musl
cargo test --doc --target i686-unknown-linux-musl
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test
test-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo test --release
test-sanitize-address:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
run: |
rustup toolchain install nightly --no-self-update --profile minimal
rustup default nightly
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo +nightly test
env:
RUSTFLAGS: -Zsanitizer=address ${{ env.RUSTFLAGS }}
RUSTDOCFLAGS: -Zsanitizer=address ${{ env.RUSTFLAGS }}
test-sanitize-thread:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install latest nightly
run: |
rustup toolchain install nightly --component rust-src --no-self-update --profile minimal
rustup default nightly
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: |
cargo +nightly test \
-Z build-std \
--target "$(rustc -vV | grep host | cut -d : -f 2 | tr -d '[:space:]')" \
--features thread-sanitizer
env:
RUSTFLAGS: -Zsanitizer=thread ${{ env.RUSTFLAGS }}
RUSTDOCFLAGS: -Zsanitizer=thread ${{ env.RUSTFLAGS }}