Commit Graph

184 Commits

Author SHA1 Message Date
Laurentiu Mihalcea 76e650e565 .github/zephyr: switch to python 3.10 on windows
Zephyr commit b3b8360f3993 ("west: runners: Add `west rtt` command
with pyocd implementation") adds some functionality to the
west commands making use of the pipe ("|") operator for
function return type hinting. As per PEP 604 [1], this operator
can be used for writing union types starting from python 3.10.
Since the SOF windows builds use python 3.8 this leads to
the CI failing.

To fix this, switch to using python 3.10. This is not a
problem for Linux CI jobs as they already use python 3.10.

The following is a snippet of a failed windows CI job
regarding this:

File "D:\a\sof\sof\workspace\zephyr\scripts/west_commands\runners\core.py",
line 780, in ZephyrBinaryRunner

    def get_rtt_address(self) -> int | None:

    TypeError: unsupported operand type(s) for |: 'type' and 'NoneType'

[1]: https://peps.python.org/pep-0604/

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-09-13 12:52:32 +03:00
Marc Herbert 76c976f8b3 app: drop "overlay" from the name of a few extra configs
Zephyr does not call extra configs "overlays", it uses overlays only for
Device Tree.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-09 10:16:39 +01:00
Kai Vehmanen 7ec73c72f6 .github/zephyr: do not create tarballs in github builds
Github artifact store allows to download packages already,
so no need to create tarballs in these builds. Also this avoids
problems comparing Windows and Linux builds as due to handling
of symbolic links, the resulting tarball are not comparable.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
2024-09-06 09:28:16 -07:00
Marc Herbert ff57b7917f .github/ipc_fuzzer: use new -i 3 and -i 4 fuzz.sh options
Stop hardcoding -DCONFIG_IPC_MAJOR_x=y and use the new -3 and -4 fuzz.sh
CLI flags.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-09-02 16:48:32 +01:00
Marc Herbert cda94e1688 fuzz.sh: replace deprecated OVERLAY_CONFIG with newer EXTRA_CONF_FILE
OVERLAY_CONFIG was deprecated in Zephyr 3.4 commit
https://github.com/zephyrproject-rtos/zephyr/commits/3a345682ba81

Also enhance example and demonstrate the syntax to pass multiple files.

This finishes the work started by commit 6cd34c89a1
("xtensa-build-zephyr.py: use EXTRA_CONF_FILE instead of OVERLAY_CONFIG")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-08-21 14:25:56 +01:00
Marc Herbert 2aaee2e585 .github: add a test for xtensa-build-zephyr.py --all
Add a test to avoid --all breakages like the one in commit
05bfc36dac ("ptl: Add initial PTL configuration"), reported in #9262

See also previous commit.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-02 18:40:30 +03:00
Marc Herbert 6c9df3046a Add new file: app/overlays/repro-build.conf
Passing options one by one in .github/workflows/zephyr.yml was becoming
unwieldy. Reduces Windows/Linux duplication. This also makes local
testing easier; less typing and guess work.

This should also help with #9116.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-07-02 11:30:19 +03:00
Fred Oh bf149274ad pull-request.yml: add mt8188 to gcc-build-only
mt8188 toolchain is added to SOF docker image.

Signed-off-by: Fred Oh <fred.oh@linux.intel.com>
2024-05-22 15:24:39 +01:00
Guennadi Liakhovetski ab682597ee lnl: add support for llext modules
LNL now supports modular TOML, it can now also support LLEXT modules.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-14 14:48:13 +01:00
Marc Herbert 8a78394a13 .github: llext: unhardcode mtl/module_overlay.conf
Ready to add LNL or other back

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-05-09 11:16:51 +03:00
Guennadi Liakhovetski a090f5151e llext: use xtensa-build-zephyr.py in GitHub CI
Switch the GitHub CI workflow to use xtensa-build-zephyr.py

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-05-07 10:51:34 +03:00
Marc Herbert b9f331c8a6 .github/tools: add missing -GNinja when building ALSA plugin
Fixes initial commit fb229b9cc1 (".github/tools.tml: add build of SOF
ALSA plugin")

Github free runners don't have that many cores but let's build in
parallel and use them all.

Perhaps even more useful: let's give people who copy the build steps
from this file a much faster build.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-05-03 15:01:53 +03:00
Laurentiu Mihalcea ebe33ca38d .github/zephyr: disable disassembly with inline source code
By default, the disassembly file (.lst) generated
during the build process when enabling `CONFIG_OUTPUT_DISASSEMBLY`
will also contain inline source code. This is not ideal
for reproducible builds that compare the .lst files
obtained on different platforms (i.e: Windows and Linux)
because of the differences in the inline source code that
may appear.

One of the identified causes for such differences were
the ".." include paths, which resulted in the Windows
.lst omitting some bits of the inline source code that
were present in the Linux .lst file.

Because these issues are hard to debug and unintuitive,
the solution is to disable the inline source code. This way,
the CI can keep testing for reproductibility using just the
assembly and machine code from the .lst file, which are
more important than the inline source code.

This fixes thesofproject/sof/issues/9034.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-04-23 11:49:04 +03:00
Marc Herbert 929b194b1c .github/zephyr: upgrade obsolete actions/setup-python@v4 to v5
Fixes the following warning:
https://github.com/thesofproject/sof/actions/runs/8289483047

```
Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/setup-python@v4. For more information see:
https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-04-05 13:02:49 -05:00
Guennadi Liakhovetski 540eeebd88 Add an LLEXT build test
Add a GitHub workflow entry to build with LLEXT enabled, using the
Zephyr toolchain.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-03-19 18:00:25 +02:00
Laurentiu Mihalcea d49395b8e8 workflow: remove imx8ulp from gcc build test
XTOS is going to be deprecated on i.MX8ULP so remove it from
the gcc build test which uses SOF with XTOS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-03-15 13:14:15 +02:00
Marc Herbert 342d5d0259 .github/zephyr: upgrade deprecated actions/cache@v3.0.11 to v4
Fixes a lot of instances of this warning:

Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/cache@v3.0.11. For more information see:
https://github.blog/changelog/
  2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-08 13:51:26 +00:00
Marc Herbert e29d4bc390 .github: upgrade deprecated upload-artifact@v3 to v4
Fixes a lot of instances of this warning:

Node.js 16 actions are deprecated. Please update the following actions
to use Node.js 20: actions/upload-artifact@v3. For more information see:
https://github.blog/changelog/
  2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-03-08 13:51:26 +00:00
Marc Herbert dfc59bc3c1 .github/ipc_fuzzer.yml: save crash-* and fuzz-*.log artifacts
"Unit test" crash-* files allow instant reproduction.

fuzz-*.log files are created when using -j

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-29 13:26:02 +00:00
Marc Herbert ac934fee56 .github/fuzzer: use new -j $(nproc) option
Use new option to fuzz more in the same time.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-29 13:26:02 +00:00
Laurentiu Mihalcea fccb097ddd installer: replace imx8 with imx8m
XTOS is going to be deprecated on imx8/imx8x so replace
imx8 with imx8m.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Laurentiu Mihalcea 1519efbfff workflow: remove imx8/imx8x platforms from QEMU boot test
XTOS will be deprecated on imx8/imx8x and these platforms
will be moved to native Zephyr so remove them from the
QEMU boot test which uses SOF with XTOS.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-16 21:48:10 +02:00
Marc Herbert 478e0b0e22 .github/zephyr: force -DCONFIG_OUTPUT_DISASSEMBLY=y
Force -DCONFIG_OUTPUT_DISASSEMBLY=y when building Zephyr to make sure
the disassembly is compared between the Windows and Linux builds.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-02-02 17:19:38 +02:00
Marc Herbert a3045b83a6 .github: fallback on rebuild-testbench -j 1 when failing
Parallel builds are fast but they bury errors, for instance good luck
finding the cause of this failure:
 https://github.com/thesofproject/sof/actions/runs/7667629748/job/20897861756?pr=8019

Use the well known technique of falling back on a single thread when
failing.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-30 19:46:35 +02:00
Marc Herbert 46eb79eb45 .github: use new checkout v4 option "filter: tree:0"
This saves time without affecting git describe like fetch depth does.

Also cancel fetch depth when building the firmware.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-29 16:45:19 +02:00
Marc Herbert da2b026c76 .github: upgrade all checkout actions, v3 -> v4
Fixes the new mass warnings:

Node.js 16 actions are deprecated. Please update the following
actions to use Node.js 20: actions/checkout@v3. For more information
see:
https://github.blog/changelog/
   2023-09-22-github-actions-transitioning-from-node-16-to-node-20/

We've used checkout v4 in other places and everything worked fine.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-29 16:45:19 +02:00
Marc Herbert 0698fa334a .github/sparse: switch sparse version back to the upstream main branch
This should work now that Guennadi's endianness fix 98b20341967 has been
merged.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-04 15:32:05 +00:00
Marc Herbert 652a393e6d .github/sparse: upgrade to checkout@v4 and switch to filter: 'tree:0'
`fetch-depth: 0` fixes git describe while `tree:0` keeps things fast.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2024-01-04 15:32:05 +00:00
Marc Herbert b7df375a33 .github/fuzz: add -DEXTRA_CFLAGS='-Werror' -DEXTRA_CXXFLAGS='-Werror'
We want to catch warnings like the incompatible pointer warning fixed by
3f572b8cb6 ("Audio: ASRC: Fix the IPC3 incompatible pointer type")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-19 16:52:33 +00:00
Daniel Baluta 479bd7a5eb .github/zephyr: Add imx8ulp target to CI
Now that imx8ulp support is ready with Zephyr add it as compilation
target for CI.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-12-18 16:34:24 +02:00
Marc Herbert 3967255a99 .github: run all workflows in daily tests
Not sure why we didn't do this sooner

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-18 15:48:21 +02:00
Marc Herbert 22ab28881b .github: make all workflows callable and dispatchable
Because why shouldn't they be.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-18 15:48:21 +02:00
Marc Herbert bca9623713 .github: make ipc_fuzzer.yml callable with duration parameter
So we can run it for longer in daily tests.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-18 15:48:21 +02:00
Daniel Baluta 45cbf04949 .github/zephyr: Upgrade to Zephyr SDK 0.16.4
This adds support for imx8ulp.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-12-14 11:34:12 +02:00
Marc Herbert 6328ed6a53 .github/zephyr: add -Werror to LP64 compilation
Now that all 64bits warnings have just been fixed, let's keep that build
clean.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-04 10:42:57 +02:00
Marc Herbert fb229b9cc1 .github/tools.tml: add build of SOF ALSA plugin
Add new GitHub workflow that builds SOF ALSA plugin

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-12-01 13:09:19 -08:00
Marc Herbert 6458f48471 scripts/fuzz.sh: fix multiple issues with "stub" overlays
Fixes commit deed9a8808 ("scripts: fuzz: add support for build and
overlays")

The main issue was the way fuzz.sh was trying to parse the overlay
file. Drop that and just pass it as is to `west` and `cmake` instead,
they know what to do with it.

Also:

- Fix invalid syntax in stub_build_all_ipc4.conf
- Make fuzz.sh shellcheck-clean again. Always use shellcheck.
- Temporarily disable `CONFIG_COMP_SMART_AMP` in
  stub_build_all_ipc3.conf because `smart_amp.c` does not compile (in
  any configuration)

```
sof/src/audio/smart_amp/smart_amp.c:748:9: error:
   no member named 'in_channels' in 'struct smart_amp_data'
   sad->in_channels = audio_stream_get_channels(&source_buffer->stream);
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-31 14:23:26 +00:00
Marc Herbert d661616892 .github/zephyr: de-hardcode the remote name in the Windows build too
Fixes commit 4bc6488b24 (".github/zephyr: de-hardcode the name of the
zephyr remote")

(Yay for duplication)

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-25 13:36:22 +03:00
Marc Herbert 92fa7952d0 .github/zephyr: time some fetch commands
GitHub conveniently times each step but to reduce step proliferation we
sometimes have multiple commands in a single step and lose the ability
to time download commands. Prefix them with `time` to restore the data.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 17:53:50 +03:00
Marc Herbert 4bc6488b24 .github/zephyr: de-hardcode the name of the zephyr remote
Fixes issue reported in stable-v2.7 #8353 which wants to use our own,
downstream Zephyr branch.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-23 17:53:50 +03:00
Marc Herbert 8bbad9f263 .github: re-enable rimage workflows
Migrate rimage build and cppcheck workflows from
sof/tools/rimage/.github/workflows/ (where they're ignored) to
sof/.github/workflows/

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-10-18 13:42:40 +03:00
Chao Song deb7a097e3 github action: remove duplicate build for TGL/TGL-H
At the beginning, we have two build jobs in github
action to build IPC3 and IPC4 firmware for TGL/TGL-H.

The PR https://github.com/thesofproject/sof/pull/8048
switches cAVS2.5 configs to use IPC4 by default and
empties the cAVS2.5 overlay files. After the change,
the xtensa-build-zephyr.py script is building the
same IPC4 firmware with or without '-i IPC4' option.
So we have two jobs running different build command
but build the same IPC4 firmware.

Recently, commit 5004d0fe1e ("zephyr.yml: remove ipc
option for zephyr build") removes '-i IPC4' option
in github action for TGL/TGL-H IPC4 build. So we have
duplicated jobs to build firmware for TGL and TGL-H
in the end.

This patch removes the duplicated build job which previously
is used to build IPC3 firmware for TGL/TGL-H and obsolete
comments.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-28 17:24:51 +01:00
Marc Herbert 0061953a59 .github/sparse-zephyr: add -DCONFIG_MINIMAL_LIBC to avoid picolibc
Add a sparse-specific workaround for the incompatibility with
picolibc (the new Zephyr default)
https://github.com/zephyrproject-rtos/zephyr/issues/63003

Also fix comment in commit 2a9473a17b ("app/prj.conf: disable PICOLIBC
with CONFIG_MINIMAL_LIBC=y"): we don't need to disable PICOLIBC
_everywhere_; we only need to disable it when using sparse.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-27 14:00:10 +01:00
Marc Herbert 8eedfe4836 .github: build-windows: choco install ninja
Ninja seems to have just mysteriously disappeared from
https://github.com/actions/runner-images/blob/win22/20230918.1/images/win/Windows2022-Readme.md
See #8250 for more details.

Let's try to install it explicitly.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-09-25 10:13:42 +03:00
Chao Song 5004d0fe1e zephyr.yml: remove ipc option for zephyr build
For TGL and TGL-H, IPC4 is the default build config,
remove the '-i IPC4' option as it is not needed
anymore.

Signed-off-by: Chao Song <chao.song@linux.intel.com>
2023-09-21 11:00:12 +03:00
Marc Herbert 23284780d7 .github/zephyr.yml: fix tags missing from `git -C zephyr/ describe`
Fixes commit 4286bb3ee1 (".github/zephyr: west update with new, faster
git --filter-tree:0") that accidentally dropped git tags from `git
describe` in Zephyr since April and made the build different from
everyone else.

See detailed explanation added to the source.

To find the output of `git -C zephyr/ describe`, search for
`generated/version.h` in the build logs.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-08-30 14:11:11 +01:00
Marc Herbert 29b3033484 .github/zephyr.yml: remove spurious `zephyr_revsion` matrix variable
Fixes commit 6f9f2ee28e (".github/zephyr: build with the debug overlay
and CONFIG_ASSERT")

Remove misspelled `zephyr_revsion` matrix variable. It was a hasty
copy/paste in that commit.

It's a harmless no-op because build-windows does not play any git tricks
and always builds from the manifest. However it makes the list of
configurations confusing in the Github interface.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-08-30 15:03:14 +03:00
Curtis Malainey 1a89639cf0 ci: Add build all config
Utilize the posix build so that as many components as possible can be
built at once. Also build a bunch of `default n` components as well.

Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
2023-07-26 13:31:36 +01:00
Marc Herbert f97183a8c4 .github/zephyr: add --cmake-args=-DEXTRA_CXXFLAGS=-Werror
We have C++ code now.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-06-22 10:35:06 +03:00
Daniel Baluta a5dcd86251 .github: Use mimx93_a55_evk board
We no longer use synthetic mimx93_a55_evk_sof board but
rather we customize already existing proper mimx93_a55_evk board.

Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
2023-06-21 13:13:11 +03:00