-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 917 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
name: CI
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
# This build image is compatable with AWS Linux 2
runs-on: ubuntu-latest
strategy:
matrix:
target:
- x86_64-unknown-linux-gnu
env:
RUSTFLAGS: "-C target-cpu=native"
RUST_BACKTRACE: full
name: Lint & Test
steps:
- name: Checkout source Git repo
uses: actions/checkout@v3
- uses: Swatinem/rust-cache@v2
- run: rustup toolchain install stable --profile minimal --target ${{ matrix.target }}
- run: rustup component add rustfmt clippy
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- run: cargo fetch
- run: cargo fmt -- --check --color always
- run: cargo clippy --all-targets --all-features -- -D warnings
- run: cargo test --release