Skip to content

Commit 49b7347

Browse files
committed
ci: Test esp-hal runners for c6
1 parent d3b59e9 commit 49b7347

File tree

4 files changed

+109
-15
lines changed

4 files changed

+109
-15
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
arch: "x86_64"
5454

5555
steps:
56-
- uses: actions/checkout@v4
56+
- uses: actions/checkout@v6
5757

5858
- uses: ./.github/actions/setup-target
5959
with:
@@ -79,7 +79,7 @@ jobs:
7979
arch: "armhf"
8080

8181
steps:
82-
- uses: actions/checkout@v4
82+
- uses: actions/checkout@v6
8383

8484
- uses: ./.github/actions/setup-target
8585
with:
@@ -105,7 +105,7 @@ jobs:
105105
arch: "armhf"
106106

107107
steps:
108-
- uses: actions/checkout@v4
108+
- uses: actions/checkout@v6
109109

110110
- uses: ./.github/actions/setup-target
111111
with:
@@ -120,7 +120,7 @@ jobs:
120120
runs-on: ubuntu-22.04
121121

122122
steps:
123-
- uses: actions/checkout@v4
123+
- uses: actions/checkout@v6
124124
- uses: dtolnay/rust-toolchain@stable
125125

126126
- run: cargo check -p xtask --all-features
@@ -133,7 +133,7 @@ jobs:
133133
runs-on: ubuntu-22.04
134134

135135
steps:
136-
- uses: actions/checkout@v4
136+
- uses: actions/checkout@v6
137137
- uses: ./.github/actions/setup-target
138138

139139
- run: cargo test --lib
@@ -146,7 +146,7 @@ jobs:
146146
runs-on: ubuntu-22.04
147147

148148
steps:
149-
- uses: actions/checkout@v4
149+
- uses: actions/checkout@v6
150150
- uses: dtolnay/rust-toolchain@stable
151151
with:
152152
components: clippy
@@ -159,7 +159,7 @@ jobs:
159159
runs-on: ubuntu-22.04
160160

161161
steps:
162-
- uses: actions/checkout@v4
162+
- uses: actions/checkout@v6
163163
- uses: dtolnay/rust-toolchain@nightly
164164
with:
165165
components: rustfmt

.github/workflows/hil.yml

Lines changed: 100 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,21 +29,21 @@ concurrency:
2929

3030
jobs:
3131
build-espflash:
32-
name: Build espflash
32+
name: Build espflash and xtask
3333
runs-on: ubuntu-22.04
3434
container:
3535
image: ubuntu:20.04
3636

3737
steps:
38-
- uses: actions/checkout@v4
38+
- uses: actions/checkout@v6
3939
with:
4040
repository: ${{ github.event.inputs.repository || github.repository }}
4141
ref: ${{ github.event.inputs.branch || github.ref }}
4242

4343
- name: Install dependencies
4444
env:
4545
DEBIAN_FRONTEND: noninteractive
46-
run: apt-get update && apt-get -y install curl musl-tools pkg-config
46+
run: apt-get update && apt-get -y install curl musl-tools pkg-config sudo
4747

4848
- name: Install toolchain
4949
run: |
@@ -99,14 +99,14 @@ jobs:
9999
- mcu: esp32s3
100100

101101
steps:
102-
- uses: actions/checkout@v4
102+
- uses: actions/checkout@v6
103103

104-
- uses: actions/download-artifact@v4
104+
- uses: actions/download-artifact@v7
105105
with:
106106
name: espflash
107107
path: espflash_app
108108

