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 shell: bash run: | cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S . cmake --build build --config $BUILD_TYPE - name: Run tests shell: bash 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 shell: bash working-directory: ./source/test/integration/${{ matrix.name }} run: | cmake -D CMAKE_BUILD_TYPE=$BUILD_TYPE -B build -S . cmake --build build --config $BUILD_TYPE - name: Run tests shell: bash working-directory: ./source/test/integration/${{ matrix.name }}/build run: | ctest -V -C $BUILD_TYPE