-
Notifications
You must be signed in to change notification settings - Fork 1
55 lines (48 loc) · 1.85 KB
/
build.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
#file: noinspection SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection,SpellCheckingInspection
name: build
on: [push, pull_request]
env:
rust_toolchain: nightly
jobs:
compile:
name: Compile
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- riscv32imc-esp-espidf
- xtensa-esp32-espidf
- xtensa-esp32s2-espidf
- xtensa-esp32s3-espidf
idf-version:
- release/v4.4
- release/v5.0
steps:
- name: Setup | Checkout
uses: actions/checkout@v3
- name: Setup | Rust
if: matrix.target == 'riscv32imc-esp-espidf'
uses: dtolnay/rust-toolchain@v1
with:
toolchain: ${{ env.rust_toolchain }}
components: rustfmt, clippy, rust-src
- name: Setup | Rust for Xtensa
if: matrix.target != 'riscv32imc-esp-espidf'
uses: esp-rs/xtensa-toolchain@v1.5
with:
default: true
- name: Build | Format Check
run: cargo fmt -- --check
- name: Build | Clippy
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
# ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults
RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}"
run: cargo clippy --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort -- -Dwarnings
- name: Build | Compile
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
# ESP_IDF_SDKCONFIG_DEFAULTS: $(pwd)/.github/configs/sdkconfig.defaults
RUSTFLAGS: "${{ matrix.idf-version == 'release/v5.0' && '--cfg espidf_time64' || ''}}"
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -Zbuild-std-features=panic_immediate_abort