GH Actions: CMake build all supported options, compilers, and OSes
This commit is contained in:
parent
242a0241f6
commit
2dc8b6eb17
1 changed files with 60 additions and 10 deletions
70
.github/workflows/cmake.yml
vendored
70
.github/workflows/cmake.yml
vendored
|
|
@ -12,20 +12,55 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
- name: Ubuntu
|
- name: Ubuntu GCC
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
install_dir: ~/portaudio
|
install_dir: ~/portaudio
|
||||||
- name: Ubuntu mingw64
|
dependencies_extras: libjack-dev
|
||||||
|
cmake_generator: "Unix Makefiles"
|
||||||
|
cmake_options:
|
||||||
|
-DOSS=ON
|
||||||
|
- name: Ubuntu MinGW
|
||||||
os: ubuntu-latest
|
os: ubuntu-latest
|
||||||
install_dir: ~/portaudio
|
install_dir: ~/portaudio
|
||||||
|
asio_sdk_cache_path: asiosdk.zip
|
||||||
dependencies_extras: mingw-w64
|
dependencies_extras: mingw-w64
|
||||||
cmake_extras: -DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-w64-mingw32.cmake
|
cmake_generator: "Unix Makefiles"
|
||||||
- name: Windows
|
cmake_options:
|
||||||
|
-DASIO=ON
|
||||||
|
-DASIO_SDK_ZIP_PATH=asiosdk.zip
|
||||||
|
-DCMAKE_TOOLCHAIN_FILE=cmake/toolchains/i686-w64-mingw32.cmake
|
||||||
|
- name: Windows MSVC
|
||||||
os: windows-latest
|
os: windows-latest
|
||||||
install_dir: C:\portaudio
|
install_dir: C:\portaudio
|
||||||
- name: macOS
|
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"
|
||||||
|
- name: Windows MinGW
|
||||||
|
os: windows-latest
|
||||||
|
install_dir: C:\portaudio
|
||||||
|
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"
|
||||||
|
- name: macOS Clang
|
||||||
os: macOS-latest
|
os: macOS-latest
|
||||||
install_dir: ~/portaudio
|
install_dir: ~/portaudio
|
||||||
|
cmake_generator: "Unix Makefiles"
|
||||||
|
cmake_options:
|
||||||
|
-DCMAKE_FRAMEWORK=OFF
|
||||||
|
- name: macOS Clang framework
|
||||||
|
os: macOS-latest
|
||||||
|
install_dir: ~/portaudio
|
||||||
|
cmake_generator: "Unix Makefiles"
|
||||||
|
cmake_options:
|
||||||
|
-DCMAKE_FRAMEWORK=ON
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
name: ${{ matrix.name }}
|
name: ${{ matrix.name }}
|
||||||
|
|
@ -34,15 +69,30 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- name: checkout Git repository
|
- name: checkout Git repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: "[Ubuntu] install dependencies"
|
- name: "[Ubuntu] install ALSA and JACK headers"
|
||||||
run: sudo apt-get install libasound2-dev libjack-dev ${{ matrix.dependencies_extras }}
|
run: sudo apt-get install libasound2-dev ${{ matrix.dependencies_extras }}
|
||||||
if: matrix.os == 'ubuntu-latest'
|
if: matrix.os == 'ubuntu-latest'
|
||||||
|
- name: "[macOS] install JACK from Homebrew"
|
||||||
|
run: brew install jack
|
||||||
|
if: matrix.os == 'macOS-latest'
|
||||||
|
- name: "[Windows MinGW] install MinGW from Chocolatey"
|
||||||
|
run: choco install mingw
|
||||||
|
if: startsWith(matrix.os, 'Windows MinGW')
|
||||||
|
- name: "[Windows/MinGW] set up ASIO SDK cache"
|
||||||
|
uses: actions/cache@v2
|
||||||
|
if: matrix.asio_sdk_cache_path != null
|
||||||
|
with:
|
||||||
|
path: ${{ matrix.asio_sdk_cache_path }}
|
||||||
|
key: ${{ hashFiles('.github/asiosdk-version.txt') }}
|
||||||
- name: configure
|
- name: configure
|
||||||
run: cmake ${{ matrix.cmake_extras }}
|
run: cmake
|
||||||
|
-G "${{ matrix.cmake_generator }}"
|
||||||
|
${{ matrix.cmake_options }}
|
||||||
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
|
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
|
||||||
-DCMAKE_BUILD_TYPE=${{ env.cmake_build_type }}
|
-DCMAKE_BUILD_TYPE=${{ env.cmake_build_type }}
|
||||||
-DPA_BUILD_TESTS=ON
|
-DSKELETON=ON
|
||||||
-DPA_BUILD_EXAMPLES=ON
|
-DBUILD_TESTING=ON
|
||||||
|
-DBUILD_EXAMPLES=ON
|
||||||
-S .
|
-S .
|
||||||
-B build
|
-B build
|
||||||
- name: build
|
- name: build
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue