Skip to content

Commit 468ee9e

Browse files
authored
Merge pull request #10348 from Frauschi/hostap_fix
Fix race condition in hostap CI tests
2 parents 9c61817 + 46b47cb commit 468ee9e

1 file changed

Lines changed: 37 additions & 18 deletions

File tree

.github/workflows/hostap-vm.yml

Lines changed: 37 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,21 @@ jobs:
7676
with:
7777
path: hostap
7878
key: hostap-repo
79-
lookup-only: true
8079

8180
- name: Checkout hostap
8281
if: steps.cache.outputs.cache-hit != 'true'
8382
run: git clone https://w1.fi/hostap.git hostap
8483

84+
- name: tar hostap
85+
run: tar -zcf hostap.tgz hostap
86+
87+
- name: Upload hostap repo
88+
uses: actions/upload-artifact@v4
89+
with:
90+
name: hostap-repo
91+
path: hostap.tgz
92+
retention-days: 1
93+
8594
build_uml_linux:
8695
name: Build UML (UserMode Linux)
8796
if: github.repository_owner == 'wolfssl'
@@ -96,15 +105,16 @@ jobs:
96105
with:
97106
path: linux/linux
98107
key: hostap-linux-${{ env.LINUX_REF }}
99-
lookup-only: true
100108

101-
- name: Checking if we have hostap in cache
109+
- name: Download hostap repo
102110
if: steps.cache.outputs.cache-hit != 'true'
103-
uses: actions/cache/restore@v4
111+
uses: actions/download-artifact@v4
104112
with:
105-
path: hostap
106-
key: hostap-repo
107-
fail-on-cache-miss: true
113+
name: hostap-repo
114+
115+
- name: untar hostap
116+
if: steps.cache.outputs.cache-hit != 'true'
117+
run: tar -xf hostap.tgz
108118

109119
- name: Checkout linux
110120
if: steps.cache.outputs.cache-hit != 'true'
@@ -122,6 +132,13 @@ jobs:
122132
cd linux
123133
yes "" | ARCH=um make -j $(nproc)
124134
135+
- name: Upload kernel binary
136+
uses: actions/upload-artifact@v4
137+
with:
138+
name: uml-linux-kernel
139+
path: linux/linux
140+
retention-days: 1
141+
125142
hostap_test:
126143
strategy:
127144
fail-fast: false
@@ -170,13 +187,14 @@ jobs:
170187
timeout-minutes: 45
171188
needs: [build_wolfssl, build_uml_linux, checkout_hostap]
172189
steps:
173-
- name: Checking if we have kernel in cache
174-
uses: actions/cache/restore@v4
175-
id: cache
190+
- name: Download kernel binary
191+
uses: actions/download-artifact@v4
176192
with:
177-
path: linux/linux
178-
key: hostap-linux-${{ env.LINUX_REF }}
179-
fail-on-cache-miss: true
193+
name: uml-linux-kernel
194+
path: linux
195+
196+
- name: Restore kernel binary executable bit
197+
run: chmod +x linux/linux
180198

181199
# No way to view the full strategy in the browser (really weird)
182200
- name: Print strategy
@@ -215,12 +233,13 @@ jobs:
215233
- name: Install pip dependencies
216234
run: sudo pip install pycryptodome
217235

218-
- name: Checking if we have hostap in cache
219-
uses: actions/cache/restore@v4
236+
- name: Download hostap repo
237+
uses: actions/download-artifact@v4
220238
with:
221-
path: hostap
222-
key: hostap-repo
223-
fail-on-cache-miss: true
239+
name: hostap-repo
240+
241+
- name: untar hostap
242+
run: tar -xf hostap.tgz
224243

225244
- name: Checkout correct ref
226245
working-directory: hostap

0 commit comments

Comments
 (0)