From: Be Date: Mon, 11 Jan 2021 18:31:19 +0000 (-0600) Subject: GH Actions: add separate workflow for CMake testing every OS X-Git-Url: https://andrewgundersen.net/repos?a=commitdiff_plain;h=dfa969b3d947a7833058e4d04475c4ade5de9fcb;p=portaudio GH Actions: add separate workflow for CMake testing every OS --- diff --git a/.github/workflows/autotools.yml b/.github/workflows/autotools.yml new file mode 100644 index 0000000..4d6fb6c --- /dev/null +++ b/.github/workflows/autotools.yml @@ -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 diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml deleted file mode 100644 index 180b46b..0000000 --- a/.github/workflows/c-cpp.yml +++ /dev/null @@ -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 diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml new file mode 100644 index 0000000..68e4b6c --- /dev/null +++ b/.github/workflows/cmake.yml @@ -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 }}