build dylib #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build PortAudio lib | |
on: | |
push: | |
branches-ignore: | |
- master | |
permissions: | |
# This is needed to push the changes back to the repo: | |
contents: write | |
jobs: | |
windows: | |
runs-on: windows-2022 | |
# TODO: matrix with x64 and Win32 | |
# TODO: with and without ASIO | |
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 | |
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 x64 -D PA_USE_ASIO=ON | |
- name: cmake build | |
run: | | |
cmake --build build --config Release | |
- name: rename DLL | |
run: | | |
mv build/Release/portaudio_x64.dll libportaudio64bit.dll | |
- name: upload DLL | |
uses: actions/upload-artifact@v3 | |
with: | |
name: windows-x64-dll | |
path: libportaudio*.dll | |
macos: | |
runs-on: macos-12 | |
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: | | |
ls build | |
mv build/libportaudio.dylib . | |
- name: show some information about dylib | |
run: | | |
file libportaudio.dylib | |
otool -L libportaudio.dylib | |
- name: upload DLL | |
uses: actions/upload-artifact@v3 | |
with: | |
name: macos-dylib | |
path: libportaudio.dylib | |
push: | |
runs-on: ubuntu-latest | |
needs: [macos, windows] | |
steps: | |
- name: Clone Git repository | |
uses: actions/checkout@v4 | |
- name: Retrieve x64 DLL | |
uses: actions/download-artifact@v3 | |
with: | |
name: windows-x64-dll | |
- 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 |