-
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (79 loc) · 2.36 KB
/
tests.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
name: "Rust tests"
on:
pull_request:
merge_group:
push:
branches:
- main
jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "clippy"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run checks
run: cargo hack clippy --feature-powerset --no-dev-deps -- -D warnings
formatting:
name: Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "rustfmt"
- name: Run checks
run: cargo fmt --all -- --check
tests:
name: Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run tests
run: cargo hack test --feature-powerset
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "miri"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: Run tests through miri
env:
RUSTFLAGS: "-Zrandomize-layout"
run: cargo hack miri test --feature-powerset
address-sanitizer:
name: "Sanitizer: ${{ matrix.sanitizer }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sanitizer: [address, memory, thread, leak]
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: "nightly"
components: "rust-src"
- uses: taiki-e/install-action@cargo-hack
- uses: Swatinem/rust-cache@v2
- name: "Run tests through ${{ matrix.sanitizer }} sanitizer"
env:
ASAN_OPTIONS: "detect_stack_use_after_return=1"
RUST_BACKTRACE: "0"
RUSTDOCFLAGS: "-Zrandomize-layout -Zsanitizer=${{ matrix.sanitizer }}"
RUSTFLAGS: "-Zrandomize-layout -Zsanitizer=${{ matrix.sanitizer }}"
run: cargo hack test --feature-powerset -Zbuild-std --target x86_64-unknown-linux-gnu