-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (77 loc) · 2.38 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
name: Rs
on:
push:
paths:
- 'rust/**'
- '!rust/README.rst'
schedule:
- cron: "0 0 1 * *"
env:
CARGO_TERM_COLOR: always
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build_and_test:
name: Rust
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
toolchain:
- nightly # currently = 1.81
- beta # currently = 1.80
- stable # currently = 1.79
os:
- ubuntu-latest
- windows-latest
include:
- toolchain: stable
os: macos-13
- toolchain: stable
os: macos-latest
- toolchain: "1.78"
os: ubuntu-latest
- toolchain: "1.77"
os: ubuntu-latest
- toolchain: "1.76"
os: ubuntu-latest
- toolchain: "1.75"
os: ubuntu-latest
- toolchain: "1.74"
os: ubuntu-latest
- toolchain: "1.73"
os: ubuntu-latest
- toolchain: "1.72"
os: ubuntu-latest
- toolchain: "1.71"
os: ubuntu-latest
- toolchain: "1.70"
os: ubuntu-latest
- toolchain: "1.69"
os: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain }}
- run: rustup default ${{ matrix.toolchain }}
- run: cd rust && cargo test
if: ${{ matrix.toolchain != 'nightly' }}
env:
RUSTFLAGS: '-Copt-level=2'
- run: cd rust && cargo test
if: ${{ matrix.toolchain == 'nightly' }}
env:
CARGO_INCREMENTAL: '0'
RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Copt-level=1'
RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests -Copt-level=1'
- name: rust-grcov
if: ${{ matrix.toolchain == 'nightly' }}
run: cargo install grcov && grcov rust --path-mapping rust/mapping.json -t cobertura -o .
- name: Upload coverage reports to Codecov
if: ${{ matrix.toolchain == 'nightly' }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: Rust