Skip to content

Commit 25c925d

Browse files
committed
Revamp CI
1 parent cc8062d commit 25c925d

File tree

1 file changed

+63
-18
lines changed

1 file changed

+63
-18
lines changed

.github/workflows/ci.yaml

Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,78 @@
1-
21
name: CI
32

43
on:
54
push:
5+
branches: [main]
66
pull_request:
7-
workflow_dispatch:
87

98
permissions:
109
contents: read
1110

1211
jobs:
13-
test:
14-
name: Test suite
15-
runs-on:
16-
- ubuntu-latest
17-
- windows-latest
18-
timeout-minutes: 2
12+
check:
13+
name: Check (${{ matrix.os.name }} | ${{ matrix.profile.title }})
14+
runs-on: ${{ matrix.os.runner }}
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
os:
19+
- name: Linux (x64)
20+
runner: ubuntu-latest
21+
target: x86_64-unknown-linux-gnu
22+
23+
- name: Linux (ARM)
24+
runner: ubuntu-latest
25+
target: aarch64-unknown-linux-gnu
26+
27+
- name: MacOS (x64)
28+
runner: macos-latest
29+
target: x86_64-apple-darwin
30+
31+
- name: MacOS (ARM)
32+
runner: macos-latest
33+
target: aarch64-apple-darwin
34+
35+
- name: Windows (x64)
36+
runner: windows-latest
37+
target: x86_64-pc-windows-msvc
38+
39+
profile:
40+
- title: Debug
41+
arg: --debug
42+
43+
- title: Release
44+
arg: --release
45+
1946
steps:
2047
- uses: actions/checkout@v4
21-
- uses: dtolnay/rust-toolchain@nightly
22-
- run: cargo test
23-
24-
test-release:
25-
name: Test suite
26-
runs-on:
27-
- ubuntu-latest
28-
- windows-latest
29-
timeout-minutes: 2
48+
49+
- uses: dtolnay/[email protected]
50+
with:
51+
targets: ${{ matrix.os.target }}
52+
53+
- name: Build (${{ matrix.profile.title }})
54+
run: cargo build ${{ matrix.profile.arg }} --all-features
55+
56+
- name: Test (${{ matrix.profile.title }})
57+
run: cargo test ${{ matrix.profile.arg }} --all-features
58+
59+
miri:
60+
name: Miri
61+
runs-on: ${{ matrix.os.runner }}
62+
strategy:
63+
matrix:
64+
os:
65+
- name: Linux (x64)
66+
runner: ubuntu-latest
67+
target: x86_64-unknown-linux-gnu
68+
3069
steps:
3170
- uses: actions/checkout@v4
71+
3272
- uses: dtolnay/rust-toolchain@nightly
33-
- run: cargo test --release
73+
with:
74+
targets: ${{ matrix.os.target }}
75+
components: miri
76+
77+
- name: Make sure Miri is still too strong
78+
run: "! cargo +nightly miri test"

0 commit comments

Comments
 (0)