@@ -23,47 +23,76 @@ jobs:
23
23
build :
24
24
name : Generate and Build App
25
25
strategy :
26
+ matrix :
27
+ board :
28
+ - mcu : esp32
29
+ target : xtensa-esp32-none-elf
30
+ - mcu : esp32c2
31
+ target : riscv32imc-unknown-none-elf
32
+ - mcu : esp32c3
33
+ target : riscv32imc-unknown-none-elf
34
+ - mcu : esp32c6
35
+ target : riscv32imac-unknown-none-elf
36
+ - mcu : esp32h2
37
+ target : riscv32imac-unknown-none-elf
38
+ - mcu : esp32s2
39
+ target : xtensa-esp32s2-none-elf
40
+ - mcu : esp32s3
41
+ target : xtensa-esp32s3-none-elf
26
42
fail-fast : false
27
43
runs-on : ubuntu-20.04
28
44
steps :
29
- - uses : dtolnay/rust-toolchain@nightly
45
+
46
+
47
+ - if : matrix.board.mcu == 'esp32' || matrix.board.mcu == 'esp32s2' || matrix.board.mcu == 'esp32s3'
48
+
30
49
with :
31
- target : riscv32imac-unknown-none-elf
32
- components : clippy,rustfmt,rust-src
50
+ default : true
51
+ buildtargets : ${{ matrix.board.mcu }}
52
+ ldproxy : false
33
53
34
- - uses : Swatinem/rust-cache@v2
54
+ - if : matrix.board.mcu != 'esp32' && matrix.board.mcu != 'esp32s2' && matrix.board.mcu != 'esp32s3'
55
+ uses : dtolnay/rust-toolchain@nightly
56
+ with :
57
+ target : ${{ matrix.board.target }}
58
+ components : rust-src
35
59
60
+ - uses : Swatinem/rust-cache@v2
36
61
37
62
- uses : actions/checkout@v4
38
63
with :
39
64
repository : esp-rs/esp-hal
40
65
path : esp-hal
41
66
42
67
- run : cargo build --release --example hello_world
43
- working-directory : esp-hal/esp32c3 -hal
68
+ working-directory : esp-hal/${{ matrix.board.mcu }} -hal
44
69
45
70
- uses : actions/upload-artifact@v3
46
71
with :
47
- name : esp32c3_app
48
- path : esp-hal/esp32c3 -hal/target/riscv32imc-unknown-none-elf /release/examples/hello_world
72
+ name : ${{ matrix.board.mcu }}_app
73
+ path : esp-hal/${{ matrix.board.mcu }} -hal/target/${{ matrix.board.target }} /release/examples/hello_world
49
74
if-no-files-found : error
50
75
51
76
run-target :
52
77
name : Run Tests on Target
53
78
if : ${{ github.repository_owner == 'esp-rs' }}
54
79
needs : build
55
- runs-on : [self-hosted, linux, x64, esp32c3]
80
+ runs-on : [self-hosted, linux, x64, "${{ matrix.board }}" ]
81
+ strategy :
82
+ matrix :
83
+ board : [esp32, esp32c2, esp32c3, esp32c6, esp32h2, esp32s2, esp32s3]
84
+ fail-fast : false
56
85
steps :
57
86
- uses : actions/checkout@v4
58
87
- uses : actions/download-artifact@v3
59
88
with :
60
- name : esp32c3_app
61
- path : espflash/esp32c3_app
89
+ name : ${{ matrix.board }}_app
90
+ path : espflash/${{ matrix.board }}_app
62
91
63
92
- uses : ./.github/actions/setup-target
64
93
with :
65
94
arch : x86_64
66
95
target : x86_64-unknown-linux-gnu
67
96
68
97
- name : Run Tests
69
- run : ESPFLASH_PORT=/dev/ttyACM0 ESPFLASH_APP=esp32c3_app /hello_world cargo test
98
+ run : ESPFLASH_PORT=/dev/ttyACM0 ESPFLASH_APP=${{ matrix.board }}_app /hello_world cargo test
0 commit comments