Repository navigation
59 lines (50 loc) · 1.52 KB
/
Copy pathtest.yml
File metadata and controls
59 lines (50 loc) · 1.52 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
name: Test
on:
workflow_call:
outputs:
matrix-result:
description: 'Matrix job result'
value: ${{ jobs.test.result }}
env:
RUSTFLAGS: -Dwarnings
jobs:
test:
strategy:
fail-fast: false
matrix:
target:
- x86_64-unknown-linux-musl
- x86_64-pc-windows-msvc
- aarch64-apple-darwin
- x86_64-apple-darwin
include:
- target: x86_64-unknown-linux-musl
os: ubuntu-24.04
display-os: Linux
- target: x86_64-pc-windows-msvc
os: windows-2025
display-os: Windows
- target: aarch64-apple-darwin
os: macos-26
display-os: macOS – aarch64
- target: x86_64-apple-darwin
os: macos-26
display-os: macOS – x86_64
name: ${{ matrix.display-os }}
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # 7.0.0
- name: Setup Rust Toolchain
run: |
rustup set profile minimal
rustup target add ${{ matrix.target }}
- name: Install musl-gcc (Linux only)
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt-get update
sudo apt-get install -y musl-tools
- name: Cache Dependencies
uses: swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 # 2.9.1
- name: Run Cargo Tests
run: cargo test --workspace --target ${{ matrix.target }}