Add CI job for Clang on Windows

This commit is contained in:
Chris Thrasher 2022-12-14 15:26:08 -07:00 committed by GitHub
parent 09ec31eeea
commit e8fa5d7d31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 7 deletions

View File

@ -11,11 +11,12 @@ jobs:
fail-fast: false fail-fast: false
matrix: matrix:
platform: platform:
- { name: Windows VS2019 x86, os: windows-2019, flags: -A Win32 } - { name: Windows VS2019 x86, os: windows-2019, flags: -A Win32 }
- { name: Windows VS2019 x64, os: windows-2019, flags: -A x64 } - { name: Windows VS2019 x64, os: windows-2019, flags: -A x64 }
- { name: Windows VS2022 x86, os: windows-2022, flags: -A Win32 } - { name: Windows VS2022 x86, os: windows-2022, flags: -A Win32 }
- { name: Windows VS2022 x64, os: windows-2022, flags: -A x64 } - { name: Windows VS2022 x64, os: windows-2022, flags: -A x64 }
- { name: Windows VS2022 Clang, os: windows-2022, flags: -T ClangCL } - { name: Windows VS2022 ClangCL, os: windows-2022, flags: -T ClangCL }
- { name: Windows VS2022 Clang, os: windows-2022, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -GNinja }
- { name: Linux GCC, os: ubuntu-latest } - { name: Linux GCC, os: ubuntu-latest }
- { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, gcovr_options: '--gcov-executable="llvm-cov-$CLANG_VERSION gcov"' } - { name: Linux Clang, os: ubuntu-latest, flags: -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++, gcovr_options: '--gcov-executable="llvm-cov-$CLANG_VERSION gcov"' }
- { name: MacOS, os: macos-11 } - { name: MacOS, os: macos-11 }
@ -111,7 +112,7 @@ jobs:
if: matrix.platform.name != 'Android' && matrix.config.name != 'Frameworks' && matrix.config.name != 'iOS' && matrix.config.name != 'Static DRM' if: matrix.platform.name != 'Android' && matrix.config.name != 'Frameworks' && matrix.config.name != 'iOS' && matrix.config.name != 'Static DRM'
shell: bash shell: bash
run: | run: |
cmake -S $GITHUB_WORKSPACE/test/install -B $GITHUB_WORKSPACE/test/install/build -DSFML_ROOT=$GITHUB_WORKSPACE/install -DCMAKE_VERBOSE_MAKEFILE=ON ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}} cmake -S $GITHUB_WORKSPACE/test/install -B $GITHUB_WORKSPACE/test/install/build -DSFML_ROOT=$GITHUB_WORKSPACE/install -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} ${{matrix.platform.flags}} ${{matrix.config.flags}} ${{matrix.type.flags}}
cmake --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }} cmake --build $GITHUB_WORKSPACE/test/install/build --config ${{ matrix.type.name == 'Debug' && 'Debug' || 'Release' }}
format: format:

View File

@ -129,7 +129,7 @@ add_custom_target(runtests ALL
DEPENDS test-sfml-system test-sfml-window test-sfml-graphics test-sfml-network test-sfml-audio DEPENDS test-sfml-system test-sfml-window test-sfml-graphics test-sfml-network test-sfml-audio
) )
if(SFML_ENABLE_COVERAGE AND SFML_COMPILER_MSVC) if(SFML_ENABLE_COVERAGE AND SFML_OS_WINDOWS)
# Try to find and use OpenCppCoverage for coverage reporting when building with MSVC # Try to find and use OpenCppCoverage for coverage reporting when building with MSVC
find_program(OpenCppCoverage_BINARY "OpenCppCoverage.exe") find_program(OpenCppCoverage_BINARY "OpenCppCoverage.exe")