-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (45 loc) · 1.3 KB
/
rust_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
46
47
48
name: Rust CI
on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
rust-checks:
name: Rust Checks
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
crate: ["relay", "wifi", "dc", "input_controller", "output_controller"]
action:
- command: check
args: --release
- command: fmt
args: --all -- --check --color always
- command: clippy
args: --all-features --workspace
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust
uses: esp-rs/[email protected]
with:
default: true
buildtargets: esp32
ldproxy: true
- name: Enable caching
uses: Swatinem/rust-cache@v2
with:
workspaces: "relay/ -> target
wifi/ -> target
input_controller/ -> target
output_controller/ -> target
- name: Xtensa rustup target
run: espup install
- name: Source espup script
run: . $HOME/export-esp.sh
- name: Run command
run: cargo ${{ matrix.action.command }} --manifest-path=${{ matrix.crate }}/Cargo.toml ${{ matrix.action.args }}