-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (47 loc) · 1.29 KB
/
rust.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
name: Rust
on:
push:
tags:
- v*
paths-ignore:
- .github/workflows/*
pull_request:
paths-ignore:
- .github/workflows/*
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
delpoy:
name: Rust deploy
strategy:
fail-fast: true
matrix:
os: [ubuntu, windows, macos]
run-args: [--verbose --profile release --all-targets --all-features]
runs-on: ${{ matrix.os }}-latest
permissions:
contents: read
issues: write
steps:
- name: Git checkout
uses: actions/checkout@v4
- name: Setup rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable,nightly
components: clippy,rustfmt
- name: Cargo check
run: cargo +stable check ${{ matrix.run-args }}
- name: Cargo clippy
run: cargo +nightly clippy ${{ matrix.run-args }} -- -D warnings
- name: Cargo fmt
run: cargo +nightly fmt --all --check --verbose
- name: Cargo build
run: cargo +stable build ${{ matrix.run-args }}
- name: Cargo test
run: cargo +stable test ${{ matrix.run-args }}
- name: Cargo bench
run: cargo +stable bench ${{ matrix.run-args }}
# FIXME:
# - uses: actions-rust-lang/audit@v1