-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (47 loc) · 1.56 KB
/
rust.yml
File metadata and controls
60 lines (47 loc) · 1.56 KB
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
54
55
56
57
58
59
60
name: CI
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: rust-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
check-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup ESP-RS toolchain (RISC-V)
uses: esp-rs/xtensa-toolchain@v1.6
with:
default: true
ldproxy: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Cache cargo artifacts
uses: Swatinem/rust-cache@v2
- name: Setup cargo config
run: cp .cargo/config.toml.dist .cargo/config.toml
- name: Install cargo-deny
run: cargo install cargo-deny --locked
- name: Deny (licenses, advisories, bans)
run: cargo deny check
- name: Check workspace
run: cargo check --workspace --release
- name: Test pure crates
shell: bash
run: |
host_target="$(rustc -vV | awk '/^host:/ {print $2}')"
cargo test -p rustyfarian-network-pure --target "${host_target}"
cargo test -p wifi-pure --features mock --target "${host_target}"
cargo test -p lora-pure --features mock --target "${host_target}"
cargo test -p espnow-pure --features mock --target "${host_target}"
cargo test -p ota-pure --target "${host_target}"
cargo test -p rustyfarian-esp-hal-ota --no-default-features --target "${host_target}"