-
Notifications
You must be signed in to change notification settings - Fork 1
547 lines (428 loc) · 30.3 KB
/
CI.yaml
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
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
# Check with
# yamllint CI.yaml | grep syntax
on:
push:
branches: [ main, dev, eh-1, eh-1-dev ]
pull_request:
schedule:
- cron: 0 1 * * 1
name: eg/CI build
env:
CARGO_TERM_COLOR: always
jobs:
# One job (named eg) runs all examples on a subset of "boards". It goes by example so
# they are all attempted, and does not stop at the first example to fail. This is nice for
# identifying problems in the examples, but is slow because of rebuild for each example.
# (It would be faster if I could get caching to work.)
# The other job (named CI) runs a matrix of strategies x on all "boards".
# For each matrix point all examples are run with a single build. This is faster but
# terminates on the first example failure so examples that are known to fail are omitted.
# Currently only strategy dev-testing is being run. (There is too much change for the other to work.)
# The 4 strategies are release-testing, driver-testing, hal-testing, and dev-testing.
# The differnce is set in the Cargo.toml file in the strategy directories.
# The release-testing uses release versions of both the driver crate and the HAL crate.
# The driver-testing uses the git versions of the driver crate and the release version of the HAL crate.
# The hal-testing uses the release versions of the driver crate and the git version of the HAL crate.
# The dev-testing uses git versions of both the driver crate and the HAL crate.
#################################################################################################
#################################################################################################
#################################################################################################
boards:
name: CI
runs-on: ubuntu-latest
continue-on-error: true
#fail-fast: false
strategy:
matrix:
brd: [bluepill, discovery-stm32f303, blackpill-stm32f401, blackpill-stm32f411, none-stm32f769,
none-stm32g081, weact-stm32g431, none-stm32g473, weact-stm32g474,
none-stm32h742,
none-stm32l0x2, discovery-stm32l100, heltec-lora-node151, none-stm32l422,
none-stm32f100, none-stm32f101, none-stm32f030, ]
#brd: [bluepill, discovery-stm32f303, blackpill-stm32f401, blackpill-stm32f411,
# none-stm32f769, none-stm32h742, discovery-stm32l100, heltec-lora-node151, none-stm32l422,
# none-stm32f100, none-stm32f101, none-stm32f030, none-stm32l0x2 ]
#NB sections in brd above must be one-to-one with brd: below or matrix is messed up
# none-stm32f042, always fails because it does not have 3 usarts
# stm32fxx_hal does not have adc support enabled for stm32f722. Switched to stm32f769
# Until things are more stable everything but dev-testing is failing.
#stg: [release-testing, driver-testing, hal-testing, dev-testing ]
#stg: [release-testing, dev-testing ]
stg: [dev-testing ]
include:
#- brd: "none-stm32f042"
# mcu: stm32f042
# hal: "stm32f0xx"
# trg: "thumbv6m-none-eabi"
- brd: "none-stm32f030"
mcu: stm32f030xc
hal: "stm32f0xx"
trg: "thumbv6m-none-eabi"
- brd: "none-stm32f100"
mcu: stm32f100
hal: "stm32f1xx"
trg: "thumbv7m-none-eabi"
- brd: "none-stm32f101"
mcu: stm32f101
hal: "stm32f1xx"
trg: "thumbv7m-none-eabi"
- brd: "bluepill"
mcu: stm32f103
hal: "stm32f1xx"
trg: "thumbv7m-none-eabi"
- brd: "discovery-stm32f303"
mcu: stm32f303xc
hal: "stm32f3xx"
trg: "thumbv7em-none-eabihf"
- brd: "blackpill-stm32f401"
mcu: stm32f401
hal: "stm32f4xx"
trg: "thumbv7em-none-eabihf"
- brd: "blackpill-stm32f411"
mcu: stm32f411
hal: "stm32f4xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32f769"
mcu: stm32f769
hal: "stm32f7xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32g081"
mcu: stm32g081
hal: "stm32g0xx"
trg: "thumbv6m-none-eabi"
- brd: "weact-stm32g431"
mcu: stm32g431xB
hal: "stm32g4xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32g473"
mcu: stm32g473
hal: "stm32g4xx"
trg: "thumbv7em-none-eabihf"
- brd: "weact-stm32g474"
mcu: stm32g474xE
hal: "stm32g4xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32h742"
mcu: stm32h742
hal: "stm32h7xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32l0x2"
mcu: stm32l0x2kztx
hal: "stm32l0xx"
trg: "thumbv6m-none-eabi"
- brd: "discovery-stm32l100"
mcu: stm32l100
hal: "stm32l1xx"
trg: "thumbv7m-none-eabi"
- brd: "heltec-lora-node151"
mcu: stm32l151
hal: "stm32l1xx"
trg: "thumbv7m-none-eabi"
- brd: "none-stm32l422"
mcu: stm32l422
hal: "stm32l4xx"
trg: "thumbv7em-none-eabi"
steps:
- uses: actions/checkout@v3
#- uses: dtolnay/rust-toolchain@stable
- uses: dtolnay/rust-toolchain@nightly
with:
#profile: minimal
toolchain: nightly
target: ${{ matrix.trg }}
- name: Configure caching
uses: actions/cache@v3
with:
key: ${{ matrix.brd }}
path: |
${{ env.HOME }}/.cargo
target
- name: tree
#--manifest-path to find Caro.toml.
run: cargo tree --manifest-path ${{ matrix.stg }}/Cargo.toml
- name: old_hal_tree
#--manifest-path to find Caro.toml.
run: cargo tree --manifest-path ${{ matrix.stg }}/Cargo.toml -i embedded-hal@0.2.7
- name: Build
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --no-default-features --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }}
# Examples were previously specified as follows, but actions-rs seems no longer maintained and uses deprecated code.
# Use-cross is not needed for build and is removed, but may be needed for linking.
# - name: Example xxx
# uses: actions-rs/cargo@v1
# with:
# command: build
# args: --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example xxx
#
##### misc #####
- name: Example blink
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example blink
- name: Example blink_impl
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example blink_impl
- name: Example blink3
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example blink3
- name: Example digi_pot
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example digi_pot
# - name: Example echo_string
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example echo_string
# - name: Example serial_string
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example serial_string
# - name: Example spi
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example spi
- name: Example temperature
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example temperature
- name: Example text_i2c
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example text_i2c
- name: Example battery_monitor_ads1015
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example battery_monitor_ads1015
- name: Example dht
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example dht
- name: Example oled_dht
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example oled_dht
# - name: Example onewire
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example onewire
# - name: Example one_wire_bus_find_devices
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example one_wire_bus_find_devices
# - name: Example ds18b20
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ds18b20
##### driver-examples #####
#see https://github.com/eldruin/driver-examples/commit/f0997765a9aaae02287940012060d29548fcb9df
# - name: Example ad9833-midi-player
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ad9833-midi-player
- name: Example ads1015-adc-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ads1015-adc-display
- name: Example at24c256-eeprom
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example at24c256-eeprom
- name: Example bmi160-imu-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example bmi160-imu-display
- name: Example ccs811-gas-voc-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ccs811-gas-voc-display
- name: Example ccs811-gas-voc-hdc2080-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ccs811-gas-voc-hdc2080-display
- name: Example ds1307-rtc
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ds1307-rtc
- name: Example hdc2080-temp-humidity-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example hdc2080-temp-humidity-display
- name: Example isl29125-color-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example isl29125-color-display
- name: Example max17043-battery-monitor-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example max17043-battery-monitor-display
- name: Example max30102-heart-usart
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example max30102-heart-usart
- name: Example mcp7940n-rtc-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example mcp7940n-rtc-display
- name: Example mlx90614-temperature-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example mlx90614-temperature-display
- name: Example mlx90615-temperature-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example mlx90615-temperature-display
- name: Example mma8452-accel-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example mma8452-accel-display
- name: Example opt3001-als-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example opt3001-als-display
- name: Example pca9685-pwm-rgb-led-servos
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example pca9685-pwm-rgb-led-servos
- name: Example tcs34725-color-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example tcs34725-color-display
- name: Example si4703-fm-radio-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example si4703-fm-radio-display
- name: Example si4703-fm-radio
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example si4703-fm-radio
- name: Example tmp006-ir-temp-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example tmp006-ir-temp-display
- name: Example tmp102-temp-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example tmp102-temp-display
- name: Example veml6030-als-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example veml6030-als-display
- name: Example veml6075-uv-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example veml6075-uv-display
- name: Example iaq-core-c-gas-voc-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example iaq-core-c-gas-voc-display
##### misc-i2c-driver-examples #####
- name: Example ens160-co2-voc-iaq-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ens160-co2-voc-iaq-display
- name: Example ads_ina_ssd
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ads_ina_ssd
- name: Example htu2xd-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example htu2xd-display
- name: Example aht10-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example aht10-display
- name: Example aht20-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example aht20-display
- name: Example ina219-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ina219-display
# - name: Example vl53lox-display
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example vl53lox-display
#
- name: Example hdc1080-display
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example hdc1080-display
# - name: Example mlx9064x
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example mlx9064x
#
# - name: Example xca9548a
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example xca9548a
##### sx127x examples #####
# - name: sx127x lora_spi_send
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example lora_spi_send
# - name: sx127x lora_spi_receive
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example lora_spi_receive
# - name: sx127x lora_spi_gps
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example lora_spi_gps
##### rtic examples #####
- name: Example gps_rw_rtic
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example gps_rw_rtic
- name: Example iaq-core-c-gas-voc-usart-logger
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example iaq-core-c-gas-voc-usart-logger
- name: Example ccs811-gas-voc-usart-logger
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ccs811-gas-voc-usart-logger
- name: Example schedule
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example schedule
# This fails on stm32f3xx until USART_EXTI interrupt naming is resolved. Or alternatly it can be
# made to work on stm32f3xx and fail on all others.
# See https://github.com/stm32-rs/stm32f3xx-hal/issues/290
# - name: Example resource-user-struct
# #if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example resource-user-struct
- name: Example blink_rtic
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example blink_rtic
- name: Example dht_rtic
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example dht_rtic
- name: Example ccs811-co2-voc
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ccs811-co2-voc
- name: Example ina219_rtic
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ina219_rtic
# use-cross: true
- name: Example display_stuff_rtic0
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example display_stuff_rtic0
# use-cross: true
# - name: Example adc_dma
# run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example adc_dma
##### project examples #####
#################################################################################################
#################################################################################################
##### run examples here that are broken on some boards (last because job stops on failure) #####
# these require require solving eh-1 Read/Write issue on stm32f4xx
- name: Example echo_by_char
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example echo_by_char
- name: Example gps_rw
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example gps_rw
- name: Example oled_gps
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example oled_gps
# this requires 3 USARTs and fails using stm32f042 which has only 2
- name: Example serial_char
if: ${{ matrix.mcu != 'stm32f042' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example serial_char
##### examples that should be working, but not yet working with embedded-hal 1.0
- name: Example aht10_rtic
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example aht10_rtic
- name: Example aht20-display-nodelay
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example aht20-display-nodelay
- name: Example htu2xd_rtic
#if: ${{ matrix.trg != 'thumbv6m-none-eabi' }}
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example htu2xd_rtic
- name: Example display_stuff_rtic
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example display_stuff_rtic
# use-cross: true
- name: Example battery_monitor_ads1015_rtic
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example battery_monitor_ads1015_rtic
# use-cross: true
- name: Example temp-humidity-display with sensor aht10
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }},aht10 --example temp-humidity-display
- name: Example temp-humidity-display with sensor aht20
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }},aht20 --example temp-humidity-display
- name: Example temp-humidity-display with sensor hdc1080
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }},hdc1080 --example temp-humidity-display
- name: Example temp-humidity-display with sensor htu2xd
run: cargo build --manifest-path ${{ matrix.stg }}/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }},htu2xd --example temp-humidity-display
#################################################################################################
#################################################################################################
#################################################################################################
#################################################################################################
examples:
name: eg
runs-on: ubuntu-latest
continue-on-error: true
strategy:
matrix:
eg: [blink3, blink_impl, blink, dht,
echo_by_char, echo_string, gps_rw,
oled_gps, serial_char, serial_string,
temperature, oled_temperature, text_i2c,
battery_monitor_ads1015, ads1015-adc-display, at24c256-eeprom,
bmi160-imu-display, digi_pot, oled_dht,
ccs811-gas-voc-display, ccs811-gas-voc-hdc2080-display,
ds1307-rtc, hdc2080-temp-humidity-display, iaq-core-c-gas-voc-display,
isl29125-color-display, max17043-battery-monitor-display, max30102-heart-usart,
mcp7940n-rtc-display, mlx90614-temperature-display, mlx90615-temperature-display,
mma8452-accel-display, opt3001-als-display, pca9685-pwm-rgb-led-servos,
si4703-fm-radio-display, si4703-fm-radio, tcs34725-color-display,
tmp006-ir-temp-display, tmp102-temp-display,
veml6030-als-display, veml6070-uv-display, veml6075-uv-display,
iaq-core-c-gas-voc-usart-logger, ccs811-gas-voc-usart-logger,
lora_spi_send, lora_spi_receive, lora_spi_gps,
blink_rtic, schedule, resource-user-struct,
dht_rtic, ccs811-co2-voc, battery_monitor_ads1015_rtic,
display_stuff_rtic0, display_stuff_rtic,
ads_ina_ssd, ads_ina_ssd_rtic,
aht10-display, aht10_rtic, aht20-display,
ds18b20, hdc1080-display,
htu2xd-display, htu2xd_rtic,
vl53lox-display, ens160-co2-voc-iaq-display,
ina219-display, ina219_rtic, gps_rw_rtic,
xca9548a, one_wire_bus_find_devices, onewire
]
# temp-humidity-display is tested in CI blocks for MCUs but not in this eg matrix
# because the feature indicating the sensor needs to be set.
# mlx9064x, aht20-display-nodelay, #ad9833-midi-player,
brd: [blackpill-stm32f401, weact-stm32g474, none-stm32h742]
#brd: [bluepill, discovery-stm32f303]
#NB sections in brd above must be one-to-one with brd: below or matrix is messed up
include:
- brd: "blackpill-stm32f401"
mcu: stm32f401
hal: "stm32f4xx"
trg: "thumbv7em-none-eabihf"
# - brd: "bluepill"
# mcu: stm32f103
# hal: "stm32f1xx"
# trg: "thumbv7m-none-eabi"
# - brd: "discovery-stm32f303"
# mcu: stm32f303xc
# hal: "stm32f3xx"
# trg: "thumbv7em-none-eabihf"
- brd: "weact-stm32g474"
mcu: stm32g474xE
hal: "stm32g4xx"
trg: "thumbv7em-none-eabihf"
- brd: "none-stm32h742"
mcu: stm32h742
hal: "stm32h7xx"
trg: "thumbv7em-none-eabihf"
steps:
- uses: actions/checkout@v3
#previously uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@nightly
with:
#profile: minimal
toolchain: nightly
target: ${{ matrix.trg }}
- name: Configure caching
uses: actions/cache@v3
with:
key: ${{ matrix.brd }}
path: |
${{ env.HOME }}/.cargo
target
- name: tree
#--manifest-path to find Caro.toml.
run: cargo tree --manifest-path dev-testing/Cargo.toml
- name: Build
run: cargo build --manifest-path dev-testing/Cargo.toml --no-default-features --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }}
- name: Build example
run: cargo build --manifest-path dev-testing/Cargo.toml --release --target ${{ matrix.trg }} --features ${{ matrix.hal }},${{ matrix.mcu }} --example ${{ matrix.eg }}