Skip to content

Commit f126e92

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 e2f0536 commit f126e92

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
@@ -84,6 +84,49 @@ jobs:
8484
- name: Test
8585
run: ./_build/test/test_xsimd
8686

87+
build-windows-clang-cl:
88+
name: 'clang-cl x64 ${{ matrix.config.name }}'
89+
defaults:
90+
run:
91+
shell: bash {0}
92+
strategy:
93+
matrix:
94+
config:
95+
- { name: "AVX2", flags: "/arch:AVX2", benchmark: "ON", examples: "ON" }
96+
- { name: "/fp:fast", flags: "/fp:fast", benchmark: "OFF", examples: "OFF" }
97+
runs-on: windows-2025
98+
steps:
99+
- name: Setup compiler
100+
uses: ilammy/msvc-dev-cmd@v1
101+
with:
102+
arch: amd64
103+
- name: Check clang-cl
104+
run: |
105+
command -v clang-cl
106+
clang-cl --version
107+
- name: Setup Ninja
108+
run: |
109+
python3 -m pip install --upgrade pip setuptools wheel
110+
python3 -m pip install ninja
111+
- name: Checkout xsimd
112+
uses: actions/checkout@v3
113+
- name: Setup
114+
run: |
115+
cmake -B _build \
116+
-DBUILD_TESTS=ON \
117+
-DDOWNLOAD_DOCTEST=ON \
118+
-DBUILD_BENCHMARK=${{ matrix.config.benchmark }} \
119+
-DBUILD_EXAMPLES=${{ matrix.config.examples }} \
120+
-DCMAKE_BUILD_TYPE=Release \
121+
-DCMAKE_C_COMPILER=clang-cl \
122+
-DCMAKE_CXX_COMPILER=clang-cl \
123+
-DCMAKE_CXX_FLAGS="${{ matrix.config.flags }}" \
124+
-G Ninja
125+
- name: Build
126+
run: cmake --build _build
127+
- name: Testing xsimd
128+
run: ./_build/test/test_xsimd
129+
87130
build-windows-arm64:
88131
name: 'MSVC arm64'
89132
defaults:

0 commit comments

Comments
 (0)