From 46b47cb8ece9f0290196b97680ef649de2c18869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Frauenschl=C3=A4ger?= Date: Wed, 29 Apr 2026 11:35:40 +0200 Subject: [PATCH] Fix race conditions in hostap CI tests --- .github/workflows/hostap-vm.yml | 55 ++++++++++++++++++++++----------- 1 file changed, 37 insertions(+), 18 deletions(-) diff --git a/.github/workflows/hostap-vm.yml b/.github/workflows/hostap-vm.yml index 44a9f3328e..1e609028c9 100644 --- a/.github/workflows/hostap-vm.yml +++ b/.github/workflows/hostap-vm.yml @@ -76,12 +76,21 @@ jobs: with: path: hostap key: hostap-repo - lookup-only: true - name: Checkout hostap if: steps.cache.outputs.cache-hit != 'true' run: git clone https://w1.fi/hostap.git hostap + - name: tar hostap + run: tar -zcf hostap.tgz hostap + + - name: Upload hostap repo + uses: actions/upload-artifact@v4 + with: + name: hostap-repo + path: hostap.tgz + retention-days: 1 + build_uml_linux: name: Build UML (UserMode Linux) if: github.repository_owner == 'wolfssl' @@ -96,15 +105,16 @@ jobs: with: path: linux/linux key: hostap-linux-${{ env.LINUX_REF }} - lookup-only: true - - name: Checking if we have hostap in cache + - name: Download hostap repo if: steps.cache.outputs.cache-hit != 'true' - uses: actions/cache/restore@v4 + uses: actions/download-artifact@v4 with: - path: hostap - key: hostap-repo - fail-on-cache-miss: true + name: hostap-repo + + - name: untar hostap + if: steps.cache.outputs.cache-hit != 'true' + run: tar -xf hostap.tgz - name: Checkout linux if: steps.cache.outputs.cache-hit != 'true' @@ -122,6 +132,13 @@ jobs: cd linux yes "" | ARCH=um make -j $(nproc) + - name: Upload kernel binary + uses: actions/upload-artifact@v4 + with: + name: uml-linux-kernel + path: linux/linux + retention-days: 1 + hostap_test: strategy: fail-fast: false @@ -170,13 +187,14 @@ jobs: timeout-minutes: 45 needs: [build_wolfssl, build_uml_linux, checkout_hostap] steps: - - name: Checking if we have kernel in cache - uses: actions/cache/restore@v4 - id: cache + - name: Download kernel binary + uses: actions/download-artifact@v4 with: - path: linux/linux - key: hostap-linux-${{ env.LINUX_REF }} - fail-on-cache-miss: true + name: uml-linux-kernel + path: linux + + - name: Restore kernel binary executable bit + run: chmod +x linux/linux # No way to view the full strategy in the browser (really weird) - name: Print strategy @@ -215,12 +233,13 @@ jobs: - name: Install pip dependencies run: sudo pip install pycryptodome - - name: Checking if we have hostap in cache - uses: actions/cache/restore@v4 + - name: Download hostap repo + uses: actions/download-artifact@v4 with: - path: hostap - key: hostap-repo - fail-on-cache-miss: true + name: hostap-repo + + - name: untar hostap + run: tar -xf hostap.tgz - name: Checkout correct ref working-directory: hostap