-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (44 loc) · 1.19 KB
/
ci-rs.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
name: CI-RS
on:
push:
paths:
- "**/.github/workflows/ci-rs.yml"
- "**/Cargo.lock"
- "**/src/**"
- "**/Cargo.toml"
- "**/rust-toolchain"
- "**/.taplo.toml"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Set more verbose terminal output
CARGO_TERM_VERBOSE: true
RUST_BACKTRACE: 1
# Cancel old builds on new commit for same workflow + branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
ci-rs:
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
rust-toolchain:
- stable
steps:
- name: Get source code
uses: actions/checkout@v3
- name: Setup ${{ matrix.rust-toolchain }} rust toolchain with caching
uses: brndnmtthws/rust-action@v1
with:
toolchain: ${{ matrix.rust-toolchain }}
components: rustfmt, clippy
enable-sccache: "true"
- name: Build
run: cargo build --release
- name: Test
run: cargo test --release
- name: Lint
run: cargo fmt --all -- --check
# && cargo clippy --verbose -- -D warnings