From 8cc6a12c34424b620c09e449dbdc0e2029045606 Mon Sep 17 00:00:00 2001 From: Tomasz Leman Date: Fri, 3 Apr 2026 15:12:19 +0200 Subject: [PATCH] workflows: add zephyr_revision support to Windows builds Fixes the zephyr-main scheduled workflow by ensuring Windows builds use the same Zephyr revision as Linux builds when comparing artifacts. Commit 4a74239e8 extracted zmain builds into a separate scheduled workflow and parameterized the Linux build job to support the zephyr_revision input. However, the Windows build job was not updated, causing it to always build against the manifest version while Linux built against Zephyr main. This caused the compare-linux-win job to fail when comparing binaries built from different Zephyr versions. Changes: - Add zephyr_revision to build-windows matrix (mirrors build-linux) - Add "select zephyr revision" step for Windows (PowerShell variant) - Add zephyr_revision to Windows sparse matrix include section - Add "if: always()" to Windows artifact upload to match Linux Signed-off-by: Tomasz Leman --- .github/workflows/zephyr.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index eab5633b236c..358ae3fc49ef 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -249,6 +249,10 @@ jobs: strategy: fail-fast: false matrix: + # Search "zephyr_revision" and see below what they expand to. + zephyr_revision: [ + "${{ inputs.zephyr_revision || 'mnfst' }}" + ] # Using groups to avoid spamming the small results box with too # many lines. Pay attention to COMMAS. platforms: [ @@ -268,6 +272,7 @@ jobs: # Sparse matrices are complicated, see comments on Linux matrix above. include: - build_opts: -d + zephyr_revision: mnfst platforms: lnl @@ -354,6 +359,24 @@ jobs: west init -l sof west update --narrow --fetch-opt=--filter=tree:0 + - name: select zephyr revision + working-directory: ${{ github.workspace }}/workspace + run: | + if ('mnfst' -eq '${{ matrix.zephyr_revision }}') { + $rem_rev = $(git -C zephyr rev-parse HEAD) + } else { + switch ('${{ matrix.zephyr_revision }}') { + 'zmain' { $rem_rev = 'main' } + default { Write-Error 'Unknown matrix.zephyr_revision'; exit 1 } + } + Push-Location sof/submanifests/ + (Get-Content sof-ci-jenkins/zephyr-override-template.yml) ` + -replace '=sof_zephyr_revision_override=', "$rem_rev" ` + | Set-Content test-zephyr-main.yml + Pop-Location + west update --narrow --fetch-opt=--filter=tree:0 + } + # Get some tags to fix `git describe` etc., see detailed build-linux comments above. - name: Fetch tags for git describe working-directory: ${{ github.workspace }}/workspace/zephyr @@ -428,6 +451,7 @@ jobs: - name: Upload build artifacts uses: actions/upload-artifact@v4 + if: always() with: name: windows-build ${{ matrix.build_opts }} ${{ matrix.platforms }} if-no-files-found: error