Skip to content

Commit fcc6470

Browse files
committed
github: workflows: extract zmain build into separate scheduled workflow
Removes the zmain build from the PR/push matrix to reduce noise. Instead, it adds a separate `zephyr-main.yml` workflow running on a schedule to maintain early-warning capability. It also parameterizes `zephyr.yml` to be cleanly callable, and updates the README with the new status badge.
1 parent aadcea2 commit fcc6470

3 files changed

Lines changed: 34 additions & 7 deletions

File tree

.github/workflows/zephyr-main.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: Zephyr Main Branch
3+
4+
# yamllint disable-line rule:truthy
5+
on:
6+
schedule:
7+
- cron: '0 4,16 * * *'
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
zephyr-main-builds:
15+
uses: ./.github/workflows/zephyr.yml
16+
with:
17+
zephyr_revision: 'zmain'

.github/workflows/zephyr.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,17 @@ name: Zephyr
55
# 'workflow_dispatch' allows running this workflow manually from the
66
# 'Actions' tab
77
# yamllint disable-line rule:truthy
8-
on: [push, pull_request, workflow_dispatch, workflow_call]
8+
on:
9+
push:
10+
pull_request:
11+
workflow_dispatch:
12+
workflow_call:
13+
inputs:
14+
zephyr_revision:
15+
description: 'Zephyr revision to build against'
16+
type: string
17+
required: false
18+
default: 'mnfst'
919

1020
# Specifies group name that stops previous wokrflows if the name matches
1121
concurrency:
@@ -112,8 +122,7 @@ jobs:
112122
# These keys are kept short because Github's left column is not resizable.
113123
# Search "zephyr_revision" and see below what they expand to.
114124
zephyr_revision: [
115-
mnfst, # special value: don't override sof/west.yml
116-
zmain, # Zephyr's main branch
125+
"${{ inputs.zephyr_revision || 'mnfst' }}"
117126
]
118127
# Using groups to avoid spamming the small results box with too
119128
# many lines. Pay attention to COMMAS.
@@ -173,7 +182,8 @@ jobs:
173182
esac
174183
( cd sof/submanifests/
175184
sed -e "s#=sof_zephyr_revision_override=#${rem_rev}#" \
176-
sof-ci-jenkins/zephyr-override-template.yml > test-zephyr-main.yml
185+
sof-ci-jenkins/zephyr-override-template.yml \
186+
> test-zephyr-main.yml
177187
)
178188
time west update --narrow --fetch-opt=--filter=tree:0
179189
fi
@@ -192,8 +202,7 @@ jobs:
192202
# does not use --tags.
193203
#
194204
# 2. west fetches using the remote URL, not the remote name. So remote
195-
# branches are missing from --decorate below. Cosmetic but annoying;
196-
# especially in the "zmain" case.
205+
# branches are missing from --decorate below. Cosmetic but annoying.
197206
198207
set -x
199208
# Fix problem 2. Do NOT assume anything about remote names: nothing is guaranteed.
@@ -227,7 +236,7 @@ jobs:
227236
228237
- name: Upload build artifacts
229238
uses: actions/upload-artifact@v4
230-
if: ${{ matrix.zephyr_revision == 'mnfst' }}
239+
if: always()
231240
with:
232241
name: linux-build ${{ matrix.build_opts }} ${{ matrix.IPC_platforms }}
233242
if-no-files-found: error

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
### Status
44
[![Daily Actions](https://github.com/thesofproject/sof/actions/workflows/daily-tests.yml/badge.svg)](https://github.com/thesofproject/sof/actions/workflows/daily-tests.yml)
5+
[![Zephyr Main Branch](https://github.com/thesofproject/sof/actions/workflows/zephyr-main.yml/badge.svg)](https://github.com/thesofproject/sof/actions/workflows/zephyr-main.yml)
56

67
### Community
78

0 commit comments

Comments
 (0)