Update README.md #28
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: CI | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| build_type: [Debug, Release] | |
| compiler: [default, clang] # only meaningful on Ubuntu | |
| exclude: | |
| - os: windows-latest | |
| compiler: clang | |
| - os: macos-latest | |
| compiler: clang # handled by AppleClang already | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install dependencies (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y uuid-dev | |
| - name: Install Clang (Ubuntu only) | |
| if: matrix.os == 'ubuntu-latest' && matrix.compiler == 'clang' | |
| run: | | |
| sudo apt install -y clang | |
| - name: Configure | |
| run: > | |
| cmake -S . -B build | |
| -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} | |
| ${{ matrix.compiler == 'clang' && '-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++' || '' }} | |
| - name: Build | |
| run: cmake --build build --config ${{ matrix.build_type }} | |
| - name: Test | |
| run: ctest --output-on-failure -C ${{ matrix.build_type }} -V | |
| working-directory: build |