-
-
Notifications
You must be signed in to change notification settings - Fork 58
88 lines (81 loc) · 2.48 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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI # Continuous Integration
on:
push:
branches:
- main
pull_request:
jobs:
test:
name: Test Suite (${{ matrix.os-name }})
runs-on: ${{ matrix.os }}
env:
CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_RUSTFLAGS: -C target-feature=+sse2
strategy:
matrix:
include:
- os: macos-latest
os-name: mac
features: default
- os: ubuntu-latest
os-name: ubuntu
features: default
- os: windows-latest
os-name: windows
features: default
- os: ubuntu-latest
os-name: android
target: aarch64-linux-android
features: termux --no-default-features
- os: ubuntu-latest
os-name: ish
target: i686-unknown-linux-musl
features: default
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
- name: Run tests (cross)
if: ${{ matrix.target != null }}
uses: houseabsolute/actions-rust-cross@v0
with:
command: test
target: ${{ matrix.target }}
args: "--features ${{ matrix.features }} --workspace"
cross-version: 7b79041c9278769eca57fae10c74741f5aa5c14b
- name: Run tests (default)
if: ${{ matrix.target == null }}
run: cargo test --features ${{ matrix.features }} --workspace
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
env:
CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_RUSTFLAGS: -C target-feature=+sse2
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- uses: Swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all --check
clippy:
name: Clippy
runs-on: ubuntu-latest
env:
CARGO_TARGET_I586_UNKNOWN_LINUX_MUSL_RUSTFLAGS: -C target-feature=+sse2
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy check
run: cargo clippy --all-targets --all-features --workspace -- -D warnings