-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.5 KB
/
test.yml
File metadata and controls
60 lines (47 loc) · 1.5 KB
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
name: Test
on:
pull_request:
branches: [main]
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
env:
TOOLCHAIN_VER: 1.88.0
jobs:
test:
name: Debug test ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-15-intel
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
- os: windows-latest
target: x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: ${{ env.TOOLCHAIN_VER }}
cache: true
target: ${{ matrix.target }}
- run: rustup target add ${{ matrix.target }} --toolchain ${{ env.TOOLCHAIN_VER }} || true
- uses: Swatinem/rust-cache@v2
with:
key: main-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
lookup-only: ${{ github.event_name == 'pull_request' }}
save-if: ${{ github.event_name != 'pull_request' }}
- uses: Swatinem/rust-cache@v2
if: github.event_name == 'pull_request'
with:
key: pr-${{ github.event.pull_request.number }}-${{ matrix.target }}-${{ hashFiles('**/Cargo.lock') }}
save-if: true
- name: Run cargo test (debug)
run: cargo test --workspace --all-targets --all-features