Commit Graph

164 Commits

Author SHA1 Message Date
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
Marc Herbert d0f59a7cb3 .github: add first LP64 compilation
A ton of (valid!) warnings but this will make sure the code at least
compiles.

For more context see #7192

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-06-14 13:19:22 +03:00
Marc Herbert abad20650a .github: ipc_fuzzer: upload stdout logs
Quoting @andyross in
https://github.com/thesofproject/sof/pull/7668#issuecomment-1561587959

> OK, as it turns out when running native_posix+fuzzing, the fuzzer
> output goes to stderr (and appears here) where the console output goes
> to stdout, and is currently being discarded. For a sanitizer-detected
> failure, that's actually fine as the stack trace will show up in the
> CI logs. But this was just a call to posix_exit(), which is an "error"
> to the fuzzer but not very informative to us without knowing the
> software state that led to it. Most likely this is a Zephyr
> panic (e.g. an assertion failure -- not a trap like SIGSEGV/SIGILL
> that would be caught by the host OS and thus libfuzzer), because the
> default fatal error handler is to tell the arch layer to do a system
> halt, and native_posix implements this by exiting. And it's certainly
> not unlikely to have been triggered by the fuzzing.

> Basically: @marc-hb if we could arrange to save the stdout of the
> offending fuzz process on failure that would be great. Alas this
> particular incident may have been lost, but there will surely be more.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-29 09:59:34 +03:00
Andy Ross 77dad39cc4 github/workflows: Remove old fuzzing check
This has bitrotten vs. the newer code upstream at oss-fuzz, involves
an expensive docker container build, and provides little value vs. the
newer fuzz.sh script that runs in the regular CI containers.

Let oss-fuzz handle the deep validation.  We should be using fuzzing
as a smoke test via the existing scripts.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-25 13:30:28 -07:00
Marc Herbert 1cc4a1f31e .github: add LNL compilation
Because now we can.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-25 14:28:26 +03:00
Andy Ross e4aee1afe7 Revert "tools: Remove older fuzz framework"
This got merged too fast.  Turns out it broke the newer fuzz
integration that was in the same YAML file.  Also there are some
evolving review comments.  Will resubmit.

This reverts commit 11e57f5030.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 12:27:28 -07:00
Andy Ross 11e57f5030 tools: Remove older fuzz framework
Fuzzing via the new framework is now integrated at oss-fuzz upstream,
so there's no point to keep this in SOF anymore.  The github workflow
has bitrot vs. the newer build.sh, and that docker build is very
heavyweight vs. the newer fuzz.sh smoke test that runs in the regular
build container anyway.

Signed-off-by: Andy Ross <andyross@google.com>
2023-05-23 10:03:02 -07:00
Andrey Borisovich 38f3f5d411 workflows: sparse-zephyr upgraded runner OS to Ubuntu 22.04
Runner OS for the Zephyr workflow had been updated to Ubuntu 22.04,
so upgrading this workflow too.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich a047538c82 workflows: Zephyr build-linux job upgraded runner OS to Ubuntu 22.04
New Zephyr Docker container v.26.4 is based on Ubuntu 22.04,
upgrading build-linux job OS to match the one in the container.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich 23bc1c5d0e workflows: Zephyr build-windows removed unzpip package
Installation of new Zephyr SDK 0.16.1 does not require unzip anymore
in the setup.cmd script. This tool had been replaced by 7z that is
by default present on all Github Windows runners.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Andrey Borisovich 69db1ee0ca workflows: Zephyr build-windows upgrade Zephyr SDK to 0.16.1
Zephyr main branch requires new Zephyr SDK.
Upgraded version of Zephyr SDK to newest available v0.16.1 in the
build-windows job. New SDK is backward compatible with old Zephyr
revisions so the upgrade is applied to all CI.

Signed-off-by: Andrey Borisovich <andrey.borisovich@intel.com>
2023-05-20 01:45:42 +03:00
Marc Herbert 179f23331e .github/sparse-zephyr: switch to newer -DZEPHYR_SCA_VARIANT=sparse
-DSPARSE=y still works but has been deprecated for a while.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-17 12:59:25 +03:00
Marc Herbert 30f4c8c972 .github/sparse-zephyr.yml: delete obsolete REAL_CC magic
This hasn't been required since Zephyr commit 91902c5fd4db ("cmake: add
sparse support to the new SCA infrastructure")

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-17 12:59:25 +03:00
Marc Herbert 2a8f6a6fc7 .github/fuzzer: apt-get install i386 dependencies explicitly
Let's try to fix the error below spotted in
https://github.com/thesofproject/sof/actions/runs/4981366388

