Merge pull request #83 from dword64/master #58
This file contains hidden or 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: CMake | |
| on: [push, pull_request] | |
| jobs: | |
| build: | |
| # Skip building pull requests from the same repository | |
| if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository) }} | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [windows-2019, ubuntu-20.04, macos-11] | |
| env: | |
| BUILD_TYPE: Release | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v2 | |
| - name: Install ninja-build tool | |
| uses: seanmiddleditch/gha-setup-ninja@v3 | |
| - name: Enable Developer Command Prompt | |
| if: ${{ runner.os == 'Windows' }} | |
| uses: ilammy/msvc-dev-cmd@v1.7.0 | |
| - name: Set up GCC | |
| if: ${{ runner.os == 'Linux' }} | |
| uses: egor-tensin/setup-gcc@v1 | |
| with: | |
| version: 11 | |
| - name: Build | |
| run: | | |
| cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DVTIL_BUILD_TESTS=ON | |
| cmake --build build --config ${{ env.BUILD_TYPE }} --parallel | |
| - name: Test | |
| run: | | |
| ctest --version | |
| cd build | |
| ctest . -C ${{ env.BUILD_TYPE }} --verbose |