Fix WASM compilation #769
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: Test coverage | |
| on: | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| # We deactivate it because LCOV_EXCL_START and LCOV_EXCL_STOP are not | |
| # taken into account, same for if consteval | |
| # coverage_windows_msvc: | |
| # runs-on: windows-latest | |
| # steps: | |
| # - name: Checkout repository | |
| # uses: actions/checkout@v3 | |
| # - name: Set SSH Key | |
| # uses: webfactory/[email protected] | |
| # with: | |
| # ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| # - name: Generate visual Studio solution | |
| # run: cmake.exe --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Btarget -G "Visual Studio 17 2022" -T host=x64 -A x64 -DCOVERAGE:BOOL=ON | |
| # - name: Build and test | |
| # run: cmake.exe --build target --config Debug | |
| # - name: Upload coverage report to Codecov | |
| # run: | | |
| # $ProgressPreference = 'SilentlyContinue' | |
| # Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile .\target\codecov.exe | |
| # .\target\codecov.exe -f target\test\Debug\coverage.windows.msvc.cobertura -t ${{secrets.CODECOV_TOKEN}} | |
| # - name: Upload artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: coverage-windows-msvc | |
| # path: | | |
| # target\test\Debug\coverage.msvc.cobertura | |
| coverage_windows_clangcl: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Generate visual Studio solution | |
| run: cmake.exe --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE "-DCMAKE_C_COMPILER:FILEPATH=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\x64\bin\clang-cl.exe" "-DCMAKE_CXX_COMPILER:FILEPATH=C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\Llvm\x64\bin\clang-cl.exe" -Btarget -G "Visual Studio 17 2022" -T ClangCL,host=x64 -A x64 -DCOVERAGE:BOOL=ON | |
| - name: Build and test | |
| run: cmake.exe --build target --config Debug -j 16 | |
| - name: Upload coverage report to Codecov | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile .\target\codecov.exe | |
| .\target\codecov.exe -f target\test\coverage.windows.clang.lcov.info -t ${{secrets.CODECOV_TOKEN}} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-windows-clang | |
| path: | | |
| target\test\coverage.windows.clang.lcov.info | |
| target\test\windows.clang\ | |
| coverage_windows_mingw: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Generate visual Studio solution | |
| run: cmake.exe --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH="x86_64-w64-mingw32-gcc.exe" -DCMAKE_CXX_COMPILER:FILEPATH="x86_64-w64-mingw32-g++.exe" -Btarget -G "MinGW Makefiles" -DCOVERAGE:BOOL=ON | |
| - name: Build and test | |
| run: cmake.exe --build target --config Debug -j 16 | |
| - name: Upload coverage report to Codecov | |
| run: | | |
| $ProgressPreference = 'SilentlyContinue' | |
| Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile .\target\codecov.exe | |
| .\target\codecov.exe -f target\test\coverage.windows.mingw.lcov.info -t ${{secrets.CODECOV_TOKEN}} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-windows-mingw | |
| path: | | |
| target\test\coverage.windows.mingw.lcov.info | |
| target\test\windows.mingw\ | |
| coverage_linux_clang_14: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install tools | |
| run: sudo apt-get install llvm -y | |
| - name: Generate Unix Makfiles | |
| run: cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/clang-14 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/clang++-14 -Btarget -G "Unix Makefiles" -DCOVERAGE:BOOL=ON | |
| - name: Build and test | |
| run: cmake --build target -j 16 | |
| - name: Upload coverage report to Codecov | |
| run: | | |
| curl -Os https://uploader.codecov.io/latest/linux/codecov | |
| chmod +x codecov | |
| ./codecov -f target/test/coverage.linux.clang.lcov.info -t ${{secrets.CODECOV_TOKEN}} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-linux-clang | |
| path: | | |
| target/test/coverage.linux.clang.lcov.info | |
| target/test/linux.clang/ | |
| coverage_linux_gcc-12: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Install tools | |
| run: sudo ln -fs /usr/bin/gcov-12 /usr/bin/gcov | |
| - name: Generate Unix Makfiles | |
| run: cmake --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_BUILD_TYPE:STRING=Debug -DCMAKE_C_COMPILER:FILEPATH=/usr/bin/gcc-12 -DCMAKE_CXX_COMPILER:FILEPATH=/usr/bin/g++-12 -Btarget -G "Unix Makefiles" -DCOVERAGE:BOOL=ON | |
| - name: Build and test | |
| run: cmake --build target -j 16 | |
| - name: Upload coverage report to Codecov | |
| run: | | |
| curl -Os https://uploader.codecov.io/latest/linux/codecov | |
| chmod +x codecov | |
| ./codecov -f target/test/coverage.linux.gcc.lcov.info -t ${{secrets.CODECOV_TOKEN}} | |
| - name: Upload artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-linux-gcc | |
| path: | | |
| target/test/coverage.linux.gcc.lcov.info | |
| target/test/linux.gcc/ |