-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (50 loc) · 1.35 KB
/
build.yaml
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
name: build
on:
push:
paths-ignore:
- "image/**"
- "**.md"
workflow_dispatch: {} # manual trigger
env:
RUST_LOG: "debug"
RUST_LOG_SPAN_EVENTS: "new,close"
RUST_BACKTRACE: "1"
jobs:
lint_fmt:
name: Lint / Formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 # Uses rust-toolchain file
with:
components: rustfmt
- name: cargo fmt --check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --check
lint_deps:
name: Lint / Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 # Uses rust-toolchain file
- run: cargo install cargo-deny
- run: cargo deny check
test_linux:
name: Test / Linux
runs-on: ubuntu-latest
env:
CARGO_FLAGS: --profile ci
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1 # Uses rust-toolchain file
- uses: swatinem/rust-cache@v2
with:
cache-on-failure: true
- name: build
run: cargo test ${{ env.CARGO_FLAGS }} --no-run
- name: run tests
run: cargo test ${{ env.CARGO_FLAGS }}
- name: check git diff
run: git diff && git diff-index --quiet HEAD # Ensure all generated files are up-to-date