Fix build with GCC 15 #59
Workflow file for this run
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: PR Check | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| types: [opened, synchronize] | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - { os: ubuntu-latest, target: linux, platform: linux-x64,} | |
| - { os: macos-latest, target: darwin, platform: darwin-x64,} | |
| - { os: macos-latest, target: darwin, platform: darwin-arm64} | |
| - { os: windows-latest, target: windows, platform: win32-x64 } | |
| steps: | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - uses: actions/checkout@v3 | |
| - name: install gcc 11 | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| sudo apt-get install -y gcc-11 g++-11 | |
| echo "CC=gcc-11" >> $GITHUB_ENV | |
| echo "CXX=g++-11" >> $GITHUB_ENV | |
| - name: Build-Windows | |
| if: startsWith(matrix.os, 'windows') | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DCMAKE_USER_MAKE_RULES_OVERRIDE="${{ github.workspace }}/cmake/flags_override.cmake" -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF | |
| cmake --build . --config Release | |
| ctest -V -C Release | |
| cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
| - name: Build-Linux | |
| if: startsWith(matrix.os, 'ubuntu') | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF -DCMAKE_BUILD_TYPE=Release | |
| cmake --build . --config Release | |
| ctest -V -C Release | |
| cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
| - name: Build-macosx | |
| if: startsWith(matrix.os, 'macos') | |
| run: | | |
| mkdir build | |
| cd build | |
| if [[ "${{ matrix.platform }}" = darwin-arm64 ]]; then | |
| cmake .. -DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF -DCMAKE_BUILD_TYPE=Release | |
| else | |
| cmake .. -DBUILD_GMOCK=OFF -DINSTALL_GTEST=OFF -DCMAKE_BUILD_TYPE=Release | |
| fi | |
| cmake --build . --config Release | |
| ctest -V -C Release | |
| cmake --install . --config Release --prefix ${{ github.workspace }}/artifact/ | |
| - name: Upload | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.platform }} | |
| path: ${{ github.workspace }}/artifact/ | |