Skip to content

Commit df3ba83

Browse files
committed
ci: Expand the matrix to cover all targets
1 parent 93646ba commit df3ba83

File tree

2 files changed

+40
-109
lines changed

2 files changed

+40
-109
lines changed

.github/workflows/hil.yml

+40-11
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,76 @@ jobs:
2323
build:
2424
name: Generate and Build App
2525
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
2642
fail-fast: false
2743
runs-on: ubuntu-20.04
2844
steps:
29-
- uses: dtolnay/rust-toolchain@nightly
45+
46+
47+
- if: matrix.board.mcu == 'esp32' || matrix.board.mcu == 'esp32s2' || matrix.board.mcu == 'esp32s3'
48+
uses: esp-rs/[email protected]
3049
with:
31-
target: riscv32imac-unknown-none-elf
32-
components: clippy,rustfmt,rust-src
50+
default: true
51+
buildtargets: ${{ matrix.board.mcu }}
52+
ldproxy: false
3353

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
3559

60+
- uses: Swatinem/rust-cache@v2
3661

3762
- uses: actions/checkout@v4
3863
with:
3964
repository: esp-rs/esp-hal
4065
path: esp-hal
4166

4267
- run: cargo build --release --example hello_world
43-
working-directory: esp-hal/esp32c3-hal
68+
working-directory: esp-hal/${{ matrix.board.mcu }}-hal
4469

4570
- uses: actions/upload-artifact@v3
4671
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
4974
if-no-files-found: error
5075

5176
run-target:
5277
name: Run Tests on Target
5378
if: ${{ github.repository_owner == 'esp-rs' }}
5479
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
5685
steps:
5786
- uses: actions/checkout@v4
5887
- uses: actions/download-artifact@v3
5988
with:
60-
name: esp32c3_app
61-
path: espflash/esp32c3_app
89+
name: ${{ matrix.board }}_app
90+
path: espflash/${{ matrix.board }}_app
6291

6392
- uses: ./.github/actions/setup-target
6493
with:
6594
arch: x86_64
6695
target: x86_64-unknown-linux-gnu
6796

6897
- 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

espflash/tests/flash.rs

-98
This file was deleted.

0 commit comments

Comments
 (0)