From d14bcf710f1218674f3e2fa38f25c211a0698bca Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Sat, 1 Mar 2025 19:12:17 +0000 Subject: [PATCH 01/10] scripts: add a script to build a local alsa tools This script builds a local installation of ALSA lib and associated ALSA utilities that does not impact the system ALSA installation. This will enable a later update to locally build topologies without using the docker container. Signed-off-by: Liam Girdwood --- scripts/build-alsa-tools.sh | 125 ++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100755 scripts/build-alsa-tools.sh diff --git a/scripts/build-alsa-tools.sh b/scripts/build-alsa-tools.sh new file mode 100755 index 000000000000..c2362c14d74b --- /dev/null +++ b/scripts/build-alsa-tools.sh @@ -0,0 +1,125 @@ +#!/bin/bash +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(c) 2025 Intel Corporation. All rights reserved. + +# fail immediately on any errors +set -e + +# Array of ALSA Git repository URLs. Add or remove repositories as needed. +declare -a REPOS=( + "https://github.com/thesofproject/alsa-lib.git" + "https://github.com/thesofproject/alsa-utils.git" + # Add more repositories here... +) + +# Commit ID to check for (optional). If specified, the script will update +# the repository if this commit ID is not found. Leave empty to skip. +declare -a COMMIT_ID=( + "df8f1cc1ec9d9ee15be5e2c23ad25b9389fd8766" + "09550cd393b1a7d307ee6f26637b1ed7bd275e38" +) + +# Directory where repositories will be cloned/updated. +if [[ -z "$SOF_WORKSPACE" ]]; then + # Environment variable is empty or unset so use default + BASE_DIR="$HOME/work/sof" +else + # Environment variable exists and has a value + BASE_DIR="$SOF_WORKSPACE" +fi + +# Arguments to pass to ./configure for each repository. Add or remove +declare -a CONFIGURE_ARGS=( + "--prefix=${BASE_DIR}/tools" + "--prefix=${BASE_DIR}/tools \ + --with-alsa-prefix=${BASE_DIR}/tools \ + --with-alsa-inc-prefix=${BASE_DIR}/tools/include \ + --with-sysroot=${BASE_DIR}/tools \ + --with-udev-rules-dir=${BASE_DIR}/tools \ + PKG_CONFIG_PATH=${BASE_DIR}/tools \ + LDFLAGS=-L${BASE_DIR}/tools/lib \ + --with-asound-state-dir=${BASE_DIR}/tools/var/lib/alsa \ + --with-systemdsystemunitdir=${BASE_DIR}/tools/lib/systemd/system" +) + +# Arguments to pass to make for each repository. Add or remove arguments as needed. +declare -a TARGET_ARGS=( + "--disable-old-symbols" + "--enable-alsatopology" +) + +# Function to check if a commit ID exists in a repository +check_commit() { + local repo_dir="$1" + local commit_id="$2" + + if [ -z "$commit_id" ]; then + return 0 # Skip check if no commit ID is provided + fi + + if ! git -C "$repo_dir" rev-parse --quiet --verify "$commit_id" >/dev/null 2>&1; then + return 1 # Commit ID not found + else + return 0 # Commit ID found + fi +} + + +# Function to update the repository +update_repo() { + local repo_dir="$1" + echo "Updating repository: $repo_dir" + git -C "$repo_dir" fetch --all + git -C "$repo_dir" pull +} + +# Function to build and install the repository +build_and_install() { + local repo_dir="$1" + local configure_args="$2" + local target_args="$3" + + echo "Building and installing: $repo_dir $configure_args $target_args" + + if [ ! -f "$repo_dir/gitcompile" ]; then + echo "Error: gitcompile not found in $repo_dir" >&2 + exit 1 + fi + + # if Makefile exists then we can just run make + if [ ! -f "$repo_dir/Makefile" ]; then + (cd "$repo_dir" && ./gitcompile $configure_args $target_args) || \ + { echo "configure failed in $repo_dir"; exit 1; } + else + (cd "$repo_dir" && make -j) || { echo "make failed in $repo_dir"; exit 1; } + fi + + (cd "$repo_dir" && make install) || { echo "make install failed in $repo_dir"; exit 1; } + + echo "Build and installation complete for $repo_dir" +} + +# Main script logic +mkdir -p "$BASE_DIR" + +for ((i = 0; i < ${#REPOS[@]}; i++)); do + echo "Counter: $i, Value: ${REPOS[i]}" + repo_url=${REPOS[i]} + + repo_name=$(basename "$repo_url" .git) # Extract repo name + repo_dir="$BASE_DIR/$repo_name" + + if [ ! -d "$repo_dir" ]; then + echo "Cloning repository: $repo_url" + git clone "$repo_url" "$repo_dir" || { echo "git clone failed for $repo_url"; exit 1; } + elif ! check_commit "$repo_dir" "${COMMIT_ID[i]}"; then + update_repo "$repo_dir" + else + echo "Repository $repo_name is up to date." + fi + + build_and_install "$repo_dir" "${CONFIGURE_ARGS[i]}" + +done + +echo "All repositories processed." From ef69849e33b80b645d5dd053104ba866602af850 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 5 Mar 2025 12:50:23 +0000 Subject: [PATCH 02/10] scripts: build-tools: Add option to build alsa tools Add a command line option to rebuild the ALSA libraries and tools required to build all topologies. Signed-off-by: Liam Girdwood --- scripts/build-tools.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/build-tools.sh b/scripts/build-tools.sh index de41f652debf..6304265820cd 100755 --- a/scripts/build-tools.sh +++ b/scripts/build-tools.sh @@ -16,7 +16,7 @@ Attention: the list of selected shortcuts below is _not_ exhaustive. To build _everything_ don't select any particular target; this will build CMake's default target "ALL". -usage: $0 [-c|-f|-h|-l|-p|-t|-T|-X|-Y] +usage: $0 [-c|-f|-h|-l|-p|-t|-T|-X|-Y|-A] -h Display help -c Rebuild ctl/ @@ -26,6 +26,7 @@ usage: $0 [-c|-f|-h|-l|-p|-t|-T|-X|-Y] -X Rebuild topology1 only -Y Rebuild topology2 only -t Rebuild test/topology/ (or tools/test/topology/tplg-build.sh directly) + -A Clone and rebuild local ALSA lib and utils. -C No build, only CMake re-configuration. Shows CMake targets. EOFUSAGE @@ -106,6 +107,7 @@ main() fi DO_BUILD_ctl=false + DO_BUILD_alsa=false DO_BUILD_logger=false DO_BUILD_probes=false DO_BUILD_tests=false @@ -118,7 +120,7 @@ main() # eval is a sometimes necessary evil # shellcheck disable=SC2034 - while getopts "cfhlptTCXY" OPTION; do + while getopts "cfhlptTCXYA" OPTION; do case "$OPTION" in c) DO_BUILD_ctl=true ;; l) DO_BUILD_logger=true ;; @@ -128,12 +130,17 @@ main() X) DO_BUILD_topologies1=true ;; Y) DO_BUILD_topologies2=true ;; C) CMAKE_ONLY=true ;; + A) DO_BUILD_alsa=true ;; h) print_usage; exit 1;; *) print_usage; exit 1;; esac done shift "$((OPTIND - 1))" + if "$DO_BUILD_alsa"; then + $SOF_TOP/scripts/build-alsa-tools.sh + fi + if "$CMAKE_ONLY"; then reconfigure_build print_build_info From 0555eb6137d8818b55c3935d945ef0c6554f7be2 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 5 Mar 2025 12:52:44 +0000 Subject: [PATCH 03/10] github: workflow: update testbench workflow to use local ALSA tools Update testbench to build without docker and use a local ALSA lib and ALSA utils version from SOF ALSA git to align with latest topology developments. Signed-off-by: Liam Girdwood --- .github/workflows/testbench.yml | 77 ++++++++++++++++++++------------- 1 file changed, 48 insertions(+), 29 deletions(-) diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index 9c1dfdfb22ec..b766a533fdec 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -13,49 +13,68 @@ name: testbench # yamllint disable-line rule:truthy on: - push: - branches: - - 'main' - - 'stable-**' - - '**-stable' pull_request: branches: - - 'main' - - 'stable-**' - - '**-stable' - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - workflow_call: + - main jobs: - - build-run: - runs-on: ubuntu-22.04 + build-and-test: + runs-on: ubuntu-24.10 steps: - - uses: actions/checkout@v4 - with: {fetch-depth: 0, filter: 'tree:0'} - - - name: docker - run: docker pull thesofproject/sof && docker tag thesofproject/sof sof + - name: Checkout SOF repository (PR source) + uses: actions/checkout@v4 + with: + path: sof - name: apt get run: sudo apt-get update && - sudo apt-get -y install valgrind alsa-utils libasound2-dev ninja-build - octave octave-signal + sudo apt-get -y install valgrind ninja-build + octave octave-signal automake autoconf libtool + gettext linux-headers-6.11.0-8 + + - name: Build Alsa-lib + run: | + cd ${GITHUB_WORKSPACE} + git clone https://github.com/thesofproject/alsa-lib.git + cd alsa-lib + git checkout df8f1cc1ec9d9ee15be5e2c23ad25b9389fd8766 -b build + ./gitcompile --prefix=${GITHUB_WORKSPACE}/tools + make install + + - name: Build Alsa-utils + run: | + cd ${GITHUB_WORKSPACE} + git clone https://github.com/thesofproject/alsa-utils.git + cd alsa-utils + git checkout 0ffa105942a06cdfa98e5918b8dc82e3cac12792 -b build + ./gitcompile --prefix=${GITHUB_WORKSPACE}/tools \ + --with-alsa-prefix=${GITHUB_WORKSPACE}/tools \ + --with-alsa-inc-prefix=${GITHUB_WORKSPACE}/tools/include \ + --with-sysroot=${GITHUB_WORKSPACE}/tools \ + --with-udev-rules-dir=${GITHUB_WORKSPACE}/tools \ + PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/tools \ + LDFLAGS=-L${GITHUB_WORKSPACE}/tools/lib \ + --disable-old-symbols \ + --enable-alsatopology \ + --with-asound-state-dir=${GITHUB_WORKSPACE}/tools/var/lib/alsa \ + --with-systemdsystemunitdir=${GITHUB_WORKSPACE}/tools/lib/systemd/system + make install # testbench needs some topologies. - name: build test topologies - run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh - ./scripts/build-tools.sh -Y || + run: | + CMAKE_BUILD_TYPE=Release ./sof/scripts/build-tools.sh -Y || VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no - CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh - ./scripts/build-tools.sh -Y + CMAKE_BUILD_TYPE=Release ./sof/scripts/build-tools.sh -Y + # build testbench - name: build testbench - run: ./scripts/rebuild-testbench.sh || - ./scripts/rebuild-testbench.sh -j 1 + run: | + ./sof/scripts/rebuild-testbench.sh || + ./sof/scripts/rebuild-testbench.sh -j 1 + # run testbench - name: run testbench - run: ./scripts/host-testbench.sh + run: | + ./sof/scripts/host-testbench.sh From 359f67a6c4e33489912f43dd1be7950726414bd3 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Sun, 2 Mar 2025 10:43:38 +0000 Subject: [PATCH 04/10] topology: cmake: use local ALSA utilities to build topology Dont use the system ALSA installation which may be out of date with current topology development. Use the locally installed ALSA lib and utils installed in the SOF workspace. Signed-off-by: Liam Girdwood --- tools/topology/CMakeLists.txt | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tools/topology/CMakeLists.txt b/tools/topology/CMakeLists.txt index 33722120e41b..92a7acf6e5a6 100644 --- a/tools/topology/CMakeLists.txt +++ b/tools/topology/CMakeLists.txt @@ -1,18 +1,19 @@ set(SOF_TOPOLOGY_BINARY_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") - +set(SOF_ALSA_TOOLS_DIR "${SOF_ROOT_SOURCE_DIRECTORY}/../tools/bin") +set(ALSATPLG_CMD "${SOF_ALSA_TOOLS_DIR}/alsatplg") function(alsatplg_version OUT_STATUS OUT_VERSION) - execute_process(COMMAND alsatplg --version + execute_process(COMMAND ${ALSATPLG_CMD} --version RESULT_VARIABLE status OUTPUT_VARIABLE stdout OUTPUT_STRIP_TRAILING_WHITESPACE) - message(DEBUG "alsatplg --version: status=${status}, output=${stdout}") + message(DEBUG "${ALSATPLG_CMD} --version: status=${status}, output=${stdout}") set(${OUT_STATUS} "${status}" PARENT_SCOPE) # Some error messages have already been printed on stderr if(NOT status EQUAL 0) - message(WARNING "alsatplg --version returned status: ${status}, + message(WARNING "${ALSATPLG_CMD} --version returned status: ${status}, ${stdout}") return() endif() @@ -32,7 +33,7 @@ endfunction() # Longer story in #5192. alsatplg_version(STATUS ALSATPLG_VERSION_NUMBER) if(NOT STATUS EQUAL 0) - message(WARNING "alsatplg failed: ${STATUS}; all topologies skipped") + message(WARNING "${ALSATPLG_CMD} failed: ${STATUS}; all topologies skipped") return() else() if(${ALSATPLG_VERSION_NUMBER} VERSION_LESS "1.2.5") @@ -67,7 +68,7 @@ macro(add_alsatplg_command) # permissions are hardcoded and only the user can read # the -o(utput) file. # See bug https://github.com/alsa-project/alsa-utils/issues/126 - COMMAND alsatplg \$\${VERBOSE:+-v 1} -c ${ARGV0} -o ${ARGV1} + COMMAND ${ALSATPLG_CMD} \$\${VERBOSE:+-v 1} -c ${ARGV0} -o ${ARGV1} USES_TERMINAL ) endmacro() @@ -94,7 +95,7 @@ macro(add_alsatplg2_command conf_header conf_target input_name output_name inclu COMMAND cat ${conf_header} ${input_name}.conf > ${output_name}.conf # -p to pre-process Topology2.0 conf file - COMMAND ALSA_CONFIG_DIR=${CMAKE_SOURCE_DIR}/topology/topology2 alsatplg \$\${VERBOSE:+-v 1} + COMMAND ALSA_CONFIG_DIR=${CMAKE_SOURCE_DIR}/topology/topology2 ${ALSATPLG_CMD} \$\${VERBOSE:+-v 1} -I ${include_path} -D "'${defines}'" -p -c ${output_name}.conf -o ${output_name}.tplg USES_TERMINAL ) From 8b165a34ebb11fc81ea145c8c340eb3a761e4893 Mon Sep 17 00:00:00 2001 From: Liam Girdwood Date: Wed, 5 Mar 2025 12:55:12 +0000 Subject: [PATCH 05/10] github: workflows: remove the legacy installer workflow The installer workflow uses the legacy SDK build tools and is no longer valid for Zephyr based SDK migration. This also reduces effort in maintaining a SOF Docker container. Signed-off-by: Liam Girdwood --- .github/workflows/installer.yml | 63 --------------------------------- 1 file changed, 63 deletions(-) delete mode 100644 .github/workflows/installer.yml diff --git a/.github/workflows/installer.yml b/.github/workflows/installer.yml deleted file mode 100644 index 012b1bddd42e..000000000000 --- a/.github/workflows/installer.yml +++ /dev/null @@ -1,63 +0,0 @@ ---- -# Tools that can save round-trips to github and a lot of time: -# -# yamllint -f parsable this.yml -# pip3 install ruamel.yaml.cmd -# yaml merge-expand this.yml exp.yml && diff -w -u this.yml exp.yml -# -# github.com also has a powerful web editor that can be used without -# committing. - -name: installer - -# 'workflow_dispatch' allows running this workflow manually from the -# 'Actions' tab -# yamllint disable-line rule:truthy -on: [push, pull_request, workflow_dispatch, workflow_call] - -jobs: - checktree: - runs-on: ubuntu-22.04 - - strategy: - fail-fast: false - matrix: # just a vector in this case - make_env: [ - IPC_VERSION= UNSIGNED_list='imx8m' SIGNED_list=, # default version - ] - - steps: - - uses: actions/checkout@v4 - with: {fetch-depth: 0, submodules: recursive, filter: 'tree:0'} - - - name: docker - 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, so retry with - # a single thread in case of failure - - name: build all and stage - env: - gh_make_env: ${{ matrix.make_env }} - # Use 'eval' to have two different levels of whitespace: - # 1. between vars, and 2. inside _lists. Quoting is hard, even - # harder through 'docker-run.sh'. - run: eval env_array=($gh_make_env) && - ./scripts/docker-run.sh - make -j3 -C installer/ tarball "${env_array[@]}" || - VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no - ./scripts/docker-run.sh - make -j1 -C installer/ tarball "${env_array[@]}" - - - name: check staging tree - env: - gh_make_env: ${{ matrix.make_env }} - run: eval env_array=($gh_make_env) && - make -C installer/ checktree "${env_array[@]}" - - - name: test make cleanall - run: | - make -C installer cleanall - # Make sure there's nothing left - rm -rf scripts/kconfig/__pycache__/ - ! git status --porcelain --ignored | grep . From ed0ae3fdd6b8c25066355f7f2e4ac405818a279d Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 24 Apr 2025 10:13:52 +0300 Subject: [PATCH 06/10] fixup! scripts: add a script to build a local alsa tools For the default case, the BASE_DIR should point to parent directory of sof as this is the directory assumed in tools/topology/ cmake rules. --- scripts/build-alsa-tools.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-alsa-tools.sh b/scripts/build-alsa-tools.sh index c2362c14d74b..e8897b36d9b1 100755 --- a/scripts/build-alsa-tools.sh +++ b/scripts/build-alsa-tools.sh @@ -22,7 +22,7 @@ declare -a COMMIT_ID=( # Directory where repositories will be cloned/updated. if [[ -z "$SOF_WORKSPACE" ]]; then # Environment variable is empty or unset so use default - BASE_DIR="$HOME/work/sof" + BASE_DIR="$HOME/work" else # Environment variable exists and has a value BASE_DIR="$SOF_WORKSPACE" From 048f1a260cc91acbd398a5726baa42a63a63b520 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 24 Apr 2025 10:17:37 +0300 Subject: [PATCH 07/10] RD: tools/topology: add a message telling alsatplg path used --- tools/topology/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/topology/CMakeLists.txt b/tools/topology/CMakeLists.txt index 92a7acf6e5a6..cfbe4a86dbdd 100644 --- a/tools/topology/CMakeLists.txt +++ b/tools/topology/CMakeLists.txt @@ -2,6 +2,8 @@ set(SOF_TOPOLOGY_BINARY_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}") set(SOF_ALSA_TOOLS_DIR "${SOF_ROOT_SOURCE_DIRECTORY}/../tools/bin") set(ALSATPLG_CMD "${SOF_ALSA_TOOLS_DIR}/alsatplg") +message(WARNING "DEBUG: alsatplg path=${ALSATPLG_CMD}") + function(alsatplg_version OUT_STATUS OUT_VERSION) execute_process(COMMAND ${ALSATPLG_CMD} --version RESULT_VARIABLE status From 9db145dcd5d11ec9b1b0ebb09da4ef641849e190 Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 24 Apr 2025 10:22:18 +0300 Subject: [PATCH 08/10] Revert "github: workflow: update testbench workflow to use local ALSA tools" This reverts commit 0555eb6137d8818b55c3935d945ef0c6554f7be2. --- .github/workflows/testbench.yml | 77 +++++++++++++-------------------- 1 file changed, 29 insertions(+), 48 deletions(-) diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index b766a533fdec..9c1dfdfb22ec 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -13,68 +13,49 @@ name: testbench # yamllint disable-line rule:truthy on: + push: + branches: + - 'main' + - 'stable-**' + - '**-stable' pull_request: branches: - - main + - 'main' + - 'stable-**' + - '**-stable' + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + workflow_call: jobs: - build-and-test: - runs-on: ubuntu-24.10 + + build-run: + runs-on: ubuntu-22.04 steps: - - name: Checkout SOF repository (PR source) - uses: actions/checkout@v4 - with: - path: sof + - uses: actions/checkout@v4 + with: {fetch-depth: 0, filter: 'tree:0'} + + - name: docker + run: docker pull thesofproject/sof && docker tag thesofproject/sof sof - name: apt get run: sudo apt-get update && - sudo apt-get -y install valgrind ninja-build - octave octave-signal automake autoconf libtool - gettext linux-headers-6.11.0-8 - - - name: Build Alsa-lib - run: | - cd ${GITHUB_WORKSPACE} - git clone https://github.com/thesofproject/alsa-lib.git - cd alsa-lib - git checkout df8f1cc1ec9d9ee15be5e2c23ad25b9389fd8766 -b build - ./gitcompile --prefix=${GITHUB_WORKSPACE}/tools - make install - - - name: Build Alsa-utils - run: | - cd ${GITHUB_WORKSPACE} - git clone https://github.com/thesofproject/alsa-utils.git - cd alsa-utils - git checkout 0ffa105942a06cdfa98e5918b8dc82e3cac12792 -b build - ./gitcompile --prefix=${GITHUB_WORKSPACE}/tools \ - --with-alsa-prefix=${GITHUB_WORKSPACE}/tools \ - --with-alsa-inc-prefix=${GITHUB_WORKSPACE}/tools/include \ - --with-sysroot=${GITHUB_WORKSPACE}/tools \ - --with-udev-rules-dir=${GITHUB_WORKSPACE}/tools \ - PKG_CONFIG_PATH=${GITHUB_WORKSPACE}/tools \ - LDFLAGS=-L${GITHUB_WORKSPACE}/tools/lib \ - --disable-old-symbols \ - --enable-alsatopology \ - --with-asound-state-dir=${GITHUB_WORKSPACE}/tools/var/lib/alsa \ - --with-systemdsystemunitdir=${GITHUB_WORKSPACE}/tools/lib/systemd/system - make install + sudo apt-get -y install valgrind alsa-utils libasound2-dev ninja-build + octave octave-signal # testbench needs some topologies. - name: build test topologies - run: | - CMAKE_BUILD_TYPE=Release ./sof/scripts/build-tools.sh -Y || + run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh + ./scripts/build-tools.sh -Y || VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no - CMAKE_BUILD_TYPE=Release ./sof/scripts/build-tools.sh -Y + CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh + ./scripts/build-tools.sh -Y - # build testbench - name: build testbench - run: | - ./sof/scripts/rebuild-testbench.sh || - ./sof/scripts/rebuild-testbench.sh -j 1 + run: ./scripts/rebuild-testbench.sh || + ./scripts/rebuild-testbench.sh -j 1 - # run testbench - name: run testbench - run: | - ./sof/scripts/host-testbench.sh + run: ./scripts/host-testbench.sh From de5de1b58f1ad0e69306b10cbc20a83891274176 Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Fri, 11 Apr 2025 12:48:34 -0500 Subject: [PATCH 09/10] [DNM] Verify no alsa docker install in testbench workflow Used to validate docker behavior in PR #9870 docker-run.sh: update Docker image tag to '20250410_no-alsa' Signed-off-by: Christopher Turner --- .github/workflows/testbench.yml | 6 +++--- scripts/docker-run.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index 9c1dfdfb22ec..044394c3b4be 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -38,7 +38,7 @@ jobs: with: {fetch-depth: 0, filter: 'tree:0'} - name: docker - run: docker pull thesofproject/sof && docker tag thesofproject/sof sof + run: docker pull thesofproject/sof:20250410_no-alsa && docker tag thesofproject/sof:20250410_no-alsa sof - name: apt get run: sudo apt-get update && @@ -48,10 +48,10 @@ jobs: # testbench needs some topologies. - name: build test topologies run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh - ./scripts/build-tools.sh -Y || + ./scripts/build-tools.sh -Y -A || VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh - ./scripts/build-tools.sh -Y + ./scripts/build-tools.sh -Y -A - name: build testbench run: ./scripts/rebuild-testbench.sh || diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 96791d03a6e5..946f8c1780e1 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -43,4 +43,4 @@ docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \ --env http_proxy="$http_proxy" \ --env https_proxy="$https_proxy" \ $SOF_DOCKER_RUN \ - thesofproject/sof:latest ./scripts/sudo-cwd.sh "$@" + thesofproject/sof:20250410_no-alsa ./scripts/sudo-cwd.sh "$@" From 986c42961054eb9b374c5f8708005ffa18adce2f Mon Sep 17 00:00:00 2001 From: Kai Vehmanen Date: Thu, 24 Apr 2025 10:43:17 +0300 Subject: [PATCH 10/10] RD: scripts: set SOF_WORKSPACE for docker-run.sh --- scripts/docker-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 946f8c1780e1..d58d0ac0de72 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -42,5 +42,6 @@ docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \ --env VERBOSE \ --env http_proxy="$http_proxy" \ --env https_proxy="$https_proxy" \ + --env SOF_WORKSPACE=/home/sof/work/ \ $SOF_DOCKER_RUN \ thesofproject/sof:20250410_no-alsa ./scripts/sudo-cwd.sh "$@"