Skip to content

Commit 98374ea

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

File tree

3 files changed

+130
-13
lines changed

3 files changed

+130
-13
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: 122 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ 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 }}
@@ -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,120 @@ 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-22.04
127+
container:
128+
image: ubuntu:20.04
129+
130+
steps:
131+
- uses: actions/checkout@v6
132+
with:
133+
repository: ${{ github.event.inputs.repository || github.repository }}
134+
ref: ${{ github.event.inputs.branch || github.ref }}
135+
136+
- name: Install dependencies
137+
env:
138+
DEBIAN_FRONTEND: noninteractive
139+
run: apt-get update && apt-get -y install curl musl-tools pkg-config
140+
141+
- name: Install docker
142+
run: |
143+
apt update
144+
apt install ca-certificates curl
145+
install -m 0755 -d /etc/apt/keyrings
146+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
147+
chmod a+r /etc/apt/keyrings/docker.asc
148+
149+
# Add the repository to Apt sources:
150+
tee /etc/apt/sources.list.d/docker.sources <<EOF
151+
Types: deb
152+
URIs: https://download.docker.com/linux/ubuntu
153+
Suites: $(. /etc/os-release && echo "${UBUNTU_CODENAME:-$VERSION_CODENAME}")
154+
Components: stable
155+
Signed-By: /etc/apt/keyrings/docker.asc
156+
EOF
157+
158+
apt update
159+
apt install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
160+
161+
- name: Install toolchain
162+
uses: dtolnay/rust-toolchain@v1
163+
with:
164+
toolchain: stable
165+
components: rust-src
166+
167+
- name: Install cross
168+
run: cargo install cross
169+
170+
- name: Build espflash
171+
run: cross build --release --target armv7-unknown-linux-gnueabihf
172+
working-directory: espflash
173+
174+
- name: Build xtask
175+
run: cross build --release --target armv7-unknown-linux-gnueabihf
176+
working-directory: xtask
177+
178+
- uses: actions/upload-artifact@v4
179+
with:
180+
name: espflash-armv7
181+
path: target/armv7-unknown-linux-gnueabihf/release/espflash
182+
if-no-files-found: error
183+
184+
- uses: actions/upload-artifact@v4
185+
with:
186+
name: xtask-armv7
187+
path: target/armv7-unknown-linux-gnueabihf/release/xtask
188+
if-no-files-found: error
189+
run-packages:
190+
if: github.repository_owner == 'esp-rs'
191+
name: ${{ matrix.target.soc }}
192+
needs: build-packages
193+
runs-on: [self-hosted, "${{ matrix.target.runner }}"]
194+
# env:
195+
# ESPFLASH_PORT: /dev/serial_ports/${{ matrix.board.mcu }}
196+
197+
strategy:
198+
fail-fast: false
199+
matrix:
200+
target:
201+
- soc: esp32c6
202+
rust-target: riscv32imac-unknown-none-elf
203+
runner: esp32c6-usb
204+
host: armv7
205+
# board:
206+
# - mcu: esp32
207+
# - mcu: esp32c2
208+
# freq: -26mhz
209+
# flag: -x 26mhz
210+
# - mcu: esp32c3
211+
# - mcu: esp32c6
212+
# - mcu: esp32h2
213+
# - mcu: esp32s2
214+
# - mcu: esp32s3
215+
216+
steps:
217+
- uses: actions/checkout@v6
218+
219+
- uses: actions/download-artifact@v7
220+
with:
221+
name: espflash-armv7
222+
path: espflash_app
223+
224+
- uses: actions/download-artifact@v7
225+
with:
226+
name: xtask-armv7
227+
path: xtask_app
228+
229+
- name: Set up espflash binary
230+
run: |
231+
cp espflash_app/espflash-armv7 espflash_app/espflash
232+
chmod +x espflash_app/espflash
233+
cp xtask_app/xtask-armv7 xtask_app/xtask
234+
chmod +x xtask_app/xtask
235+
echo "$PWD/espflash_app" >> "$GITHUB_PATH"
236+
echo "$PWD/xtask_app" >> "$GITHUB_PATH"
237+
238+
- name: Run all tests
239+
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:

0 commit comments

Comments
 (0)