Skip to content

Commit

Permalink
GH Actions: build JACK host API with MinGW and MSVC using vcpkg
Browse files Browse the repository at this point in the history
I was not able to get Ubuntu MinGW to build with JACK. I got
different link errors with every combination of static/dynamic
JACK/PortAudio.
  • Loading branch information
Be-ing committed Aug 4, 2021
1 parent 994a2bc commit ba369c8
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,27 +28,35 @@ jobs:
cmake_options:
-DASIO=ON
-DASIO_SDK_ZIP_PATH=asiosdk.zip
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-w64-mingw32.cmake
-DCMAKE_TOOLCHAIN_FILE=/home/runner/work/portaudio/portaudio/cmake/toolchains/i686-w64-mingw32.cmake
- name: Windows MSVC
os: windows-latest
install_dir: C:\portaudio
vcpkg_extra_ports: tre pthreads
vcpkg_triplet: x64-windows
vcpkg_bootstrap: ./bootstrap-vcpkg.bat
cmake_generator: "Visual Studio 16 2019"
# ASIO_SDK_ZIP_PATH needs to be quoted or CMake will save the download to
# asiosdk instead of asiosdk.zip.
asio_sdk_cache_path: "asiosdk.zip"
cmake_options:
-DASIO=ON
-DASIO_SDK_ZIP_PATH="asiosdk.zip"
-DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: Windows MinGW
os: windows-latest
install_dir: C:\portaudio
vcpkg_extra_ports: tre
vcpkg_triplet: x64-mingw-static
vcpkg_bootstrap: ./bootstrap-vcpkg.bat
cmake_generator: "MinGW Makefiles"
# ASIO_SDK_ZIP_PATH needs to be quoted or CMake will save the download to
# asiosdk instead of asiosdk.zip.
asio_sdk_cache_path: "asiosdk.zip"
cmake_options:
-DASIO=ON
-DASIO_SDK_ZIP_PATH="asiosdk.zip"
-DCMAKE_TOOLCHAIN_FILE=D:\a\portaudio\portaudio\vcpkg\scripts\buildsystems\vcpkg.cmake
- name: macOS Clang
os: macOS-latest
install_dir: ~/portaudio
Expand Down Expand Up @@ -84,12 +92,23 @@ jobs:
with:
path: ${{ matrix.asio_sdk_cache_path }}
key: ${{ hashFiles('.github/asiosdk-version.txt') }}
- name: "[Windows/MinGW] install dependencies from vcpkg"
if: runner.os == 'Windows'
run: |
# TODO: switch to upstream vcpkg when https://github.com/microsoft/vcpkg/pull/19270 is merged.
git clone --depth 1 https://github.com/Be-ing/vcpkg.git -b jack2_1.9.19
cd vcpkg
${{ matrix.vcpkg_bootstrap }}
./vcpkg install jack2 ${{ matrix.vcpkg_extra_ports }}
env:
VCPKG_DEFAULT_TRIPLET: ${{ matrix.vcpkg_triplet }}
- name: configure
run: cmake
-G "${{ matrix.cmake_generator }}"
${{ matrix.cmake_options }}
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
-DCMAKE_BUILD_TYPE=${{ env.cmake_build_type }}
-DVCPKG_TARGET_TRIPLET=${{ matrix.vcpkg_triplet }}
-DSKELETON=ON
-DBUILD_TESTING=ON
-DBUILD_EXAMPLES=ON
Expand Down

0 comments on commit ba369c8

Please sign in to comment.