Skip to content

Commit a1652eb

Browse files
author
GitHub Actions Fix
committed
build: simplify PortAudio install directory detection in build scripts
1 parent eb12dc3 commit a1652eb

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

scripts/build-macos.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,14 @@ echo "Building version: $VERSION"
1111
PORTAUDIO_COMMIT=${PORTAUDIO_COMMIT:-"unknown"}
1212
echo "PortAudio commit: $PORTAUDIO_COMMIT"
1313

14-
# Locate PortAudio install directory. This script can be run either:
15-
# - from inside the cloned `portaudio` directory (where install/ will exist), or
16-
# - from repository root (where portaudio/install/ will exist).
17-
PA_PREFIX=""
18-
if [ -d "install" ]; then
19-
PA_PREFIX="install"
20-
elif [ -d "portaudio/install" ]; then
21-
PA_PREFIX="portaudio/install"
22-
else
23-
echo "Error: PortAudio not found. Expected at install/ or portaudio/install/"
14+
# Assume CI builds PortAudio into portaudio/install/ (workflow clones into repo root)
15+
PA_PREFIX="portaudio/install"
16+
17+
# Ensure portaudio/install exists and find static library
18+
if [ ! -d "$PA_PREFIX" ]; then
19+
echo "Error: PortAudio not found. Expected at portaudio/install/"
2420
exit 1
2521
fi
26-
27-
# Find PortAudio static library under ${PA_PREFIX}/lib
2822
PA_LIB=$(find "$PA_PREFIX/lib" -name "libportaudio*.a" | head -n 1)
2923
if [ -z "$PA_LIB" ]; then
3024
echo "Error: Could not find PortAudio static library in $PA_PREFIX/lib"

scripts/build-ubuntu.sh

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,15 @@ echo "Building version: $VERSION"
1111
PORTAUDIO_COMMIT=${PORTAUDIO_COMMIT:-"unknown"}
1212
echo "PortAudio commit: $PORTAUDIO_COMMIT"
1313

14-
# Locate PortAudio install directory. This script can be run either:
15-
# - from inside the cloned `portaudio` directory (where install/ will exist), or
16-
# - from repository root (where portaudio/install/ will exist).
17-
PA_PREFIX=""
18-
if [ -d "install" ]; then
19-
PA_PREFIX="install"
20-
elif [ -d "portaudio/install" ]; then
21-
PA_PREFIX="portaudio/install"
22-
else
23-
echo "Error: PortAudio not found. Expected at install/ or portaudio/install/"
24-
exit 1
25-
fi
14+
# Assume CI builds PortAudio into portaudio/install/ (workflow clones into repo root)
15+
PA_PREFIX="portaudio/install"
2616

2717
# Find PortAudio static library under ${PA_PREFIX}/lib
2818
PA_LIB=$(find "$PA_PREFIX/lib" -name "libportaudio*.a" | head -n 1)
19+
if [ ! -d "$PA_PREFIX" ]; then
20+
echo "Error: PortAudio not found. Expected at portaudio/install/"
21+
exit 1
22+
fi
2923
if [ -z "$PA_LIB" ]; then
3024
echo "Error: Could not find PortAudio static library in $PA_PREFIX/lib"
3125
exit 1

0 commit comments

Comments
 (0)