@@ -29,21 +29,21 @@ concurrency:
2929
3030jobs :
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
0 commit comments