Skip to content

Commit fa831b2

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, adds a separate `zephyr-main.yml` workflow running on a schedule to maintain early-warning capability. Updates the README with the new status badge.
1 parent aadcea2 commit fa831b2

File tree

3 files changed

+33
-7
lines changed

3 files changed

+33
-7
lines changed

.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: 15 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.
@@ -169,7 +178,7 @@ jobs:
169178
else
170179
case '${{ matrix.zephyr_revision }}' in
171180
'zmain') rem_rev='main' ;;
172-
*) echo 'Unknown matrix.zephyr_revision'; exit 1 ;;
181+
*) echo "Unknown matrix.zephyr_revision: ${{ matrix.zephyr_revision }}"; exit 1 ;;
173182
esac
174183
( cd sof/submanifests/
175184
sed -e "s#=sof_zephyr_revision_override=#${rem_rev}#" \
@@ -192,8 +201,7 @@ jobs:
192201
# does not use --tags.
193202
#
194203
# 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.
204+
# branches are missing from --decorate below. Cosmetic but annoying.
197205
198206
set -x
199207
# Fix problem 2. Do NOT assume anything about remote names: nothing is guaranteed.
@@ -227,7 +235,7 @@ jobs:
227235
228236
- name: Upload build artifacts
229237
uses: actions/upload-artifact@v4
230-
if: ${{ matrix.zephyr_revision == 'mnfst' }}
238+
if: always()
231239
with:
232240
name: linux-build ${{ matrix.build_opts }} ${{ matrix.IPC_platforms }}
233241
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)