Skip to content

Commit 012ab77

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 012ab77

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

.github/workflows/windows.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,49 @@ 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 \
124+
-DBUILD_TESTS=ON \
125+
-DDOWNLOAD_DOCTEST=ON \
126+
-DBUILD_BENCHMARK=${{ matrix.config.benchmark }} \
127+
-DBUILD_EXAMPLES=${{ matrix.config.examples }} \
128+
-DCMAKE_BUILD_TYPE=Release \
129+
-DCMAKE_C_COMPILER=clang-cl \
130+
-DCMAKE_CXX_COMPILER=clang-cl \
131+
-DCMAKE_CXX_FLAGS="${{ matrix.config.flags }}" \
132+
-G Ninja
133+
- name: Build
134+
run: cmake --build _build
135+
- name: Testing xsimd
136+
run: ./_build/test/test_xsimd
137+
95138
build-windows-arm64:
96139
name: 'MSVC arm64'
97140
defaults:

0 commit comments

Comments
 (0)