GH Actions: add separate workflow for CMake testing every OS
This commit is contained in:
parent
c5d6563d1c
commit
dfa969b3d9
3 changed files with 76 additions and 54 deletions
20
.github/workflows/autotools.yml
vendored
Normal file
20
.github/workflows/autotools.yml
vendored
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
name: autotools build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build-autotools:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
name: Ubuntu
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: make
|
||||
54
.github/workflows/c-cpp.yml
vendored
54
.github/workflows/c-cpp.yml
vendored
|
|
@ -1,54 +0,0 @@
|
|||
name: C/C++ CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: configure
|
||||
run: ./configure
|
||||
- name: make
|
||||
run: make
|
||||
|
||||
build-cmake:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: cmake
|
||||
run: cmake .
|
||||
- name: make
|
||||
run: make
|
||||
|
||||
build-cmake-msvc:
|
||||
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- name: cmake
|
||||
run: cmake .
|
||||
- name: build
|
||||
run: cmake --build .
|
||||
|
||||
build-cmake-mingw:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: apt
|
||||
run: sudo apt-get install mingw-w64
|
||||
- name: cmake
|
||||
run: cmake -DCMAKE_TOOLCHAIN_FILE=i686-w64-mingw32.cmake .
|
||||
- name: make
|
||||
run: make
|
||||
56
.github/workflows/cmake.yml
vendored
Normal file
56
.github/workflows/cmake.yml
vendored
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
name: CMake build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- name: Ubuntu
|
||||
os: ubuntu-latest
|
||||
install_dir: ~/portaudio
|
||||
- name: Ubuntu mingw64
|
||||
os: ubuntu-latest
|
||||
install_dir: ~/portaudio
|
||||
dependencies_extras: mingw-w64
|
||||
cmake_extras: -DCMAKE_TOOLCHAIN_FILE=i686-w64-mingw32.cmake
|
||||
- name: Windows
|
||||
os: windows-latest
|
||||
install_dir: C:\portaudio
|
||||
- name: macOS
|
||||
os: macOS-latest
|
||||
install_dir: ~/portaudio
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
name: ${{ matrix.name }}
|
||||
env:
|
||||
cmake_build_type: RelWithDebInfo
|
||||
steps:
|
||||
- name: checkout Git repository
|
||||
uses: actions/checkout@v2
|
||||
- name: "[Ubuntu] install dependencies"
|
||||
run: sudo apt-get install libasound2-dev libjack-dev ${{ matrix.dependencies_extras }}
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
- name: configure
|
||||
run: cmake ${{ matrix.cmake_extras }}
|
||||
-DCMAKE_INSTALL_PREFIX=${{ matrix.install_dir }}
|
||||
-DCMAKE_BUILD_TYPE=${{ env.cmake_build_type }}
|
||||
-DPA_BUILD_TESTS=ON
|
||||
-DPA_BUILD_EXAMPLES=ON
|
||||
-S .
|
||||
-B build
|
||||
- name: build
|
||||
run: cmake --build build --config ${{ env.cmake_build_type }} --parallel 2
|
||||
- name: install
|
||||
run: cmake --install build --config ${{ env.cmake_build_type }}
|
||||
- name: "Upload GitHub Actions artifacts"
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: ${{ matrix.name }} PortAudio build
|
||||
path: ${{ matrix.install_dir }}
|
||||
Loading…
Reference in a new issue