-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (78 loc) · 2.21 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
86
name: CI
on:
push:
branches:
- main
jobs:
build_job:
name: Unit Tests
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
build:
[
x86_64-linux,
x86_64-macos,
x86_64-windows,
x86_64-linux-miri,
x86_64-macos-miri,
x86_64-windows-miri
]
include:
- build: x86_64-linux
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
miri: false
- build: x86_64-macos
os: macos-latest
rust: stable
target: x86_64-apple-darwin
miri: false
- build: x86_64-windows
os: windows-latest
rust: stable
target: x86_64-pc-windows-msvc
miri: false
- build: x86_64-linux-miri
os: ubuntu-latest
rust: nightly
target: x86_64-unknown-linux-gnu
miri: true
- build: x86_64-macos-miri
os: macos-latest
rust: nightly
target: x86_64-apple-darwin
miri: true
- build: x86_64-windows-miri
os: windows-latest
rust: nightly
target: x86_64-pc-windows-msvc
miri: true
steps:
- name: Checkout sources
uses: actions/checkout@v3
- name: Install ${{ matrix.rust }} toolchain
uses: dtolnay/rust-toolchain@stable
if: matrix.miri == false
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
- name: Install ${{ matrix.rust }} toolchain w/ Miri
uses: dtolnay/rust-toolchain@stable
if: matrix.miri == true
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
components: miri
- name: Rust cache
uses: Swatinem/rust-cache@v2
- name: Generate test files
run: cargo run --package test-gen --release
- name: Test workspace
if: matrix.miri == false
run: cargo test --workspace
- name: Test workspace w/ Miri
if: matrix.miri == true
run: cargo miri test --workspace miri