-
Notifications
You must be signed in to change notification settings - Fork 2
54 lines (44 loc) · 1.36 KB
/
ci.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
name: CI
on: [push, pull_request]
jobs:
build_and_test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: macos-latest
target: x86_64-apple-darwin
- os: macos-latest
target: aarch64-apple-darwin
steps:
- name: install musl tools
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update
sudo apt-get install -y musl musl-dev musl-tools
- uses: actions/checkout@v4
name: checkout
with:
fetch-depth: 1
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- run: cargo test --target ${{ matrix.target }} --verbose
if: ${{ matrix.target != 'aarch64-apple-darwin' }}
name: test stable
- uses: dtolnay/rust-toolchain@nightly
with:
target: ${{ matrix.target }}
components: clippy, rustfmt
- run: cargo clippy --target ${{ matrix.target }} -q
name: clippy
- run: cargo fmt -q
name: fmt
- name: test nightly
run: cargo test --target ${{ matrix.target }} --verbose
if: ${{ matrix.target != 'aarch64-apple-darwin' }}