mirror of https://github.com/thesofproject/sof.git
72 lines
2.6 KiB
YAML
72 lines
2.6 KiB
YAML
---
|
|
|
|
name: Zephyr
|
|
|
|
# 'workflow_dispatch' allows running this workflow manually from the
|
|
# 'Actions' tab
|
|
# yamllint disable-line rule:truthy
|
|
on: [push, pull_request, workflow_dispatch, workflow_call]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-20.04
|
|
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
# Using groups to avoid spamming the small results box with too
|
|
# many lines. Pay attention to COMMAS.
|
|
IPC_platforms: [
|
|
# - IPC3 default
|
|
imx8 imx8x imx8m,
|
|
# - IPC4 default
|
|
mtl,
|
|
# Very few IPC3 platforms support IPC4 too.
|
|
-i IPC4 tgl,
|
|
]
|
|
zephyr_revision: [
|
|
manifest_revision,
|
|
"https://github.com/zephyrproject-rtos/zephyr main",
|
|
]
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
# Download a full clone to fix `git describe`, sof_version.h and
|
|
# build reproducibility. sof.git is still small.
|
|
# This is especially useful for daily builds (but not just).
|
|
with:
|
|
fetch-depth: 0
|
|
path: ./workspace/sof
|
|
|
|
# As of December 2022 `--shallow-exclude=v3.2.0-rc3` fixes `git
|
|
# describe`, Zephyr's version.h and build reproducibility while
|
|
# downloading about 200MB less compared to a full clone.
|
|
#
|
|
# Ideally, the --shallow-exclude= argument should be regularly
|
|
# bumped whenever SOF upgrades Zephyr to keep this as fast as
|
|
# possible.
|
|
# In a bigger Zephyr future maybe we could move to a more permanent
|
|
# git fetch --shallow-since='5 months ago' because Zephyr follows
|
|
# a "roughly 4-month release" but for now that saves only 100MB
|
|
# https://docs.zephyrproject.org/latest/project/release_process.html
|
|
- name: west clones
|
|
run: pip3 install west && cd workspace/sof/ && west init -l &&
|
|
west update --narrow --fetch-opt=--depth=5 &&
|
|
git -C ../zephyr fetch --shallow-exclude=v3.2.0-rc3
|
|
|
|
- name: select zephyr revision
|
|
run: cd workspace/zephyr/ &&
|
|
if [ 'manifest_revision' != '${{ matrix.zephyr_revision }}' ]; then
|
|
git fetch ${{ matrix.zephyr_revision }} &&
|
|
git checkout FETCH_HEAD;
|
|
fi &&
|
|
git log --oneline -n 5 --decorate --graph --no-abbrev-commit
|
|
|
|
# https://github.com/zephyrproject-rtos/docker-image
|
|
# Note: env variables can be passed to the container with
|
|
# -e https_proxy=...
|
|
- name: build
|
|
run: cd workspace && ./sof/zephyr/docker-run.sh
|
|
./sof/zephyr/docker-build.sh --cmake-args=-DEXTRA_CFLAGS=-Werror
|
|
--cmake-args=--warn-uninitialized ${{ matrix.IPC_platforms }}
|