Skip to content

Commit

Permalink
.github/zephyr: build with the debug overlay and CONFIG_ASSERT
Browse files Browse the repository at this point in the history
This makes sure Zephyr's -fmacro-prefix-map is working and keeps the
builds reproducible when using a recent enough toolchain.

As found in the CONFIG_ASSERT PR
thesofproject#6530 (comment)
this is not true for old Xtensa toolchains.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
  • Loading branch information
marc-hb committed Apr 25, 2023
1 parent fd0bc43 commit 223ea05
Showing 1 changed file with 32 additions and 6 deletions.
38 changes: 32 additions & 6 deletions .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ jobs:
# Temporary testbed for Zephyr development.
-i IPC4 tgl tgl-h,
]
build_opts: [""]
# Sparse matrices are complicated, you must read this page slowly:
# https://docs.github.com/en/actions/using-jobs/using-a-matrix-for-your-jobs
include:
# specify one extra -d combination without affecting the main matrix
- build_opts: -d
zephyr_revision: mnfst
IPC_platforms: mtl

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -123,13 +131,14 @@ jobs:
run: cd workspace && ./sof/zephyr/docker-run.sh
./sof/zephyr/docker-build.sh --cmake-args=-DEXTRA_CFLAGS=-Werror
--cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings'
--cmake-args=--warn-uninitialized ${{ matrix.IPC_platforms }}
--cmake-args=--warn-uninitialized
${{ matrix.build_opts }} ${{ matrix.IPC_platforms }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
if: ${{ matrix.zephyr_revision == 'mnfst' }}
with:
name: linux-build ${{ matrix.IPC_platforms }}
name: linux-build ${{ matrix.build_opts }} ${{ matrix.IPC_platforms }}
path: |
${{ github.workspace }}/workspace/build-sof-staging
${{ github.workspace }}/workspace/**/compile_commands.json
Expand All @@ -138,7 +147,6 @@ jobs:
runs-on: windows-latest
strategy:
fail-fast: false
# FIXME: Create common matrix for build-linux and build-windows
matrix:
# Using groups to avoid spamming the small results box with too
# many lines. Pay attention to COMMAS.
Expand All @@ -151,6 +159,13 @@ jobs:
# Very few IPC3 platforms support IPC4 too.
-i IPC4 tgl tgl-h,
]
build_opts: [""]
# Sparse matrices are complicated, see comments on Linux matrix above.
include:
- build_opts: -d
zephyr_revsion: mnfst
platforms: mtl


steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -267,12 +282,12 @@ jobs:
--no-interactive
--cmake-args=-DEXTRA_CFLAGS=-Werror
--cmake-args=-DEXTRA_AFLAGS='-Werror -Wa,--fatal-warnings'
--cmake-args=--warn-uninitialized ${{ matrix.platforms }}
--cmake-args=--warn-uninitialized ${{ matrix.build_opts }} ${{ matrix.platforms }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: windows-build ${{ matrix.platforms}}
name: windows-build ${{ matrix.build_opts }} ${{ matrix.platforms }}
path: |
${{ github.workspace }}/workspace/build-sof-staging
${{ github.workspace }}/workspace/**/compile_commands.json
Expand Down Expand Up @@ -313,7 +328,18 @@ jobs:
- name: Compare Linux vs Windows builds
run: |
diffs=0
diffs=0; ls -l
# Check not too much is missing (it happened!)
# http://mywiki.wooledge.org/ParsingLs
for regdir in 'linux-build *mtl' \
'windows-build *mtl' \
'windows-build *-i IPC4 tgl tgl-h'; do
find . -maxdepth 1 | grep -q "\./${regdir}\$" ||
{ >&2 printf 'Missing %s\n' "${regdir}"; exit 1; }
done
set -x
for windir in windows-build*; do
lindir=linux-"${windir#windows-}"
diff -qr "$lindir" "$windir" || : $((diffs++))
Expand Down

0 comments on commit 223ea05

Please sign in to comment.