From 17896c4b342f568194e976b8b7bb62bd30479f8f Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 11:50:36 -0500 Subject: [PATCH 1/6] [dnm] disable other workflows Signed-off-by: Christopher Turner --- .github/workflows/build_all.yml | 2 +- .github/workflows/codestyle.yml | 2 +- .github/workflows/ipc_fuzzer.yml | 2 +- .github/workflows/llext.yml | 2 +- .github/workflows/pull-request.yml | 10 +++++----- .github/workflows/repro-build.yml | 2 +- .github/workflows/rimage.yml | 6 +++--- .github/workflows/sof-docs.yml | 10 +++++----- .github/workflows/sparse-zephyr.yml | 2 +- .github/workflows/tools.yml | 2 +- .github/workflows/unit-tests.yml | 2 +- .github/workflows/zephyr.yml | 2 +- 12 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build_all.yml b/.github/workflows/build_all.yml index bfebeaa26954..14f9c0b89bdd 100644 --- a/.github/workflows/build_all.yml +++ b/.github/workflows/build_all.yml @@ -6,7 +6,7 @@ name: Build test all components # 'Actions' tab # yamllint disable-line rule:truthy -on: [pull_request, workflow_dispatch, workflow_call] +# on: [pull_request, workflow_dispatch, workflow_call] jobs: diff --git a/.github/workflows/codestyle.yml b/.github/workflows/codestyle.yml index 63a076fc086a..ea19d6690bc4 100644 --- a/.github/workflows/codestyle.yml +++ b/.github/workflows/codestyle.yml @@ -12,7 +12,7 @@ name: codestyle # yamllint disable-line rule:truthy -on: [pull_request, workflow_call, workflow_dispatch] +# on: [pull_request, workflow_call, workflow_dispatch] jobs: checkpatch: diff --git a/.github/workflows/ipc_fuzzer.yml b/.github/workflows/ipc_fuzzer.yml index 6773af045689..fdd01fac4c55 100644 --- a/.github/workflows/ipc_fuzzer.yml +++ b/.github/workflows/ipc_fuzzer.yml @@ -19,7 +19,7 @@ on: type: number default: 300 - pull_request: + # pull_request: # TODO: can we provide a default inputs here too? jobs: diff --git a/.github/workflows/llext.yml b/.github/workflows/llext.yml index 21b812b47600..f72cf95c28b4 100644 --- a/.github/workflows/llext.yml +++ b/.github/workflows/llext.yml @@ -5,7 +5,7 @@ name: Zephyr LLEXT # 'workflow_dispatch' allows running this workflow manually from the # 'Actions' tab # yamllint disable-line rule:truthy -on: [pull_request, workflow_dispatch] +# on: [pull_request, workflow_dispatch] jobs: build: diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 32a5f61ba301..13cde3f7e90b 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -20,11 +20,11 @@ on: - 'main' - 'stable-**' - '**-stable' - pull_request: - branches: - - 'main' - - 'stable-**' - - '**-stable' + # pull_request: + # branches: + # - 'main' + # - 'stable-**' + # - '**-stable' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/repro-build.yml b/.github/workflows/repro-build.yml index 034ae4ac286a..cda211e7982d 100644 --- a/.github/workflows/repro-build.yml +++ b/.github/workflows/repro-build.yml @@ -12,7 +12,7 @@ name: Reproducible builds # yamllint disable-line rule:truthy -on: [pull_request, workflow_dispatch, workflow_call] +# on: [pull_request, workflow_dispatch, workflow_call] jobs: main: diff --git a/.github/workflows/rimage.yml b/.github/workflows/rimage.yml index b6e66c23c449..71db82270985 100644 --- a/.github/workflows/rimage.yml +++ b/.github/workflows/rimage.yml @@ -15,9 +15,9 @@ name: rimage on: workflow_call: workflow_dispatch: - pull_request: - paths: - - tools/rimage/** +# pull_request: + # paths: + # - tools/rimage/** push: paths: - tools/rimage/** diff --git a/.github/workflows/sof-docs.yml b/.github/workflows/sof-docs.yml index da8fd71b4ab7..20a2046a3d6c 100644 --- a/.github/workflows/sof-docs.yml +++ b/.github/workflows/sof-docs.yml @@ -6,11 +6,11 @@ on: - 'main' - 'stable-**' - '**-stable' - pull_request: - branches: - - 'main' - - 'stable-**' - - '**-stable' +# pull_request: + # branches: + # - 'main' + # - 'stable-**' + # - '**-stable' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: diff --git a/.github/workflows/sparse-zephyr.yml b/.github/workflows/sparse-zephyr.yml index a22e6e8954d5..89417a3340ca 100644 --- a/.github/workflows/sparse-zephyr.yml +++ b/.github/workflows/sparse-zephyr.yml @@ -5,7 +5,7 @@ name: Sparse Zephyr # 'workflow_dispatch' allows running this workflow manually from the # 'Actions' tab # yamllint disable-line rule:truthy -on: [push, pull_request, workflow_dispatch, workflow_call] +# on: [push, pull_request, workflow_dispatch, workflow_call] jobs: # As of sparse commit ce1a6720f69e / Sept 2022, the exit status of diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index 9c8197a6cbcc..1d34e3e9e842 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -5,7 +5,7 @@ name: User space tools/ directory # 'Actions' tab # yamllint disable-line rule:truthy -on: [pull_request, workflow_dispatch, workflow_call] +# on: [pull_request, workflow_dispatch, workflow_call] jobs: # This is not the same as building every ./build-tools.sh option. diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml index 391807f6a336..8bb8077c39f3 100644 --- a/.github/workflows/unit-tests.yml +++ b/.github/workflows/unit-tests.yml @@ -8,7 +8,7 @@ name: Unit tests # 'Actions' tab # yamllint disable-line rule:truthy -on: [pull_request, workflow_dispatch, workflow_call] +# on: [pull_request, workflow_dispatch, workflow_call] jobs: cmocka_utests: diff --git a/.github/workflows/zephyr.yml b/.github/workflows/zephyr.yml index d02d67861560..82b7069c929a 100644 --- a/.github/workflows/zephyr.yml +++ b/.github/workflows/zephyr.yml @@ -5,7 +5,7 @@ name: Zephyr # 'workflow_dispatch' allows running this workflow manually from the # 'Actions' tab # yamllint disable-line rule:truthy -on: [push, pull_request, workflow_dispatch, workflow_call] +# on: [push, pull_request, workflow_dispatch, workflow_call] # Specifies group name that stops previous wokrflows if the name matches concurrency: From c3f6b160ec8f585ad8af8e8af61dcce83a9e28bc Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 11:51:07 -0500 Subject: [PATCH 2/6] test-docker-on-testbench Signed-off-by: Christopher Turner --- .github/workflows/testbench.yml | 79 +++++++++++++-------------------- 1 file changed, 30 insertions(+), 49 deletions(-) diff --git a/.github/workflows/testbench.yml b/.github/workflows/testbench.yml index 7a7b32a99ac0..439a416d23d5 100644 --- a/.github/workflows/testbench.yml +++ b/.github/workflows/testbench.yml @@ -29,63 +29,44 @@ on: 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 || + continue-on-error: true + run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh + ./scripts/build-tools.sh -A -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 -A -Y + + # Verify alsatplg version + # - name: verify alsa tools installation + # run: | + # echo "Checking ALSA tools installation in ./tools/bin" + # ls -l /tmp/tools/bin + # echo "Verifying alsatplg version" + # /tmp/tools/bin/alsatplg --version + # echo "check topolgy dir" + # ls -l /tmp/tools/topology/topology2 - # build testbench - - name: build testbench - run: | - ./sof/scripts/rebuild-testbench.sh || - ./sof/scripts/rebuild-testbench.sh -j 1 + # - name: build testbench + # run: ./scripts/rebuild-testbench.sh || + # ./scripts/rebuild-testbench.sh -j 1 - # run testbench - - name: run testbench - run: | - ./sof/scripts/host-testbench.sh + # - name: run testbench + # run: ./scripts/host-testbench.sh \ No newline at end of file From 5229c722c7789ba308987b39474a95dc796fd6c7 Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 12:04:40 -0500 Subject: [PATCH 3/6] Adds SOF_WORKSPACE environment variable to docker-run script Introduces the SOF_WORKSPACE environment variable to specify the workspace path, ensuring consistent environment configuration for the Docker container. Signed-off-by: Christopher Turner --- scripts/docker-run.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index 96791d03a6e5..dfee193ad593 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:latest ./scripts/sudo-cwd.sh "$@" From 055270fe07ba7d3099e10c7d9baaf6f77e6dd8f0 Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 16:20:00 -0500 Subject: [PATCH 4/6] Updates Docker image to specific version tag Replaces the generic 'latest' tag with a specific versioned Docker tag '20250505_ubuntu22.04' to ensure build consistency and reproducibility. Signed-off-by: Christopher Turner --- scripts/docker-run.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/docker-run.sh b/scripts/docker-run.sh index dfee193ad593..cfae31bdef49 100755 --- a/scripts/docker-run.sh +++ b/scripts/docker-run.sh @@ -44,4 +44,4 @@ docker run -i -v "${SOF_TOP}":/home/sof/work/sof.git \ --env https_proxy="$https_proxy" \ --env SOF_WORKSPACE="/home/sof/work" \ $SOF_DOCKER_RUN \ - thesofproject/sof:latest ./scripts/sudo-cwd.sh "$@" + thesofproject/sof:20250505_ubuntu22.04 ./scripts/sudo-cwd.sh "$@" From 23d7f6a451bb3c9c85c0866636d4513956b5a00c Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 16:35:05 -0500 Subject: [PATCH 5/6] Adds user to 'sof' group for write access Ensures the created user has group write permissions by adding them to the 'sof' group. This facilitates proper access control during builds requiring shared group access. Signed-off-by: Christopher Turner --- scripts/sudo-cwd.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/sudo-cwd.sh b/scripts/sudo-cwd.sh index 2823cf2f6c73..0922f1395fcf 100755 --- a/scripts/sudo-cwd.sh +++ b/scripts/sudo-cwd.sh @@ -51,6 +51,9 @@ exec_as_cwd_uid() sudo useradd -m -u "$cwd_uid" -g "$cwd_guid" "$cwd_user" + # Add cwd_user to the sof group for group write access + sudo usermod -aG sof "$cwd_user" + local current_user; current_user="$(id -un)" # Copy sudo permissions just in case the build needs it From c15b9b3a8e67d4b504a26ce98544306a89f3b870 Mon Sep 17 00:00:00 2001 From: Christopher Turner Date: Thu, 8 May 2025 16:40:42 -0500 Subject: [PATCH 6/6] Sets custom home directory for new users Updates user creation to specify a fixed home directory at /home/sof. Ensures consistency in user home directories for better organization. Signed-off-by: Christopher Turner --- scripts/sudo-cwd.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/sudo-cwd.sh b/scripts/sudo-cwd.sh index 0922f1395fcf..ba6e68791553 100755 --- a/scripts/sudo-cwd.sh +++ b/scripts/sudo-cwd.sh @@ -49,7 +49,8 @@ exec_as_cwd_uid() getent group "$cwd_guid" || sudo groupadd -g "$cwd_guid" 'cwd_group' - sudo useradd -m -u "$cwd_uid" -g "$cwd_guid" "$cwd_user" + # Always set home directory to /home/sof for the new user + sudo useradd -m -u "$cwd_uid" -g "$cwd_guid" -d /home/sof "$cwd_user" # Add cwd_user to the sof group for group write access sudo usermod -aG sof "$cwd_user"