-
Notifications
You must be signed in to change notification settings - Fork 8
66 lines (54 loc) · 1.63 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: CI
on:
push:
paths-ignore:
- "**/README.md"
pull_request:
paths-ignore:
- "**/README.md"
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SSID: ""
PASSWORD: ""
# Cancel any currently running workflows from the same PR, branch, or
# tag when a new workflow is triggered.
#
# https://stackoverflow.com/a/66336834
concurrency:
cancel-in-progress: true
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
jobs:
verify:
name: "Check ${{ matrix.chip }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
chip: [esp32, esp32c2, esp32c3, esp32c6, esp32h2, esp32s2, esp32s3]
steps:
- uses: actions/checkout@v4
# Rust toolchain for Xtensa:
- if: ${{ contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.chip) }}
uses: esp-rs/[email protected]
with:
default: true
buildtargets: ${{ matrix.chip }}
ldproxy: false
# Rust toolchain for RISC-V:
- if: ${{ !contains(fromJson('["esp32", "esp32s2", "esp32s3"]'), matrix.chip) }}
uses: dtolnay/rust-toolchain@stable
with:
target: riscv32imc-unknown-none-elf,riscv32imac-unknown-none-elf
components: clippy,rustfmt,rust-src
- uses: Swatinem/rust-cache@v2
- name: Generate and check project
run: cd xtask && cargo run -- check ${{ matrix.chip }}
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- name: Run tests
run: cargo test