Skip to content

Commit 4027bce

Browse files
committed
Updates build scripts for improved environment handling
Enhances testbench workflow by explicitly setting environment variables, ensuring consistent paths for tools and libraries during builds. Refines default workspace path in build-alsa-tools script to use `$HOME`, increasing flexibility for user environments. Signed-off-by: Christopher Turner <christopher.g.turner@intel.com>
1 parent 517dacc commit 4027bce

File tree

2 files changed

+13
-16
lines changed

2 files changed

+13
-16
lines changed

.github/workflows/testbench.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,24 +49,21 @@ jobs:
4949
- name: Set SOF_WORKSPACE
5050
run: echo "SOF_WORKSPACE=/home/sof/work/sof.git" >> $GITHUB_ENV
5151

52-
# Set environment variables for ALSA tools
53-
- name: Set ALSA tools environment
54-
run: |
55-
export PATH=/home/sof/work/sof.git/tools/bin:$PATH
56-
export PKG_CONFIG_PATH=/home/sof/work/sof.git/tools/lib/pkgconfig:$PKG_CONFIG_PATH
57-
export LD_LIBRARY_PATH=/home/sof/work/sof.git/tools/lib:$LD_LIBRARY_PATH
58-
echo "PATH=$PATH" >> $GITHUB_ENV
59-
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
60-
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
61-
6252
# testbench needs some topologies.
6353
- name: build test topologies
6454
continue-on-error: true
65-
run: CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh
66-
./scripts/build-tools.sh -A -Y ||
67-
VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no
68-
CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh
69-
./scripts/build-tools.sh -A -Y
55+
run: |
56+
SOF_WORKSPACE=/home/sof/work/sof.git \
57+
PATH=/home/sof/work/sof.git/tools/bin:$PATH \
58+
PKG_CONFIG_PATH=/home/sof/work/sof.git/tools/lib/pkgconfig:$PKG_CONFIG_PATH \
59+
LD_LIBRARY_PATH=/home/sof/work/sof.git/tools/lib:$LD_LIBRARY_PATH \
60+
CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh ./scripts/build-tools.sh -A -Y ||
61+
VERBOSE=1 NO_PROCESSORS=1 USE_XARGS=no \
62+
SOF_WORKSPACE=/home/sof/work/sof.git \
63+
PATH=/home/sof/work/sof.git/tools/bin:$PATH \
64+
PKG_CONFIG_PATH=/home/sof/work/sof.git/tools/lib/pkgconfig:$PKG_CONFIG_PATH \
65+
LD_LIBRARY_PATH=/home/sof/work/sof.git/tools/lib:$LD_LIBRARY_PATH \
66+
CMAKE_BUILD_TYPE=Release ./scripts/docker-run.sh ./scripts/build-tools.sh -A -Y
7067
7168
# Verify alsatplg version
7269
- name: verify alsatplg version

scripts/build-alsa-tools.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ declare -a COMMIT_ID=(
2222
# Directory where repositories will be cloned/updated.
2323
if [[ -z "$SOF_WORKSPACE" ]]; then
2424
# Environment variable is empty or unset so use default
25-
BASE_DIR="/home/sof/work/sof.git"
25+
BASE_DIR="$HOME/work/sof"
2626
else
2727
# Environment variable exists and has a value
2828
BASE_DIR="$SOF_WORKSPACE"

0 commit comments

Comments
 (0)