Skip to content

Commit 8cc6a12

Browse files
committed
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 4a74239 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 <tomasz.m.leman@intel.com>
1 parent 126674f commit 8cc6a12

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

.github/workflows/zephyr.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,10 @@ jobs:
249249
strategy:
250250
fail-fast: false
251251
matrix:
252+
# Search "zephyr_revision" and see below what they expand to.
253+
zephyr_revision: [
254+
"${{ inputs.zephyr_revision || 'mnfst' }}"
255+
]
252256
# Using groups to avoid spamming the small results box with too
253257
# many lines. Pay attention to COMMAS.
254258
platforms: [
@@ -268,6 +272,7 @@ jobs:
268272
# Sparse matrices are complicated, see comments on Linux matrix above.
269273
include:
270274
- build_opts: -d
275+
zephyr_revision: mnfst
271276
platforms: lnl
272277

273278

@@ -354,6 +359,24 @@ jobs:
354359
west init -l sof
355360
west update --narrow --fetch-opt=--filter=tree:0
356361
362+
- name: select zephyr revision
363+
working-directory: ${{ github.workspace }}/workspace
364+
run: |
365+
if ('mnfst' -eq '${{ matrix.zephyr_revision }}') {
366+
$rem_rev = $(git -C zephyr rev-parse HEAD)
367+
} else {
368+
switch ('${{ matrix.zephyr_revision }}') {
369+
'zmain' { $rem_rev = 'main' }
370+
default { Write-Error 'Unknown matrix.zephyr_revision'; exit 1 }
371+
}
372+
Push-Location sof/submanifests/
373+
(Get-Content sof-ci-jenkins/zephyr-override-template.yml) `
374+
-replace '=sof_zephyr_revision_override=', "$rem_rev" `
375+
| Set-Content test-zephyr-main.yml
376+
Pop-Location
377+
west update --narrow --fetch-opt=--filter=tree:0
378+
}
379+
357380
# Get some tags to fix `git describe` etc., see detailed build-linux comments above.
358381
- name: Fetch tags for git describe
359382
working-directory: ${{ github.workspace }}/workspace/zephyr
@@ -428,6 +451,7 @@ jobs:
428451

429452
- name: Upload build artifacts
430453
uses: actions/upload-artifact@v4
454+
if: always()
431455
with:
432456
name: windows-build ${{ matrix.build_opts }} ${{ matrix.platforms }}
433457
if-no-files-found: error

0 commit comments

Comments
 (0)