@@ -29,13 +29,13 @@ 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 }}
@@ -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
0 commit comments