Skip to content

Commit f0bfd3a

Browse files
committed
ci: add clang-cl Windows CI jobs with strategy matrix
Add clang-cl builds for AVX2 and /fp:fast configurations using a strategy matrix to avoid duplication. Uses cmake -B for cleaner build commands.
1 parent 548b05f commit f0bfd3a

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

.github/workflows/windows.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,42 @@ jobs:
9292
run: |
9393
cd _build && ./test/test_xsimd
9494
95+
build-windows-clang-cl:
96+
name: 'clang-cl x64 ${{ matrix.config.name }}'
97+
defaults:
98+
run:
99+
shell: bash {0}
100+
strategy:
101+
matrix:
102+
config:
103+
- { name: "AVX2", flags: "/arch:AVX2", benchmark: "ON", examples: "ON" }
104+
- { name: "/fp:fast", flags: "/fp:fast", benchmark: "OFF", examples: "OFF" }
105+
runs-on: windows-2025
106+
steps:
107+
- name: Setup compiler
108+
uses: ilammy/msvc-dev-cmd@v1
109+
with:
110+
arch: amd64
111+
- name: Check clang-cl
112+
run: |
113+
command -v clang-cl
114+
clang-cl --version
115+
- name: Setup Ninja
116+
run: |
117+
python3 -m pip install --upgrade pip setuptools wheel
118+
python3 -m pip install ninja
119+
- name: Checkout xsimd
120+
uses: actions/checkout@v3
121+
- name: Setup
122+
run: |
123+
cmake -B _build -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=${{ matrix.config.benchmark }} -DBUILD_EXAMPLES=${{ matrix.config.examples }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }}" -G Ninja
124+
- name: Build
125+
run: |
126+
cmake --build _build
127+
- name: Testing xsimd
128+
run: |
129+
cd _build && ./test/test_xsimd
130+
95131
build-windows-arm64:
96132
name: 'MSVC arm64'
97133
defaults:

0 commit comments

Comments
 (0)