-
-
Notifications
You must be signed in to change notification settings - Fork 11
45 lines (35 loc) · 1.11 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
name: Continuous Integration
on:
push:
branches: [main]
pull_request:
jobs:
build-and-test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [1.84.0, nightly]
exclude:
- { os: windows-latest, rust: nightly }
- { os: macos-latest, rust: nightly }
runs-on: ${{ matrix.os }}
steps:
- name: checkout
uses: actions/checkout@v4
- name: install rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: cargo check
run: cargo check --workspace --locked
- name: cargo fmt
run: cargo fmt --all -- --check
- name: cargo clippy
run: cargo clippy --workspace --all-targets --all-features -- -D warnings
- name: cargo test
run: cargo test --workspace --locked --all-targets
- name: cargo build
if: matrix.rust == 'stable' && matrix.os == 'ubuntu-latest'
run: cargo build --workspace --release --locked --all-targets