Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codestyle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ipc_fuzzer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
type: number
default: 300

pull_request:
# pull_request:
# TODO: can we provide a default inputs here too?

jobs:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/llext.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/repro-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rimage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/**
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/sof-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sparse-zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
79 changes: 30 additions & 49 deletions .github/workflows/testbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cgturner1 Right, so with this workflow, the workspace layout is different (than with zephyr.yml checkous), so the topologu cmake rules won't find the built alsa tools, and you get an error about "unknown target 'topologies1'"

But, but, I guess the easy fix is to remove docker-run.sh from here (L51) altogether. Now that we don't need the alsa tools from docker, we should just be able to run build-tools.sh directly in the Ubuntu environment.

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
2 changes: 1 addition & 1 deletion .github/workflows/tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zephyr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion scripts/docker-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 "$@"
thesofproject/sof:20250505_ubuntu22.04 ./scripts/sudo-cwd.sh "$@"
6 changes: 5 additions & 1 deletion scripts/sudo-cwd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ 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"

local current_user; current_user="$(id -un)"

Expand Down
Loading