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
name: CI
permissions:
contents: read
pull-requests: write
on:
push:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: test
strategy:
matrix:
toolchain:
- stable
os:
- windows-latest
- windows-11-arm
- macos-latest
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-gnu
- os: ubuntu-24.04-arm
target: aarch64-unknown-linux-musl
- os: windows-latest
target: x86_64-pc-windows-msvc
- os: windows-11-arm
target: aarch64-pc-windows-msvc
- os: macos-latest
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- run: rustup update
- uses: Swatinem/rust-cache@v2
- run: rustup target add ${{ matrix.target }}
- name: Install musl tools
if: matrix.target == 'x86_64-unknown-linux-musl' || matrix.target == 'aarch64-unknown-linux-musl'
run: sudo apt update && sudo apt install -y musl-dev
- run: cargo build --target ${{ matrix.target }} --verbose
- run: cargo test --target ${{ matrix.target }} --verbose
rustfmt:
name: rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup update stable && rustup default stable && rustup component add rustfmt
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all --check --verbose
clippy:
name: clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup update stable && rustup default stable && rustup component add clippy
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings
cargo_deny:
name: cargo_deny
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- run: rustup update stable && rustup default stable && cargo install cargo-deny
- uses: Swatinem/rust-cache@v2
- run: cargo deny -L error check