-
Notifications
You must be signed in to change notification settings - Fork 307
230 lines (224 loc) · 7.22 KB
/
Copy pathwindows.yml
File metadata and controls
230 lines (224 loc) · 7.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
name: Windows build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-windows-x86:
name: 'MSVC ${{ matrix.os }}, ${{ matrix.target }} ${{ matrix.sys.set }}'
defaults:
run:
shell: bash {0}
strategy:
matrix:
os:
- 2022
- 2025
target:
- x86
- x64
sys:
- { set: SSE, flags: "/arch:SSE2" }
- { set: AVX, flags: "/arch:AVX" }
- { set: AVX2, flags: "/arch:AVX2" }
- { set: AVX512, flags: "/arch:AVX512" }
exclude:
# AVX on both platforms has a codegen error
# On 2019 in _mm256_rsqrt_ps, on 2022 in _mm256_blend_p*
- { sys: { set: AVX } }
# On both platforms x86 + AVX512 triggers a compiler crash
- { target: x86, sys: { set: AVX512 } }
# /arch:SSE2 is not available on x64 platforms (SSE2 is enabled by default)
- { target: x64, sys: { set: SSE} }
runs-on: windows-${{ matrix.os }}
steps:
- name: Setup compiler
uses: ilammy/msvc-dev-cmd@v1
with:
arch: ${{ matrix.target }}
- name: Setup Ninja
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install ninja
- name: Checkout xsimd
uses: actions/checkout@v6
- name: Setup
run: cmake -B _build -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_FLAGS="${{ matrix.sys.flags }}" -G Ninja
- name: Build
run: cmake --build _build
- name: Testing xsimd
if: ${{ !startsWith(matrix.sys.set, 'AVX512') }}
env:
# Set CPU feature test expectations
# Assuming the runner always has AVX2 (independent of compilation option)
XSIMD_TEST_CPU_ASSUME_NEON64: "0"
XSIMD_TEST_CPU_ASSUME_SSE4_2: "1"
XSIMD_TEST_CPU_ASSUME_AVX2: "1"
XSIMD_TEST_CPU_ASSUME_MANUFACTURER: "intel,amd"
run: ./_build/test/test_xsimd
build-windows-mingw:
name: 'MSYS2 ${{ matrix.msystem }}'
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
strategy:
matrix:
# Temporarily remove MINGW64 and UCRT64 builds because
# GCC 12 gives an unexpected overflow warning for __builtin_memmove
# see https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106199
msystem: [ MINGW32, CLANG64 ]
#msystem: [ MINGW32, MINGW64, UCRT64, CLANG32, CLANG64 ]
fail-fast: false
steps:
- name: Use MinGW from MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
update: true
path-type: minimal
pacboy: >-
cc:p
cmake:p
ninja:p
- name: Checkout xsimd
uses: actions/checkout@v6
- name: Configure
run: cmake -B _build -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -DDOWNLOAD_DOCTEST=ON -G Ninja
- name: Build
run: cmake --build _build
- name: Test
run: ./_build/test/test_xsimd
build-windows-clang-cl:
name: 'clang-cl x64 ${{ matrix.config.name }}'
defaults:
run:
shell: bash {0}
strategy:
matrix:
config:
- { name: "AVX2", flags: "/arch:AVX2", benchmark: "ON", examples: "ON" }
- { name: "/fp:fast", flags: "/fp:fast", benchmark: "OFF", examples: "OFF" }
runs-on: windows-2025
steps:
- name: Setup compiler
uses: ilammy/msvc-dev-cmd@v1
with:
arch: amd64
- name: Check clang-cl
run: |
command -v clang-cl
clang-cl --version
- name: Setup Ninja
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install ninja
- name: Checkout xsimd
uses: actions/checkout@v3
- name: Setup
run: |
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 }} -DXSIMD_REASSOCIATIVE_MATH=1" \
-G Ninja
- name: Build
run: cmake --build _build
- name: Testing xsimd
run: ./_build/test/test_xsimd
build-windows-arm64:
name: 'MSVC ARM64'
defaults:
run:
shell: bash {0}
runs-on: windows-11-arm
steps:
- name: Setup compiler
uses: ilammy/msvc-dev-cmd@v1
with:
arch: arm64
- name: Setup Ninja
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install ninja
- name: Checkout xsimd
uses: actions/checkout@v6
- name: Setup
run: cmake -B _build -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -G Ninja
- name: Build
run: cmake --build _build
- name: Testing xsimd
run: ./_build/test/test_xsimd
build-windows-arm64-msys2-clang:
name: 'MSYS2 CLANG ARM64'
runs-on: windows-11-arm
defaults:
run:
shell: msys2 {0}
steps:
- name: Setup MSYS2 with Clang (ARM64)
uses: msys2/setup-msys2@v2
with:
msystem: CLANGARM64
update: true
path-type: minimal
pacboy: >-
cc:p
cmake:p
ninja:p
- name: Checkout xsimd
uses: actions/checkout@v4
- name: Configure
run: |
cmake -B _build \
-DBUILD_TESTS=ON \
-DDOWNLOAD_DOCTEST=ON \
-DBUILD_BENCHMARK=ON \
-DBUILD_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
- name: Build
run: cmake --build _build
- name: Testing xsimd
run: ./_build/test/test_xsimd
build-windows-arm64-clang:
name: 'LLVM CLANG ARM64'
defaults:
run:
shell: bash {0}
runs-on: windows-11-arm
steps:
- name: Install LLVM/Clang for Windows ARM64
shell: pwsh
run: |
winget install --id LLVM.LLVM --accept-source-agreements --accept-package-agreements --silent
# Add LLVM bin directory to PATH for subsequent steps
echo "C:\Program Files\LLVM\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup Ninja
run: |
python3 -m pip install --upgrade pip setuptools wheel
python3 -m pip install ninja
- name: Checkout xsimd
uses: actions/checkout@v4
- name: Verify clang-cl version
run: clang-cl --version
- name: Configure
run: |
cmake -B _build \
-DCMAKE_C_COMPILER=clang-cl \
-DCMAKE_CXX_COMPILER=clang-cl \
-DBUILD_TESTS=ON \
-DDOWNLOAD_DOCTEST=ON \
-DBUILD_BENCHMARK=ON \
-DBUILD_EXAMPLES=ON \
-DCMAKE_BUILD_TYPE=Release \
-G Ninja
- name: Build
run: cmake --build _build
- name: Testing xsimd
run: ./_build/test/test_xsimd