-
Notifications
You must be signed in to change notification settings - Fork 257
94 lines (93 loc) · 2.95 KB
/
windows.yml
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
name: Windows build
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: 'MSVC ${{ matrix.os }}, ${{ matrix.target }} ${{ matrix.sys.set }}'
defaults:
run:
shell: bash {0}
strategy:
matrix:
os:
- 2019
- 2022
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@v3
- name: Setup
run: |
mkdir _build
cd _build && cmake .. -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: |
cd _build && cmake --build .
- name: Testing xsimd
if: ${{ !startsWith(matrix.sys.set, 'AVX512') }}
run: |
cd _build && ./test/test_xsimd
build-windows-mingw:
name: 'MSYS2 ${{ matrix.msystem }}'
runs-on: windows-2019
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, CLANG32, 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
doctest:p
- name: Checkout xsimd
uses: actions/checkout@v2
- name: Configure
run: |
mkdir _build
cd _build
cmake .. -DBUILD_TESTS=ON -DBUILD_BENCHMARK=ON -DBUILD_EXAMPLES=ON -DCMAKE_BUILD_TYPE=Release -G Ninja
- name: Build
run: ninja -C _build
- name: Test
run: |
cd _build && ./test/test_xsimd