-
Notifications
You must be signed in to change notification settings - Fork 35
74 lines (70 loc) · 2.47 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
67
68
69
70
71
72
73
74
name: CI
on:
push:
paths-ignore: '**/*.md'
pull_request:
paths-ignore: '**/*.md'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
include:
- target: riscv32imc-esp-espidf
idf-version: release/v4.4
rustflags: "-C default-linker-libraries"
- target: riscv32imc-esp-espidf
idf-version: v5.1.3
rustflags: "-C default-linker-libraries --cfg espidf_time64"
ble5-example: true
- target: riscv32imc-esp-espidf
idf-version: v5.2.1
rustflags: "-C default-linker-libraries --cfg espidf_time64"
- target: riscv32imac-esp-espidf
idf-version: v5.1.3
rustflags: "-C default-linker-libraries --cfg espidf_time64"
mcu: esp32c6
- target: xtensa-esp32-espidf
idf-version: release/v4.4
- target: xtensa-esp32-espidf
idf-version: v5.1.3
rustflags: "--cfg espidf_time64"
ble-example: true
- target: xtensa-esp32-espidf
idf-version: v5.2.1
rustflags: "--cfg espidf_time64"
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Install Rust for Xtensa
uses: esp-rs/xtensa-toolchain@v1.5
with:
default: true
ldproxy: true
- name: Setup | MCU
if: ${{ matrix.mcu }}
run: echo "MCU=${{ matrix.mcu }}" >> "$GITHUB_ENV"
- name: Setup env
run: |
echo "ESP_IDF_VERSION=${{ matrix.idf-version }}" >> "$GITHUB_ENV"
echo "RUSTFLAGS=${{ matrix.rustflags }}" >> "$GITHUB_ENV"
- name: Fmt check
run: cargo fmt --check
- name: Clippy check
run: cargo clippy --target ${{ matrix.target }} -- -D clippy::all -D warnings
- name: Build
run: cargo build --target ${{ matrix.target }}
- name: Build | no_std
run: cargo build --target ${{ matrix.target }} --no-default-features --features no_std
- name: Build | Examples
if: matrix.ble-example
run: cargo build --target ${{ matrix.target }} --example ble_*
- name: Build | Examples(ble5)
if: matrix.ble5-example
run: cargo build --target ${{ matrix.target }} --example ble5_*