-
Notifications
You must be signed in to change notification settings - Fork 246
285 lines (258 loc) · 12.5 KB
/
Copy pathci.yml
File metadata and controls
285 lines (258 loc) · 12.5 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
name: CI
on:
push:
branches:
- master
pull_request:
schedule:
- cron: "50 6 * * *"
workflow_dispatch:
env:
# Temporary workaround for rust-lang/rust#158168. Remove after the fix reaches nightly:
# https://github.com/rust-lang/rust/pull/160170
rust_toolchain: nightly-2026-07-29
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
compile:
name: "${{ matrix.target }} / ${{ matrix.idf-version }}${{ matrix.extra-components-label != '' && format(' (+{0})', matrix.extra-components-label) || '' }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- riscv32imc-esp-espidf
- riscv32imac-esp-espidf
- riscv32imafc-esp-espidf
- xtensa-esp32-espidf
- xtensa-esp32s2-espidf
- xtensa-esp32s3-espidf
idf-version:
# - v5.1.6
# - v5.2.5
- v5.3.4
- v5.4.3
- v5.5.3
- v6.0
extra-components-label:
- ""
extra-components-files:
- ""
include:
# Also test v6.0 with remote components that were moved out of the main tree
# mqtt and eth SPI drivers work on all targets; eth PHY drivers only support esp32 and esp32p4
- target: riscv32imc-esp-espidf
idf-version: v6.0
extra-components-label: v6_mqtt
# We could add v6_eth_spi here, but example is esp32-only.
extra-components-files: ".github/configs/extra_components_v6_mqtt.toml"
- target: xtensa-esp32-espidf
idf-version: v6.0
extra-components-label: v6_mqtt v6_eth_spi v6_eth_phy
extra-components-files: ".github/configs/extra_components_v6_mqtt.toml,.github/configs/extra_components_v6_eth_spi.toml,.github/configs/extra_components_v6_eth_phy.toml"
# esp32p4 also supports eth, but examples are esp32-only for now
#- target: riscv32imafc-esp-espidf
# idf-version: v6.0
# extra-components-label: v6_mqtt v6_eth_spi v6_eth_phy
# extra-components-files: ".github/configs/extra_components_v6_mqtt.toml,.github/configs/extra_components_v6_eth_spi.toml,.github/configs/extra_components_v6_eth_phy.toml"
env:
ESP_IDF_SYS_EXTRA_COMPONENTS_FILE: ${{ matrix.extra-components-files }}
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: Install Rust for Xtensa
if: matrix.target != 'riscv32imc-esp-espidf'
uses: esp-rs/xtensa-toolchain@v1.6
with:
default: true
ldproxy: true
- name: Build | Fmt Check
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
run: cargo fmt -- --check
- name: Build | Clippy
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
run: cargo clippy --features nightly,experimental --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings
- name: Build | Compile
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
- name: Build | Compile, experimental, nightly, no_std
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
run: cargo build --no-default-features --features nightly,experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
- name: Build | Compile, experimental, nightly, alloc
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
run: cargo build --no-default-features --features nightly,experimental,alloc --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
- name: Setup | ldproxy
if: matrix.target == 'riscv32imc-esp-espidf'
run: |
curl -L https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-x86_64-unknown-linux-gnu.zip -o $HOME/.cargo/bin/ldproxy.zip
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
chmod a+x $HOME/.cargo/bin/ldproxy
- name: Clippy | Examples
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
WIFI_SSID: "ssid"
WIFI_PASS: "pass"
ESP_DEVICE_IP: "192.168.1.250"
GATEWAY_IP: "192.168.1.1"
GATEWAY_NETMASK: "24"
run: cargo clippy --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings
- name: Build | Examples
if: matrix.target != 'riscv32imac-esp-espidf' || matrix.idf-version != 'v4.4.8'
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults"
RUSTFLAGS: "${{ startsWith(matrix.idf-version, 'v4') && '--cfg espidf_time32' || '--cfg espidf_time64' }}"
WIFI_SSID: "ssid"
WIFI_PASS: "pass"
ESP_DEVICE_IP: "192.168.1.250"
GATEWAY_IP: "192.168.1.1"
GATEWAY_NETMASK: "24"
run: cargo build --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
# The `compile` job above builds with Bluedroid. The `ble` module and the `ble_*` examples are
# NimBLE-only (gated behind `esp_idf_bt_nimble_enabled`), so that job never compiles them - the
# two hosts are a mutually-exclusive Kconfig `choice` and cannot coexist in one build. This job
# builds the same crate and examples against `sdkconfig.defaults.nimble` to compile-check the
# NimBLE paths too. Both riscv targets are intentional: riscv32imc (esp32c3) exposes the plain
# `os_mbuf_append`, while riscv32imac (esp32c6/h2) keeps the BLE controller in ROM and exposes
# `r_os_mbuf_append` - so both mbuf bindings get exercised.
compile-nimble:
name: "NimBLE / ${{ matrix.target }} / ${{ matrix.idf-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- riscv32imc-esp-espidf
- riscv32imac-esp-espidf
idf-version:
- v5.3.4
- v5.4.3
- v5.5.3
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: Install Rust for Xtensa
if: matrix.target != 'riscv32imc-esp-espidf'
uses: esp-rs/xtensa-toolchain@v1.6
with:
default: true
ldproxy: true
- name: Setup | ldproxy
if: matrix.target == 'riscv32imc-esp-espidf'
run: |
curl -L https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-x86_64-unknown-linux-gnu.zip -o $HOME/.cargo/bin/ldproxy.zip
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
chmod a+x $HOME/.cargo/bin/ldproxy
- name: Build | Clippy
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.nimble"
RUSTFLAGS: "--cfg espidf_time64"
run: cargo clippy --features nightly,experimental --no-deps --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings
- name: Build | Compile
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.nimble"
RUSTFLAGS: "--cfg espidf_time64"
run: cargo build --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
- name: Clippy | Examples
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.nimble"
RUSTFLAGS: "--cfg espidf_time64"
WIFI_SSID: "ssid"
WIFI_PASS: "pass"
ESP_DEVICE_IP: "192.168.1.250"
GATEWAY_IP: "192.168.1.1"
GATEWAY_NETMASK: "24"
run: cargo clippy --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings
- name: Build | Examples
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.nimble"
RUSTFLAGS: "--cfg espidf_time64"
WIFI_SSID: "ssid"
WIFI_PASS: "pass"
ESP_DEVICE_IP: "192.168.1.250"
GATEWAY_IP: "192.168.1.1"
GATEWAY_NETMASK: "24"
run: cargo build --examples --features experimental --target ${{ matrix.target }} -Zbuild-std=std,panic_abort
# Trouble uses ESP-IDF's controller-only Bluetooth mode, which is mutually exclusive with
# the Bluedroid and NimBLE configurations exercised above. Build the real beacon path with
# representative Xtensa, RISC-V, and RAM-HCI targets at both supported version boundaries.
compile-trouble:
name: "Trouble / ${{ matrix.target }} / ${{ matrix.idf-version }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
target:
- riscv32imc-esp-espidf
- riscv32imac-esp-espidf
- xtensa-esp32-espidf
idf-version:
- v5.3.4
- v6.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: Install Rust for Xtensa
if: matrix.target != 'riscv32imc-esp-espidf'
uses: esp-rs/xtensa-toolchain@v1.6
with:
default: true
ldproxy: true
- name: Setup | ldproxy
if: matrix.target == 'riscv32imc-esp-espidf'
run: |
curl -L https://github.com/esp-rs/embuild/releases/latest/download/ldproxy-x86_64-unknown-linux-gnu.zip -o $HOME/.cargo/bin/ldproxy.zip
unzip "$HOME/.cargo/bin/ldproxy.zip" -d "$HOME/.cargo/bin/"
chmod a+x $HOME/.cargo/bin/ldproxy
- name: Clippy | Trouble beacon
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.trouble"
RUSTFLAGS: "--cfg espidf_time64"
run: cargo clippy --example trouble_beacon --features trouble,embassy-time-driver --target ${{ matrix.target }} -Zbuild-std=std,panic_abort -- -Dwarnings
- name: Build | Trouble beacon
env:
ESP_IDF_VERSION: ${{ matrix.idf-version }}
ESP_IDF_SDKCONFIG_DEFAULTS: "${{ github.workspace }}/.github/configs/sdkconfig.defaults.trouble"
RUSTFLAGS: "--cfg espidf_time64"
run: cargo build --example trouble_beacon --features trouble,embassy-time-driver --target ${{ matrix.target }} -Zbuild-std=std,panic_abort