I hope this one works

This commit is contained in:
Anthony Samms
2025-09-15 19:05:51 -04:00
parent 1d2aba31e3
commit b82940ea54
3 changed files with 147 additions and 99 deletions

View File

@@ -38,7 +38,6 @@ jobs:
brew update
brew install portaudio libsndfile libsamplerate pkg-config
# Use MSYS2 for Windows audio library build
- name: Set up MSYS2 (Windows)
if: runner.os == 'Windows'
uses: msys2/setup-msys2@v2
@@ -50,94 +49,72 @@ jobs:
mingw-w64-x86_64-portaudio
mingw-w64-x86_64-libsndfile
mingw-w64-x86_64-libsamplerate
mingw-w64-x86_64-flac
mingw-w64-x86_64-libvorbis
mingw-w64-x86_64-libogg
mingw-w64-x86_64-opus
- name: Build audio library (DLL) (Windows)
- name: Build static audio library (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
working-directory: libs/audio
run: |
# Clean previous builds
make clean
make all
- name: List build outputs (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
working-directory: libs/audio
run: |
ls -l
# Build with static linking
make static
- name: Copy DLL to build directory (Windows)
# Verify the build
make verify
# Show final library info
echo "=== Final library verification ==="
ls -la libaudio.dll
file libaudio.dll
# Check dependencies - should be minimal
echo "=== DLL Dependencies (should be minimal) ==="
objdump -p libaudio.dll | grep "DLL Name:" || echo "No external DLL dependencies found!"
- name: Copy static DLL (Windows)
if: runner.os == 'Windows'
run: |
mkdir -p build/lib
cp libs/audio/libaudio.dll build/lib/
# No need to copy other DLLs since everything is statically linked!
echo "Static build complete - single DLL created"
ls -la build/lib/
shell: bash
- name: Copy DLL dependencies (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
# For Unix systems, also try static builds
- name: Install static development libraries (Ubuntu)
if: runner.os == 'Linux'
run: |
# Get the actual workspace path
WORKSPACE_PATH=$(cygpath -m "$GITHUB_WORKSPACE")
echo "Workspace path: $WORKSPACE_PATH"
sudo apt-get update
sudo apt-get install -y \
build-essential \
pkg-config \
libportaudio2 \
portaudio19-dev \
libsndfile1-dev \
libsamplerate0-dev \
libflac-dev \
libvorbis-dev \
libogg-dev \
ccache
# Create build directory
mkdir -p "$WORKSPACE_PATH/build/lib"
# Copy our built library first
cp libs/audio/libaudio.dll "$WORKSPACE_PATH/build/lib/"
# Copy MinGW runtime dependencies
cp /mingw64/bin/libgcc_s_seh-1.dll "$WORKSPACE_PATH/build/lib/"
cp /mingw64/bin/libwinpthread-1.dll "$WORKSPACE_PATH/build/lib/"
cp /mingw64/bin/libstdc++-6.dll "$WORKSPACE_PATH/build/lib/" || echo "libstdc++-6.dll not found"
# Copy audio library dependencies
cp /mingw64/bin/libportaudio.dll "$WORKSPACE_PATH/build/lib/"
cp /mingw64/bin/libsndfile-1.dll "$WORKSPACE_PATH/build/lib/"
cp /mingw64/bin/libsamplerate-0.dll "$WORKSPACE_PATH/build/lib/"
# Copy other potential dependencies (with error handling)
cp /mingw64/bin/libFLAC.dll "$WORKSPACE_PATH/build/lib/" || echo "libFLAC.dll not found"
cp /mingw64/bin/libvorbis-0.dll "$WORKSPACE_PATH/build/lib/" || echo "libvorbis-0.dll not found"
cp /mingw64/bin/libvorbisenc-2.dll "$WORKSPACE_PATH/build/lib/" || echo "libvorbisenc-2.dll not found"
cp /mingw64/bin/libogg-0.dll "$WORKSPACE_PATH/build/lib/" || echo "libogg-0.dll not found"
# Also copy DLLs directly to libs/audio for the release step
cp /mingw64/bin/libgcc_s_seh-1.dll libs/audio/
cp /mingw64/bin/libwinpthread-1.dll libs/audio/
cp /mingw64/bin/libstdc++-6.dll libs/audio/ || echo "libstdc++-6.dll not found"
cp /mingw64/bin/libportaudio.dll libs/audio/
cp /mingw64/bin/libsndfile-1.dll libs/audio/
cp /mingw64/bin/libsamplerate-0.dll libs/audio/
cp /mingw64/bin/libFLAC.dll libs/audio/ || echo "libFLAC.dll not found"
cp /mingw64/bin/libvorbis-0.dll libs/audio/ || echo "libvorbis-0.dll not found"
cp /mingw64/bin/libvorbisenc-2.dll libs/audio/ || echo "libvorbisenc-2.dll not found"
cp /mingw64/bin/libogg-0.dll libs/audio/ || echo "libogg-0.dll not found"
# List what we have
echo "Contents of build/lib/:"
ls -la "$WORKSPACE_PATH/build/lib/"
echo "Contents of libs/audio/:"
ls -la libs/audio/
# Compile the audio library (Unix)
- name: Check Audio Library Dependencies
run: |
cd libs/audio
make check-deps
shell: bash
continue-on-error: true
- name: Compile Audio Library (Unix)
- name: Build static audio library (Unix)
if: runner.os != 'Windows'
run: |
cd libs/audio
make clean
make all
make static || make all # Fallback to regular build if static fails
make verify
shell: bash
- name: Install Audio Library (Unix)
- name: Install static audio library (Unix)
if: runner.os != 'Windows'
run: |
cd libs/audio