-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (53 loc) · 1.75 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
name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
jobs:
check:
runs-on: ubuntu-latest
strategy:
matrix:
rust_channel: ["1.64.0", "stable", "nightly"]
feature_set: ["--no-default-features"]
include:
- rust_channel: "nightly"
feature_set: "--all-features"
steps:
- name: install rustup
run: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile=minimal
- name: install rust
run: rustup install ${{matrix.rust_channel}} && rustup default ${{matrix.rust_channel}}
- uses: actions/checkout@v4
- name: cargo check (without feature_set)
run: cargo check --verbose
- name: cargo check (with feature_set)
run: cargo check --verbose ${{matrix.feature_set}}
check-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
test:
runs-on: ubuntu-latest
env:
MIRIFLAGS: "-Zmiri-strict-provenance"
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: test
run: cargo test --all-features
- name: miri test
run: cargo miri test --all-features