Skip to content

Commit

Permalink
github: workflow: update testbench workflow to use local ALSA tools
Browse files Browse the repository at this point in the history
Update testbench to build withou 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 <liam.r.girdwood@linux.intel.com>
  • Loading branch information
lrgirdwo committed Mar 6, 2025
1 parent fe7f7df commit 3641be5
Showing 1 changed file with 62 additions and 25 deletions.
87 changes: 62 additions & 25 deletions .github/workflows/testbench.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,51 +11,88 @@

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
- main
workflow_dispatch:
workflow_call:
inputs:
repo1_url:
description: 'ALSA Lib repository'
required: true
default: 'https://github.com/thesofproject/alsa-lib.git'
repo1_commit:
description: 'Commit ID for the ALSA Lib repository'
required: true
default: 'df8f1cc1ec9d9ee15be5e2c23ad25b9389fd8766'
repo2_url:
description: 'URL of the second repository'
required: true
default: 'https://github.com/thesofproject/alsa-utils.git'
repo2_commit:
description: 'Commit ID for the ALSA utils repository'
required: true
default: '0ffa105942a06cdfa98e5918b8dc82e3cac12792'

jobs:

build-run:
runs-on: ubuntu-22.04
build-and-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with: {fetch-depth: 0, filter: 'tree:0'}
- name: Checkout SOF repository (PR source)
uses: actions/checkout@v4
with:
path: sof # Checkout into a subdirectory

- name: docker
run: docker pull thesofproject/sof && docker tag thesofproject/sof sof
- name: Checkout ALSA lib repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repo1_url || inputs.repo1_url }}
ref: ${{ github.event.inputs.repo1_commit || inputs.repo1_commit }}
path: alsa-lib # Checkout into a separate subdirectory

- name: Checkout ALSA Utils repository
uses: actions/checkout@v4
with:
repository: ${{ github.event.inputs.repo2_url || inputs.repo2_url }}
ref: ${{ github.event.inputs.repo2_commit || inputs.repo2_commit }}
path: alsa-utils # Checkout into a separate subdirectory

- 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

- name: Build Alsa-lib
run: |
cd alsa-lib
./gitcompile --prefix=../alsa-tools
make install
- name: Build Alsa-utils
run: |
cd alsa-utils
./gitcompile --prefix=../alsa-tools
--with-alsa-prefix=../alsa-tools
--with-alsa-inc-prefix=../alsa-tools/include
--with-sysroot=../alsa-tools
--with-udev-rules-dir=../alsa-tools
PKG_CONFIG_PATH=../alsa-tools
LDFLAGS=-L../alsa-tools/lib"
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 ./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 ./scripts/build-tools.sh -Y

- name: build testbench
run: ./scripts/rebuild-testbench.sh ||
./scripts/rebuild-testbench.sh -j 1

- name: run testbench
run: ./scripts/host-testbench.sh



0 comments on commit 3641be5

Please sign in to comment.