From e8fa5d7d313c6b6f24dbc15e09e627a69578c3a0 Mon Sep 17 00:00:00 2001 From: Chris Thrasher Date: Wed, 14 Dec 2022 15:26:08 -0700 Subject: [PATCH] Add CI job for Clang on Windows --- .github/workflows/ci.yml | 13 +++++++------ test/CMakeLists.txt | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62c398736..613fb053e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,11 +11,12 @@ jobs: fail-fast: false matrix: platform: - - { name: Windows VS2019 x86, os: windows-2019, flags: -A Win32 } - - { name: Windows VS2019 x64, os: windows-2019, flags: -A x64 } - - { name: Windows VS2022 x86, os: windows-2022, flags: -A Win32 } - - { name: Windows VS2022 x64, os: windows-2022, flags: -A x64 } - - { name: Windows VS2022 Clang, os: windows-2022, flags: -T ClangCL } + - { name: Windows VS2019 x86, os: windows-2019, flags: -A Win32 } + - { name: Windows VS2019 x64, os: windows-2019, flags: -A x64 } + - { name: Windows VS2022 x86, os: windows-2022, flags: -A Win32 } + - { name: Windows VS2022 x64, os: windows-2022, flags: -A x64 } + - { 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 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 } @@ -111,7 +112,7 @@ jobs: if: matrix.platform.name != 'Android' && matrix.config.name != 'Frameworks' && matrix.config.name != 'iOS' && matrix.config.name != 'Static DRM' shell: bash 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' }} format: diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index fe1af838c..2d347d697 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -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 ) -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 find_program(OpenCppCoverage_BINARY "OpenCppCoverage.exe")