From aff5ee75bf44d8837b31d1b194f2586c7eebe634 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 1 Apr 2022 22:25:09 +0000 Subject: [PATCH 1/3] BREAK topologies with some whitespace This breaks newer ALSA versions --- tools/test/topology/test-capture.m4 | 2 +- tools/topology/topology1/development/sof-cml-src-rt5682.m4 | 2 +- tools/topology/topology1/sof-tgl-sdw-max98373-rt5682.m4 | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/topology/test-capture.m4 b/tools/test/topology/test-capture.m4 index ff10dde0fe34..6e7dd6487ed7 100644 --- a/tools/test/topology/test-capture.m4 +++ b/tools/test/topology/test-capture.m4 @@ -49,7 +49,7 @@ include(`test_pipeline_filters.m4') PIPELINE_PCM_ADD(sof/pipe-TEST_PIPE_NAME-capture.m4, 2, 0, 2, s32le, 1000, 0, 0, - 8000, 192000, 48000) + 8000, 192000 , 48000) # # DAI configuration diff --git a/tools/topology/topology1/development/sof-cml-src-rt5682.m4 b/tools/topology/topology1/development/sof-cml-src-rt5682.m4 index 6358e7582bb3..7f0291237d0d 100644 --- a/tools/topology/topology1/development/sof-cml-src-rt5682.m4 +++ b/tools/topology/topology1/development/sof-cml-src-rt5682.m4 @@ -70,7 +70,7 @@ PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 5, 3, 2, s32le, 1000, 0, 0, - 48000, 48000, 48000) + 48000 ,48000 ,48000) # Low Latency playback pipeline 6 on PCM 4 using max 2 channels of s32le. # Set 1000us deadline with priority 0 on core 0 diff --git a/tools/topology/topology1/sof-tgl-sdw-max98373-rt5682.m4 b/tools/topology/topology1/sof-tgl-sdw-max98373-rt5682.m4 index 0dc461d934c9..6139ab95192f 100644 --- a/tools/topology/topology1/sof-tgl-sdw-max98373-rt5682.m4 +++ b/tools/topology/topology1/sof-tgl-sdw-max98373-rt5682.m4 @@ -135,7 +135,7 @@ include(`platform/intel/intel-generic-dmic-kwd.m4') PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4, 6, 5, 2, s32le, 1000, 0, 0, - 48000, 48000, 48000) + 48000, 48000 , 48000) # Low Latency playback pipeline 7 on PCM 6 using max 2 channels of s32le. # Schedule 48 frames per 1000us deadline with priority 0 on core 0 From 1936acb97f7fab8d674d137e0ab46fcd2ac227f9 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 1 Apr 2022 21:23:42 +0000 Subject: [PATCH 2/3] topologies: docker --env USE_XARGS, NO_PROCESSORS and VERBOSE Building in parallel is much faster but it makes logs unreadable and build failures impossible to understand. This is especially true when building with recent ALSA that produces of deprecation warnings, see examples below. For test topologies the problem is even worse: its XARGS parallel build provides no log at all. To find what actually fails, it is required to fall back on a single threaded and verbose build and this is achieved with the variables USE_XARGS, NO_PROCESSORS and VERBOSE. Pass these through docker-run.sh and CMake. Examples from #5608 https://github.com/thesofproject/sof/runs/5717553555?check_suite_focus=true https://sof-ci.01.org/sofpr/PR5608/build12556/build/tools.txt ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',... ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',... ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',... ALSA pcm.c:1471:(parse_hw_config) deprecated bclk value 'codec_slave',... ALSA pcm.c:1523:(parse_hw_config) deprecated fsync value 'codec_slave',... Signed-off-by: Marc Herbert --- scripts/docker-run.sh | 3 +++ tools/test/topology/CMakeLists.txt | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 42489b77a815..2ce4c2a8aba6 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -30,6 +30,9 @@ docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \ -v "${SOF_TOP}":/home/sof/work/sof-bind-mount-DO-NOT-DELETE \ --env CMAKE_BUILD_TYPE \ --env PRIVATE_KEY_OPTION \ + --env USE_XARGS \ + --env NO_PROCESSORS \ + --env VERBOSE \ --env http_proxy="$http_proxy" \ --env https_proxy="$https_proxy" \ --user "$(id -u)" \ diff --git a/tools/test/topology/CMakeLists.txt b/tools/test/topology/CMakeLists.txt index 8568a6bd1724..4e96368341d5 100644 --- a/tools/test/topology/CMakeLists.txt +++ b/tools/test/topology/CMakeLists.txt @@ -9,7 +9,9 @@ file(GLOB TPLG_DEPS find_program(XARGS NAMES xargs PATHS ENV PATH NO_DEFAULT_PATH) -if(${XARGS} STREQUAL XARGS-NOTFOUND) +if(${XARGS} STREQUAL XARGS-NOTFOUND OR + (DEFINED ENV{USE_XARGS} AND NOT $ENV{USE_XARGS} STREQUAL "yes") + ) set(USE_XARGS "no") else() set(USE_XARGS "yes") From 19442a45128870d27c3dd84a98ca606ebab0d545 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Fri, 1 Apr 2022 21:36:11 +0000 Subject: [PATCH 3/3] .github: build again single-threaded and verbose on failure Building in parallel is much faster but it makes logs unreadable and build failures impossible to understand. This is especially true when building with recent ALSA that produces of deprecation warnings. To show what actually fails, try to build again with a single thread. Signed-off-by: Marc Herbert --- .github/workflows/installer.yml | 8 +++++--- .github/workflows/pull-request.yml | 4 +++- .github/workflows/tools.yml | 3 +++ 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml index c6d99b6854c6..71f585b3a20c 100644 --- a/.github/workflows/installer.yml +++ b/.github/workflows/installer.yml @@ -27,10 +27,12 @@ jobs: run: docker pull thesofproject/sof && docker tag thesofproject/sof sof # -j3 tests the ability to build multiple platforms - # concurrently. It makes the build log unreadable but that's OK - # because we have other, slower actions with readable logs. + # concurrently. It makes the build log unreadable, so retry with + # a single thread in case of failure - name: build all and stage - run: ./scripts/docker-run.sh make -j3 -C installer/ tarball + run: ./scripts/docker-run.sh make -j3 -C installer/ tarball || + VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no + ./scripts/docker-run.sh make -j1 -C installer/ tarball - name: check staging tree run: make -C installer/ checktree diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 887758f697a0..c15664e08ccf 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -72,7 +72,9 @@ jobs: # bug in ALSA 1.2.2 # https://github.com/thesofproject/sof/issues/2543 - name: build topologies - run: ./scripts/docker-run.sh ./scripts/build-tools.sh -t + run: ./scripts/docker-run.sh ./scripts/build-tools.sh -t || + VERBOSE=1 USE_XARGS=no + ./scripts/docker-run.sh ./scripts/build-tools.sh -t - name: build testbench run: ./scripts/rebuild-testbench.sh diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 232c9b795d87..5be87125a8ba 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -23,4 +23,7 @@ jobs: # For some reason gcc has more warnings in Release mode - name: build-tools run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh + ./scripts/build-tools.sh || + VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no + CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh ./scripts/build-tools.sh