Adding missing header #292
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: Build and Tests | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| # Information on the runner matrix can be found in the `matrix.json` file. To find available | |
| # versions of compilers, check https://github.com/actions/runner-images/. | |
| generate-matrix: | |
| name: Generate job matrix | |
| runs-on: ubuntu-22.04 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Generate job matrix | |
| id: set-matrix | |
| # Note: The json in this variable must be a single line for parsing to succeed. | |
| run: | | |
| echo "matrix=$(cat .github/matrix.json | scripts/flatten_json.py)" >> $GITHUB_OUTPUT | |
| builds: | |
| needs: generate-matrix | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
| name: ${{ matrix.config.name }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set enviroment variables (Linux+GCC) | |
| if: ${{ matrix.config.compiler == 'gcc' }} | |
| shell: bash | |
| run: | | |
| echo "CC=gcc-${{matrix.config.version}}" >> $GITHUB_ENV | |
| echo "CXX=g++-${{matrix.config.version}}" >> $GITHUB_ENV | |
| - name: Set enviroment variables (Linux+Clang) | |
| if: ${{ matrix.config.compiler == 'clang' }} | |
| shell: bash | |
| run: | | |
| echo "CC=clang-${{matrix.config.version}}" >> $GITHUB_ENV | |
| echo "CXX=clang++-${{matrix.config.version}}" >> $GITHUB_ENV | |
| - name: Configure (Ubuntu) | |
| if: ${{ startsWith(matrix.config.os, 'ubuntu') }} | |
| shell: bash | |
| run: | | |
| mkdir ../build | |
| cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}} | |
| - name: Configure (MacOS) | |
| if: ${{ startsWith(matrix.config.os, 'macos') }} | |
| shell: bash | |
| run: | | |
| mkdir ../build | |
| cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}} | |
| - name: Configure (Windows) | |
| if: ${{ startsWith(matrix.config.os, 'windows') }} | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| mkdir ..\build | |
| cmake -S. -B../build -GNinja -DCMAKE_BUILD_TYPE=${{matrix.config.build-type}} -DCMAKE_CXX_STANDARD=${{matrix.config.cxxstd}} | |
| - name: Build (Unix) | |
| if: ${{ startsWith(matrix.config.os, 'ubuntu') || startsWith(matrix.config.os, 'macos') }} | |
| shell: bash | |
| run: | | |
| cmake --build ../build/ | |
| - name: Build (Windows) | |
| if: ${{ startsWith(matrix.config.os, 'windows') }} | |
| shell: cmd | |
| run: | | |
| call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64 | |
| cmake --build ../build/ | |
| - name: Test | |
| shell: bash | |
| run: | | |
| cd ../build/ | |
| ctest --output-on-failure |