-
Notifications
You must be signed in to change notification settings - Fork 114
94 lines (73 loc) · 2.68 KB
/
rust.yaml
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
name: Rust
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
build:
strategy:
matrix:
rust_channel: ["stable", "beta", "nightly", "1.65.0"]
feature_set: ["--features collections,boxed"]
include:
- rust_channel: "nightly"
feature_set: "--all-features"
- rust_channel: "stable"
feature_set: "--no-default-features"
exclude:
- rust_channel: "nightly"
feature_set: "--features collections,boxed"
runs-on: ubuntu-latest
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust channel
run: rustup install ${{matrix.rust_channel}} && rustup default ${{matrix.rust_channel}}
- uses: actions/checkout@v4
- name: Run tests (no features)
run: cargo test --verbose
- name: Run tests (features)
run: cargo test --verbose ${{matrix.feature_set}}
miri:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-strict-provenance -Zmiri-ignore-leaks"
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain nightly -y
- name: Install miri
run: rustup toolchain install nightly --allow-downgrade --profile minimal --component miri
- uses: actions/checkout@v4
- name: Run miri
run: cargo miri test --all-features
valgrind:
runs-on: ubuntu-latest
env:
# Don't leak-check, as Rust globals tend to cause false positives.
CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUNNER: "valgrind --suppressions=valgrind.supp --leak-check=no --error-exitcode=1 --gen-suppressions=all"
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust stable
run: rustup install stable && rustup default stable
- name: Install valgrind
run: sudo apt update && sudo apt install valgrind
- uses: actions/checkout@v4
- name: Test under valgrind (no features)
run: cargo test --verbose
- name: Test under valgrind (features)
run: cargo test --verbose --features collections,boxed
benches:
runs-on: ubuntu-latest
steps:
- name: Install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: Install rust nightly
run: rustup install nightly && rustup default nightly
- uses: actions/checkout@v4
- name: Check that benches build
run: cargo check --benches --all-features