-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (30 loc) · 741 Bytes
/
rust.yml
File metadata and controls
41 lines (30 loc) · 741 Bytes
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
name: Rust
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
rust:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache Rust
uses: Swatinem/rust-cache@v2
- name: Install Rust
uses: dtolnay/rust-toolchain@1.95
with:
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --locked --all-targets -- -D warnings
- name: Test
run: cargo test --locked
- name: Build release
run: cargo build --release --locked