-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (34 loc) · 958 Bytes
/
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
# CI workflow runs all source quality tests. It does not build the release binary.
#
name: CI
on:
push:
branches: [ main, actions_test ]
pull_request:
branches: [ main ]
jobs:
qc:
name: Source QC
env:
RUST_BACKTRACE: 1
CARGO_TERM_COLOR: always
BUILD_OPTIONS: --release --features tflite
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.84.0
components: clippy, rustfmt
- name: Check source formatting
run: cargo fmt --check
- name: Build
run: cargo build ${{ env.BUILD_OPTIONS }}
- name: Test
run: cargo test ${{ env.BUILD_OPTIONS }}
- name: Clippy
run: cargo clippy ${{ env.BUILD_OPTIONS }} -- -D warnings
- name: Clippy on tests
run: cargo clippy ${{ env.BUILD_OPTIONS }} --tests -- -D warnings