@@ -7,6 +7,10 @@ name: Sparse Zephyr
77# yamllint disable-line rule:truthy
88on : [push, pull_request, workflow_dispatch, workflow_call]
99
10+ defaults :
11+ run :
12+ shell : bash
13+
1014jobs :
1115 # As of sparse commit ce1a6720f69e / Sept 2022, the exit status of
1216 # sparse.c is an unusable mess and always zero in practice. Moreover
@@ -18,64 +22,60 @@ jobs:
1822 # We're sharing the sparse binary with the zephyr-build container so keep
1923 # this in sync with it.
2024 runs-on : ubuntu-24.04
25+ container :
26+ image : thesofproject/zephyr-lite:v0.28.4
2127
2228 strategy :
2329 fail-fast : false
2430 matrix :
2531 platform : [tgl, mtl, lnl]
2632
2733 steps :
28- - name : free space
29- run : |
30- sudo rm -rf /usr/share/dotnet
31- sudo rm -rf /opt/ghc
32-
3334 - name : git clone sparse analyzer
3435 uses : actions/checkout@v4
3536 with :
3637 repository : thesofproject/sparse
3738 fetch-depth : 0
3839 filter : ' tree:0'
39- path : workspace/ sparse
40+ path : sparse
4041
4142 # As of its 2023 commit 98b203419679, sparse-llvm.c uses symbols
4243 # (LLVMConstGEP, LLVMBuildLoad, LLVMBuildCall,...) which are:
4344 # - -Wdeprecated in LLVM v14
4445 # - Removed in LLVM v16
4546 - name : build sparse analyzer
46- run : cd workspace/sparse && make -j4 # HAVE_LLVM=no
47+ working-directory : sparse
48+ run : |
49+ make -j4 # HAVE_LLVM=no
4750
4851 - name : git clone sof
4952 uses : actions/checkout@v4
5053 with :
51- path : ./workspace/ sof
54+ path : sof
5255 fetch-depth : 0 # fix git describe
5356 filter : ' tree:0'
5457
55- - name : west clones
56- run : pip3 install west && cd workspace/sof/ && west init -l &&
57- west update --narrow --fetch-opt=--depth=5
58+ - name : west update
59+ working-directory : sof
60+ run : |
61+ west init -l
62+ west update --narrow --fetch-opt=--depth=5
5863
59- # Not strictly necessary but saves a lot of scrolling in the next step
60- # Caching a 12G image is unfortunately not possible:
61- # https://github.com/ScribeMD/docker-cache/issues/304
62- # For faster builds we would have to pay for some persistent runners.
63- - name : Download docker image && ls /opt/toolchains/
64- run : cd workspace && ./sof/zephyr/docker-run.sh ls -l /opt/toolchains/
64+ - name : print all available sdks in /opt/toolchains/
65+ run : |
66+ ls -l /opt/toolchains/
6567
6668 # --pristine is important to reproduce _warnings_. It makes no
6769 # difference for github but it's useful for anyone trying to
6870 # reproduce and copying the command from the logs.
6971 # "sparse" is currently incompatible with PICOLIBC (the new Zephyr default),
7072 # see https://github.com/zephyrproject-rtos/zephyr/issues/63003
7173 - name : analyze zephyr
72- working-directory : ./workspace
7374 run : |
74- ./sof/zephyr/docker-run.sh \
75- ./sof/zephyr/docker-build.sh ${{ matrix.platform }} \
76- --cmake-args=-DZEPHYR_SCA_VARIANT=sparse --cmake-args=-DCONFIG_LOG_USE_VLA=n \
77- --cmake-args=-DCONFIG_MINIMAL_LIBC=y \
78- --pristine 2>&1 | tee _.log
75+ ./sof/zephyr/docker-build.sh ${{ matrix.platform }} \
76+ --cmake-args=-DZEPHYR_SCA_VARIANT=sparse --cmake-args=-DCONFIG_LOG_USE_VLA=n \
77+ --cmake-args=-DCONFIG_MINIMAL_LIBC=y \
78+ --pristine 2>&1 | tee _.log
7979
80- printf '\n\n\t\t\t ---- Messages below are treated as sparse errors --- \n\n\n'
81- (set -x; ./sof/scripts/parse_sparse_output.sh ${{ matrix.platforms.platform }} <_.log)
80+ printf '\n\n\t\t\t ---- Messages below are treated as sparse errors --- \n\n\n'
81+ (set -x; ./sof/scripts/parse_sparse_output.sh ${{ matrix.platforms.platform }} <_.log)
0 commit comments