-
-
Notifications
You must be signed in to change notification settings - Fork 51
107 lines (95 loc) · 2.68 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
name: Rust
on: [push, pull_request]
env:
CARGO_INCREMENTAL: 0
CARGO_NET_RETRY: 10
RUSTUP_MAX_RETRIES: 10
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
RUSTFLAGS: "-D warnings"
# Disable debuginfo for faster compile
CARGO_PROFILE_DEV_DEBUG: 0
CARGO_PROFILE_TEST_DEBUG: 0
CARGO_PROFILE_BENCH_DEBUG: 0
CI: 1
CARGO_MAKE_CI: 1
CARGO_MAKE_RUN_CHECK_FORMAT: 1
CARGO_MAKE_RUN_CLIPPY: 1
CARGO_MAKE_BUILD_BENCH: 1
jobs:
rust:
name: Rust
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
target: [x86_64, i686, aarch64]
rust:
- stable
- beta
- nightly
- 1.70.0
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Linux Install Rust toolchain
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}-unknown-linux-gnu
override: true
components: clippy,rustfmt
- name: Windows Install Rust toolchain
if: ${{ matrix.os == 'windows-latest' }}
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}-pc-windows-msvc
override: true
components: clippy,rustfmt
- name: Cache Dependencies
uses: Swatinem/rust-cache@v2
- name: Install Cargo Make
if: ${{ matrix.target == 'x86_64' }}
uses: davidB/rust-cargo-make@v1
- name: cargo-make ci-flow
if: ${{ matrix.target == 'x86_64' }}
uses: actions-rs/cargo@v1
with:
command: make
args: ci-flow
- name: linux cargo-make build-only
if: ${{ matrix.target != 'x86_64' && matrix.os == 'ubuntu-latest' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features --target ${{ matrix.target }}-unknown-linux-gnu
- name: windows cargo-make build-only
if: ${{ matrix.target != 'x86_64' && matrix.os == 'windows-latest' }}
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features --target ${{ matrix.target }}-pc-windows-msvc
miri:
name: Miri
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: miri
- name: Run Miri
uses: actions-rs/cargo@v1
with:
command: miri
args: test
env:
MIRIFLAGS: -Zmiri-strict-provenance