I have no idea why this worked before and not anymore but if this makes
apt happy then we're happy.

```
libstdc++-12-dev:i386 :
  Depends: libstdc++6:i386 (>= 12.1.0-2ubuntu1~22.04) but it is not
           going to be installed
  Depends: libc6-dev:i386 (>= 2.13-0ubuntu6) but it is not installable
```

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-15 15:50:30 -07:00
Marc Herbert fca84b8773 .github/zephyr: align hal_xtensa when compiling with Zephyr main branch
We import hal_xtensa indirectly through zephyr/west.yml.

When overriding the Zephyr revision in sof/west.yml to test the Zephyr
main branch "zmain", we must also update the version of hal_xtensa
specified in zephyr/west.yml. Stop doing a manual, single repo git fetch
and use a submanifest to perform this correctly. This is exactly why
submanifests/ were added in the first place.

These fixes the imx8m compilation error spotted and discussed
in (unrelated) #7579 following the IMX rename in
https://github.com/zephyrproject-rtos/zephyr/pull/57084 and
https://github.com/zephyrproject-rtos/zephyr/pull/57795

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-12 11:40:42 -07:00
Guennadi Liakhovetski a4c8d4ef79 Intel: remove XTOS support
XTOS isn't supported any more for Intel platforms, remove support for
it.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-05-11 19:17:17 +03:00
Marc Herbert 45c3f13215 .github/fuzzer: add IPC matrix and IPC4 to new fuzzer
Hot on the heels of PR #7531.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-11 11:43:07 +03:00
Marc Herbert 1f9c58af6f .github/fuzzer: fix comment indentation, applies to only one fuzzer
Fix the comment indentation to show it applies only to the older fuzzer.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-11 11:43:07 +03:00
Marc Herbert de6690f104 .github: upgrade most runners to latest Ubuntu 22.04
Let's not fall behind.

Ubuntu 22.04 is the latest runner offered by Github:
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-08 12:21:55 +03:00
Marc Herbert 65a68b7c31 .github: upgrade all checkout actions to v3
Search and replace checkout@v2 with checkout@v3.

This finally gets rid of all warnings "Node.js 12 actions are
deprecated".

We've been using v3 in a few other places and never met any backwards
compatibility issue.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-05-04 16:46:43 +03:00
Marc Herbert 6f9f2ee28e .github/zephyr: build with the debug overlay and CONFIG_ASSERT
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
https://github.com/thesofproject/sof/pull/6530#issuecomment-1482330214
this is not true for old Xtensa toolchains.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-25 13:22:41 +03:00
Marc Herbert 4286bb3ee1 .github/zephyr: west update with new, faster git --filter-tree:0
Twice faster than shallow clones without any of the git describe or
other hassle. More info in
https://github.com/zephyrproject-rtos/west/issues/638

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-25 13:22:41 +03:00
Greg Galloway f7a1d2aaf8 Update pull-request.yml
A small typo, but irrelevant as this PR doesn't need to be merged.

Signed-off-by: Greg Galloway <greg.galloway@intel.com>
2023-04-24 22:22:16 +01:00
Marc Herbert 9cd7090345 .github/zephyr: add -Werror to AFLAGS, not just CFLAGS
Past Zephyr experience showed that CFLAGS is not enough to cover all
cases: https://github.com/zephyrproject-rtos/zephyr/commit/8a603da6cde63

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-24 22:08:27 +01:00
Guennadi Liakhovetski f772b39e4d sparse: use CONFIG_LOG_USE_VLA=n
Sparse output is spammed with "Variable length array" warnings from
Zephyr logging system. The use of VLAs there can be disabled via
Kconfig. Do that to avoid exceeding sparse's warning maximum and
losing important warnings.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2023-04-19 14:57:55 +03:00
Marc Herbert 4311da195d .github/zephyr: move zephyr revision in first results matrix position
Recent experience has shown that upstream Zephyr regressions are much
more common than platform-specific failures. So move the Zephyr version
in first position, so this will group zephyr regressions and make them
much more obvious.

Use very short keys for the revisions because the left column in
Github's results "checks" tab is very narrow and cannot be resized.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-04-19 14:44:11 +03:00
Marc Herbert c47221f22b .github/ipc_fuzzer.yml: add new scripts/fuzz.sh
Should avoid future regressions like the one fixed by #7318

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
2023-03-24 16:20:23 +00:00