109-
- uses: actions/download-artifact@v4
109+
- uses: actions/download-artifact@v7
110110
with:
111111
name: xtask
112112
path: xtask_app
@@ -120,3 +120,97 @@ jobs:
120120
121121
- name: Run all tests
122122
run: xtask run-tests --chip ${{ matrix.board.mcu }} -t 60 --no-build
123+
124+
build-packages:
125+
name: Build packages
126+
runs-on: ubuntu-latest
127+
128+
steps:
129+
- uses: actions/checkout@v6
130+
with:
131+
repository: ${{ github.event.inputs.repository || github.repository }}
132+
ref: ${{ github.event.inputs.branch || github.ref }}
133+
134+
# - name: Install dependencies
135+
# env:
136+
# DEBIAN_FRONTEND: noninteractive
137+
# run: apt-get update && apt-get -y install curl musl-tools pkg-config
138+
139+
- name: Install target for cross-compilation
140+
run: rustup target add aarch64-unknown-linux-gnu
141+
142+
- name: Install cross
143+
uses: taiki-e/install-action@v2
144+
with:
145+
tool: cross
146+
147+
- name: Cache Dependencies
148+
uses: Swatinem/rust-cache@v2
149+
- name: Build espflash
150+
run: cross build --release --target armv7-unknown-linux-gnueabihf
151+
working-directory: espflash
152+
153+
- name: Build xtask
154+
run: cross build --release --target armv7-unknown-linux-gnueabihf
155+
working-directory: xtask
156+
157+
- uses: actions/upload-artifact@v4
158+
with:
159+
name: espflash-armv7
160+
path: target/armv7-unknown-linux-gnueabihf/release/espflash
161+
if-no-files-found: error
162+
163+
- uses: actions/upload-artifact@v4
164+
with:
165+
name: xtask-armv7
166+
path: target/armv7-unknown-linux-gnueabihf/release/xtask
167+
if-no-files-found: error
168+
run-packages:
169+
if: github.repository_owner == 'esp-rs'
170+
name: ${{ matrix.target.soc }} esp-hal
171+
needs: build-packages
172+
runs-on: [self-hosted, "${{ matrix.target.runner }}"]
173+
# env:
174+
# ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board.mcu }}
175+
176+
strategy:
177+
fail-fast: false
178+
matrix:
179+
target:
180+
- soc: esp32c6
181+
rust-target: riscv32imac-unknown-none-elf
182+
runner: esp32c6-usb
183+
host: armv7
184+
# board:
185+
# - mcu: esp32
186+
# - mcu: esp32c2
187+
# freq: -26mhz
188+
# flag: -x 26mhz
189+
# - mcu: esp32c3
190+
# - mcu: esp32c6
191+
# - mcu: esp32h2
192+
# - mcu: esp32s2
193+
# - mcu: esp32s3
194+
195+
steps:
196+
- uses: actions/checkout@v6
197+
198+
- uses: actions/download-artifact@v7
199+
with:
200+
name: espflash-armv7
201+
path: espflash_app
202+
203+
- uses: actions/download-artifact@v7
204+
with:
205+
name: xtask-armv7
206+
path: xtask_app
207+
208+
- name: Set up espflash binary
209+
run: |
210+
chmod +x espflash_app/espflash
211+
chmod +x xtask_app/xtask
212+
echo "$PWD/espflash_app" >> "$GITHUB_PATH"
213+
echo "$PWD/xtask_app" >> "$GITHUB_PATH"
214+
215+
- name: Run all tests
216+
run: xtask_app/xtask run-tests --chip ${{ matrix.target.soc }} -t 60 --no-build

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
arch: "x86_64"
4242
runs-on: ${{ matrix.platform.os }}
4343
steps:
44-
- uses: actions/checkout@v4
44+
- uses: actions/checkout@v6
4545

4646
- uses: ./.github/actions/package
4747
with:

xtask/src/test_runner.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ impl TestRunner {
540540
pub fn test_list_ports(&self) -> Result<()> {
541541
self.run_simple_command_test(
542542
&["list-ports"],
543-
Some(&["Silicon Labs"]),
543+
Some(&["Silicon Labs", "Espressif"]),
544544
Duration::from_secs(10),
545545
"list-ports",
546546
)?;

0 commit comments

Comments
 (0)