Allow running checks on re-opened PRs #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-and-test | |
on: | |
push: | |
branches: [master] | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
build-and-test: | |
name: Build and test on ${{matrix.os}} in ${{matrix.build-type}} mode | |
runs-on: ${{matrix.os}} | |
strategy: | |
matrix: | |
build-type: [Debug, Release] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Create Build Environment | |
run: cmake -E make_directory ${{runner.workspace}}/build | |
- name: Configure CMake | |
working-directory: ${{runner.workspace}}/build | |
shell: bash # Necessary because of the $GITHUB_WORKSPACE variable | |
run: cmake -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DBUILD_TESTING=ON -S $GITHUB_WORKSPACE | |
- name: Build | |
working-directory: ${{runner.workspace}}/build | |
run: cmake --build . --config ${{matrix.build-type}} | |
- name: Test | |
working-directory: ${{runner.workspace}}/build | |
run: ctest -C ${{matrix.build-type}} --verbose --rerun-failed --output-on-failure |