name: Build and test on: push: branches: [ dev, stable ] pull_request: branches: [ dev, stable ] schedule: - cron: '0 0 */16 * *' workflow_dispatch: env: BUILD_TYPE: Debug jobs: build: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-2019 ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Build if: runner.os != 'Windows' run: | cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S . cmake --build build --config $BUILD_TYPE - name: Build with Visual Studio if: runner.os == 'Windows' shell: bash run: | cmake -B build -S . cmake --build build --config $BUILD_TYPE - name: Run tests working-directory: ${{ github.workspace }}/build run: | ctest -V -C $BUILD_TYPE integration: strategy: matrix: os: [ ubuntu-latest, macos-latest, windows-2019 ] name: [ fetch_content, find_package ] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 - name: Build if: runner.os != 'Windows' run: | cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S . cmake --build build --config $BUILD_TYPE working-directory: ./source/test/integration/${{ matrix.name }} - name: Build with Visual Studio if: runner.os == 'Windows' shell: bash run: | cmake -B build -S . cmake --build build --config $BUILD_TYPE working-directory: ./source/test/integration/${{ matrix.name }} - name: Run tests shell: bash run: | ctest -V -C $BUILD_TYPE working-directory: ./source/test/integration/${{ matrix.name }}/build