mirror of
https://github.com/spatialaudio/portaudio-binaries.git
synced 2026-03-18 00:46:02 +08:00
163 lines
4.9 KiB
YAML
163 lines
4.9 KiB
YAML
name: Build PortAudio lib
|
|
on:
|
|
push:
|
|
branches-ignore:
|
|
- master
|
|
permissions:
|
|
# This is needed for pushing a new commit to the repo:
|
|
contents: write
|
|
jobs:
|
|
|
|
macos:
|
|
runs-on: macos-13
|
|
env:
|
|
CMAKE_OSX_ARCHITECTURES: "arm64;x86_64"
|
|
MACOSX_DEPLOYMENT_TARGET: "10.9"
|
|
steps:
|
|
- name: checkout portaudio
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: PortAudio/portaudio
|
|
ref: v19.7.0
|
|
path: portaudio
|
|
- name: cmake configure
|
|
run: |
|
|
cmake -S portaudio -B build -D CMAKE_BUILD_TYPE=Release
|
|
- name: cmake build
|
|
run: |
|
|
cmake --build build
|
|
- name: move dylib
|
|
run: |
|
|
mv build/libportaudio.dylib .
|
|
- name: show some information about dylib
|
|
run: |
|
|
file libportaudio.dylib
|
|
otool -L libportaudio.dylib
|
|
- name: upload dylib
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: macos-dylib
|
|
path: libportaudio.dylib
|
|
|
|
windows:
|
|
runs-on: windows-2022
|
|
strategy:
|
|
matrix:
|
|
platform: [x64, Win32]
|
|
asio: ["", "-asio"]
|
|
include:
|
|
- platform: x64
|
|
platform-suffix: 64bit
|
|
- platform: Win32
|
|
platform-suffix: 32bit
|
|
env:
|
|
# Reproducible build by avoiding time stamp
|
|
LDFLAGS: "/Brepro"
|
|
steps:
|
|
- name: checkout portaudio
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: PortAudio/portaudio
|
|
ref: v19.7.0
|
|
path: portaudio
|
|
# The next portaudio release will have an auto-download feature:
|
|
- name: download and extract ASIO SDK
|
|
if: matrix.asio
|
|
run: |
|
|
curl -L -o asiosdk.zip https://www.steinberg.net/asiosdk
|
|
7z x asiosdk.zip
|
|
- name: cmake configure
|
|
run: |
|
|
cmake -S portaudio -B build -A ${{ matrix.platform }} -D PA_USE_ASIO=${{ matrix.asio && 'ON' || 'OFF' }}
|
|
- name: cmake build
|
|
run: |
|
|
cmake --build build --config Release
|
|
- name: rename DLL
|
|
run: |
|
|
mv build/Release/portaudio_*.dll libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
|
|
- name: show some information about DLL
|
|
run: |
|
|
ldd libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
|
|
- name: upload DLL
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: windows-${{ matrix.platform }}-dll${{ matrix.asio }}
|
|
path: libportaudio${{ matrix.platform-suffix }}${{ matrix.asio }}.dll
|
|
|
|
linux:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
arch: [x86_64, i686, aarch64]
|
|
steps:
|
|
- name: checkout main repo
|
|
uses: actions/checkout@v4
|
|
- name: checkout portaudio
|
|
uses: actions/checkout@v4
|
|
with:
|
|
repository: PortAudio/portaudio
|
|
ref: v19.7.0
|
|
path: portaudio
|
|
- name: Set up QEMU
|
|
if: matrix.arch == 'aarch64'
|
|
uses: docker/setup-qemu-action@v3
|
|
with:
|
|
platforms: arm64
|
|
- name: Build PortAudio in Docker
|
|
run: |
|
|
docker run --rm -v ${{ github.workspace }}:/workdir:rw --workdir=/workdir \
|
|
quay.io/pypa/manylinux2014_${{ matrix.arch }} \
|
|
./build-linux.sh
|
|
- name: copy .so file
|
|
run: |
|
|
cp build/libportaudio.so libportaudio-${{ matrix.arch }}.so
|
|
- name: upload .so file
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: linux-${{ matrix.arch }}
|
|
path: libportaudio-${{ matrix.arch }}.so
|
|
|
|
push:
|
|
runs-on: ubuntu-latest
|
|
needs: [macos, windows, linux]
|
|
steps:
|
|
- name: Clone Git repository
|
|
uses: actions/checkout@v4
|
|
- name: Retrieve dylib
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: macos-dylib
|
|
- name: Retrieve x64 DLL
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: windows-x64-dll
|
|
- name: Retrieve x64 DLL with ASIO support
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: windows-x64-dll-asio
|
|
- name: Retrieve Win32 DLL
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: windows-Win32-dll
|
|
- name: Retrieve Win32 DLL with ASIO support
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
name: windows-Win32-dll-asio
|
|
- name: Retrieve x86_64 .so file
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: linux-x86_64
|
|
- name: Retrieve i686 .so file
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: linux-i686
|
|
- name: Retrieve aarch64 .so file
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: linux-aarch64
|
|
- name: Commit and push binaries (if there are changes)
|
|
run: |
|
|
git config --global user.name 'github-actions[bot]'
|
|
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
|
|
git commit -am "Update binaries" && git push || true
|