-
Notifications
You must be signed in to change notification settings - Fork 0
171 lines (156 loc) · 5.66 KB
/
ci.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
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
name: Langulus::Math CI
on: push
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04, windows-latest]
build: [Release]
arch: [x86, x64]
cxx: [g++, clang++-16, ClangCl, v143]
feature: [
[NoSIMD, 16, ' ', ' '],
[SSE, 16, '-msse', '/arch:SSE'],
[SSE2, 16, '-msse2', '/arch:SSE2'],
[SSE3, 16, '-msse3', '<not available on msvc>'],
[SSSE3, 16, '-mssse3', '<not available on msvc>'],
[SSE4.1, 16, '-msse4.1', '<not available on msvc>'],
[SSE4.2, 16, '-msse4.2', '<not available on msvc>'],
[AVX, 32, '-mavx', '/arch:AVX'],
[AVX2, 32, '-mavx2', '/arch:AVX2'],
[AVX512, 64, '-mavx512f', '/arch:AVX512']
]
exclude:
- os: ubuntu-22.04
cxx: v143
- os: ubuntu-22.04
cxx: ClangCl
- os: windows-latest
cxx: g++
- os: windows-latest
cxx: clang++-16
- arch: x64
cxx: ClangCl
feature: [SSE, 16, '-msse', '/arch:SSE']
- arch: x64
cxx: ClangCl
feature: [SSE2, 16, '-msse2', '/arch:SSE2']
- arch: x64
cxx: ClangCl
feature: [SSE3, 16, '-msse3', '<not available on msvc>']
- arch: x64
cxx: ClangCl
feature: [SSSE3, 16, '-mssse3', '<not available on msvc>']
- arch: x64
cxx: ClangCl
feature: [SSE4.1, 16, '-msse4.1', '<not available on msvc>']
- arch: x64
cxx: ClangCl
feature: [SSE4.2, 16, '-msse4.2', '<not available on msvc>']
- arch: x86
cxx: ClangCl
feature: [SSE3, 16, '-msse3', '<not available on msvc>']
- arch: x86
cxx: ClangCl
feature: [SSSE3, 16, '-mssse3', '<not available on msvc>']
- arch: x86
cxx: ClangCl
feature: [SSE4.1, 16, '-msse4.1', '<not available on msvc>']
- arch: x86
cxx: ClangCl
feature: [SSE4.2, 16, '-msse4.2', '<not available on msvc>']
- arch: x64
cxx: v143
feature: [SSE, 16, '-msse', '/arch:SSE']
- arch: x64
cxx: v143
feature: [SSE2, 16, '-msse2', '/arch:SSE2']
- arch: x64
cxx: v143
feature: [SSE3, 16, '-msse3', '<not available on msvc>']
- arch: x64
cxx: v143
feature: [SSSE3, 16, '-mssse3', '<not available on msvc>']
- arch: x64
cxx: v143
feature: [SSE4.1, 16, '-msse4.1', '<not available on msvc>']
- arch: x64
cxx: v143
feature: [SSE4.2, 16, '-msse4.2', '<not available on msvc>']
- arch: x86
cxx: v143
feature: [SSE3, 16, '-msse3', '<not available on msvc>']
- arch: x86
cxx: v143
feature: [SSSE3, 16, '-mssse3', '<not available on msvc>']
- arch: x86
cxx: v143
feature: [SSE4.1, 16, '-msse4.1', '<not available on msvc>']
- arch: x86
cxx: v143
feature: [SSE4.2, 16, '-msse4.2', '<not available on msvc>']
# Seems the cloud at github doesn't have the avx512 extensions
- feature: [AVX512, 64, '-mavx512f', '/arch:AVX512']
include:
- cxx: g++
c: gcc
- cxx: clang++-16
c: clang-16
- os: ubuntu-22.04
arch: x86
cmake_args: "-DCMAKE_CXX_FLAGS=-m32"
- os: ubuntu-22.04
arch: x64
cmake_args: "-DCMAKE_CXX_FLAGS=-m64"
- os: windows-latest
arch: x86
cmake_args: "-G \"Visual Studio 17 2022\" -A Win32"
- os: windows-latest
arch: x64
cmake_args: "-G \"Visual Studio 17 2022\" -A x64"
name: "${{matrix.os}}-${{matrix.cxx}}-${{matrix.build}}-${{matrix.arch}}-${{matrix.feature[0]}}"
runs-on: ${{matrix.os}}
steps:
- name: Clone
uses: actions/checkout@v4
- if: matrix.os == 'ubuntu-22.04' && matrix.arch == 'x86'
name: Prepare Linux for cross-compilation
run: |
sudo apt update
sudo apt install g++-multilib
- if: matrix.cxx == 'clang++-16'
name: Installing Clang 16
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo apt-add-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-16 main"
sudo apt update
sudo apt install clang-16
- if: matrix.os == 'ubuntu-22.04'
name: Configure (Linux)
run: >
mkdir build && cd build && cmake ..
-DCMAKE_C_COMPILER=${{matrix.c}}
-DCMAKE_CXX_COMPILER=${{matrix.cxx}}
${{matrix.cmake_args}}
-DCMAKE_BUILD_TYPE=${{matrix.build}}
-DCMAKE_C_FLAGS="${{matrix.feature[2]}}"
-DCMAKE_CXX_FLAGS="${{matrix.feature[2]}}"
-DLANGULUS_ALIGNMENT=${{matrix.feature[1]}}
-DLANGULUS_TESTING=ON
- if: matrix.os == 'windows-latest'
name: Configure (Windows)
run: >
mkdir build && cd build && cmake ..
${{matrix.cmake_args}} -T "${{matrix.cxx}}"
-DCMAKE_BUILD_TYPE=${{matrix.build}}
-DCMAKE_CXX_FLAGS="${{matrix.feature[3]}} /EHsc"
-DLANGULUS_ALIGNMENT=${{matrix.feature[1]}}
-DLANGULUS_TESTING=ON
- name: Build
run: cmake --build build -j4 --config ${{matrix.build}}
- name: Test
run: cd build && ctest -V -C ${{matrix.build}}