Skip to content

Commit

Permalink
feat: official clang-cl support
Browse files Browse the repository at this point in the history
  • Loading branch information
Mishura4 committed Dec 4, 2023
1 parent 4b471af commit d4c8835
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,14 +174,16 @@ jobs:
fail-fast: false # Don't cancel other matrix jobs if one fails
matrix:
cfg:
- { name: x64, arch: x64, config: Release, vs: '2019', os: 'windows-2019', vsv: '16' }
- { name: x64, arch: x64, config: Debug, vs: '2019', os: 'windows-2019', vsv: '16' }
- { name: x86, arch: x86, config: Release, vs: '2019', os: 'windows-2019', vsv: '16' }
- { name: x86, arch: x86, config: Debug, vs: '2019', os: 'windows-2019', vsv: '16' }
- { name: x64, arch: x64, config: Release, vs: '2022', os: 'windows-2022', vsv: '17' }
- { name: x64, arch: x64, config: Debug, vs: '2022', os: 'windows-2022', vsv: '17' }
- { name: x86, arch: x86, config: Release, vs: '2022', os: 'windows-2022', vsv: '17' }
- { name: x86, arch: x86, config: Debug, vs: '2022', os: 'windows-2022', vsv: '17' }
- { name: x64, arch: x64, config: Release, vs: '2019', os: 'windows-2019', vsv: '16', upload: true, options: '' }
- { name: x64, arch: x64, config: Debug, vs: '2019', os: 'windows-2019', vsv: '16', upload: true, options: '' }
- { name: x86, arch: x86, config: Release, vs: '2019', os: 'windows-2019', vsv: '16', upload: true, options: '-T host=x86 ' }
- { name: x86, arch: x86, config: Debug, vs: '2019', os: 'windows-2019', vsv: '16', upload: true, options: '-T host=x86 ' }
- { name: x64, arch: x64, config: Release, vs: '2022', os: 'windows-2022', vsv: '17', upload: true, options: '' }
- { name: x64, arch: x64, config: Debug, vs: '2022', os: 'windows-2022', vsv: '17', upload: true, options: '' }
- { name: x86, arch: x86, config: Release, vs: '2022', os: 'windows-2022', vsv: '17', upload: true, options: '-T host=x86' }
- { name: x86, arch: x86, config: Debug, vs: '2022', os: 'windows-2022', vsv: '17', upload: true, options: '-T host=x86' }
- { name: 'Clang-x64', arch: x64, config: Release, vs: '2022', os: 'windows-2022', vsv: '17', upload: false, options: '-T ClangCL' }
- { name: 'Clang-x64-coro', arch: x64, config: Release, vs: '2022', os: 'windows-2022', vsv: '17', upload: false, options: '-T ClangCL -DDPP_CORO=on' }

name: "Windows ${{matrix.cfg.name}}-${{matrix.cfg.config}}-vs${{matrix.cfg.vs}}"
runs-on: ${{matrix.cfg.os}}
Expand All @@ -204,13 +206,13 @@ jobs:

- name: Generate CMake (x64)
if: ${{ matrix.cfg.arch == 'x64' }}
run: mkdir main/build && cd main/build && cmake -G "Visual Studio ${{matrix.cfg.vsv}} ${{matrix.cfg.vs}}" -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 ..
run: mkdir main/build && cd main/build && cmake -G "Visual Studio ${{matrix.cfg.vsv}} ${{matrix.cfg.vs}}" -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 ${{matrix.cfg.options}} ..
env:
DONT_RUN_VCPKG: true

- name: Generate CMake (x86)
if: ${{ matrix.cfg.arch == 'x86' }}
run: mkdir main/build && cd main/build && cmake -DCMAKE_TOOLCHAIN_FILE="cmake\Win32Toolchain.cmake" -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 -G "Visual Studio ${{matrix.cfg.vsv}} ${{matrix.cfg.vs}}" -A Win32 -T host=x86 ..
run: mkdir main/build && cd main/build && cmake -DCMAKE_TOOLCHAIN_FILE="cmake\Win32Toolchain.cmake" -DDPP_NO_VCPKG=ON -DAVX_TYPE=AVX0 -G "Visual Studio ${{matrix.cfg.vsv}} ${{matrix.cfg.vs}}" -A Win32 ${{matrix.cfg.options}} ..
env:
DONT_RUN_VCPKG: true

Expand All @@ -229,6 +231,7 @@ jobs:
DONT_RUN_VCPKG: true

- name: Upload Binary
if: ${{ matrix.cfg.upload }}
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32 # v3.1.3
with:
name: "libdpp - Windows ${{matrix.cfg.name}}-${{matrix.cfg.config}}-vs${{matrix.cfg.vs}}"
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ We love people's support in growing and improving. Be sure to leave a ⭐️ if
* [clang](https://clang.llvm.org/) (version 6 or higher)
* AppleClang (12.0 or higher)
* Microsoft Visual Studio 2019 or 2022 (16.x/17.x)
* [clang-cl](https://learn.microsoft.com/en-us/cpp/build/clang-support-msbuild) (version 15 or higher)

Other compilers may work (either newer versions of those listed above, or different compilers entirely) but have not been tested by us.

Expand Down

0 comments on commit d4c8835

Please sign in to comment.