Skip to content

Three build fixes to non-Zephyr builds (testbench and friends) #13149

Three build fixes to non-Zephyr builds (testbench and friends)

Three build fixes to non-Zephyr builds (testbench and friends) #13149

Workflow file for this run

---

Check failure on line 1 in .github/workflows/sparse-zephyr.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sparse-zephyr.yml

Invalid workflow file

(Line: 17, Col: 7): Unexpected value 'false'
name: Sparse 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]
defaults:
run:
shell: bash
jobs:
# disable until https://github.com/zephyrproject-rtos/zephyr/issues/93444
# is fixed
if: false
# As of sparse commit ce1a6720f69e / Sept 2022, the exit status of
# sparse.c is an unusable mess and always zero in practice. Moreover
# SOF has hundreds of sparse warnings right now. So fail only on a
# small subset of specific warnings defined in
# sof/scripts/parse_sparse_output.sh
warnings-subset:
# We're sharing the sparse binary with the zephyr-build container so keep
# this in sync with it.
runs-on: ubuntu-24.04
container:
image: thesofproject/zephyr-lite:v0.28.4
strategy:
fail-fast: false
matrix:
platform: [tgl, mtl, lnl]
steps:
- name: git clone sparse analyzer
uses: actions/checkout@v4
with:
repository: thesofproject/sparse
fetch-depth: 0
filter: 'tree:0'
path: sparse
# As of its 2023 commit 98b203419679, sparse-llvm.c uses symbols
# (LLVMConstGEP, LLVMBuildLoad, LLVMBuildCall,...) which are:
# - -Wdeprecated in LLVM v14
# - Removed in LLVM v16
- name: build sparse analyzer
working-directory: sparse
run: |
make -j4 # HAVE_LLVM=no
- name: git clone sof
uses: actions/checkout@v4
with:
path: sof
fetch-depth: 0 # fix git describe
filter: 'tree:0'
- name: west update
working-directory: sof
run: |
west init -l
west update --narrow --fetch-opt=--depth=5
- name: print all available sdks in /opt/toolchains/
run: |
ls -l /opt/toolchains/
# --pristine is important to reproduce _warnings_. It makes no
# difference for github but it's useful for anyone trying to
# reproduce and copying the command from the logs.
# "sparse" is currently incompatible with PICOLIBC (the new Zephyr default),
# see https://github.com/zephyrproject-rtos/zephyr/issues/63003
- name: analyze zephyr
run: |
./sof/zephyr/docker-build.sh ${{ matrix.platform }} \
--cmake-args=-DZEPHYR_SCA_VARIANT=sparse --cmake-args=-DCONFIG_LOG_USE_VLA=n \
--cmake-args=-DCONFIG_MINIMAL_LIBC=y \
--pristine 2>&1 | tee _.log
printf '\n\n\t\t\t ---- Messages below are treated as sparse errors --- \n\n\n'
(set -x; ./sof/scripts/parse_sparse_output.sh ${{ matrix.platforms.platform }} <_.log)