-
Notifications
You must be signed in to change notification settings - Fork 235
221 lines (213 loc) · 6.7 KB
/
linux.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
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
name: Linux
on:
push:
paths-ignore:
- '**/*.md'
pull_request:
paths-ignore:
- '**/*.md'
jobs:
compatibility:
runs-on: ubuntu-20.04
container: streamhpc/opencl-sdk-base:ubuntu-18.04-20220127
strategy:
matrix:
# TODO: CMake 3.0.2 is Headers minimum (and ubuntu 18.04 canonical apt repo ver), not this repo's min
# Replace once backport to C++14 happened
include:
# Unix Makefiles
# One CMake version
# For all compilers
# For all configurations
# For all target architectures
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 64
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 64
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 32
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 32
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 64
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 64
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 32
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 32
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 64
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 64
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 32
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 32
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 64
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 64
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Debug
BIN: 32
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.0.2
GEN: Unix Makefiles
CONFIG: Release
BIN: 32
# Multi-config generators
# One CMake version
# For all compilers
# For all architectures
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 64
- C_COMPILER: gcc-7
CXX_COMPILER: g++-7
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 32
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 64
- C_COMPILER: gcc-11
CXX_COMPILER: g++-11
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 32
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 64
- C_COMPILER: clang-8
CXX_COMPILER: clang++-8
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 32
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 64
- C_COMPILER: clang-13
CXX_COMPILER: clang++-13
CMAKE: 3.22.1
GEN: Ninja Multi-Config
BIN: 32
env:
CMAKE_EXE: /opt/Kitware/CMake/${{ matrix.CMAKE }}/bin/cmake
CTEST_EXE: /opt/Kitware/CMake/${{ matrix.CMAKE }}/bin/ctest
steps:
- name: Checkout OpenCL-Headers
uses: actions/checkout@v3
- name: Configure
shell: bash
run: $CMAKE_EXE
-G "${{matrix.GEN}}"
-D BUILD_TESTING=ON
`if [[ "${{matrix.GEN}}" == "Unix Makefiles" ]]; then echo -D CMAKE_BUILD_TYPE=${{matrix.CONFIG}}; fi;`
-D CMAKE_C_FLAGS="-Wall -Wextra -pedantic -Werror -m${{matrix.BIN}}"
-D CMAKE_C_COMPILER=${{matrix.C_COMPILER}}
-D CMAKE_C_EXTENSIONS=OFF
-D CMAKE_CXX_FLAGS="-Wall -Wextra -pedantic -Werror -m${{matrix.BIN}}"
-D CMAKE_CXX_COMPILER=${{matrix.CXX_COMPILER}}
-D CMAKE_CXX_EXTENSIONS=OFF
-D CMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/install
-B$GITHUB_WORKSPACE/build
-H$GITHUB_WORKSPACE
- name: Build
shell: bash
run: if [[ "${{matrix.GEN}}" == "Unix Makefiles" ]];
then
$CMAKE_EXE --build $GITHUB_WORKSPACE/build -- -j`nproc`;
else
$CMAKE_EXE --build $GITHUB_WORKSPACE/build --config Debug -- -j`nproc`;
$CMAKE_EXE --build $GITHUB_WORKSPACE/build --config Release -- -j`nproc`;
fi;
- name: Test
shell: bash
working-directory: ${{runner.workspace}}/OpenCL-Headers/build
run: if [[ "${{matrix.GEN}}" == "Unix Makefiles" ]];
then
$CTEST_EXE --output-on-failure --parallel `nproc`;
else
$CTEST_EXE --output-on-failure -C Debug --parallel `nproc`;
$CTEST_EXE --output-on-failure -C Release --parallel `nproc`;
fi;
- name: Test install
shell: bash
run: if [[ "${{matrix.GEN}}" == "Unix Makefiles" ]];
then
$CMAKE_EXE --build $GITHUB_WORKSPACE/build --target install -- -j`nproc`;
else
$CMAKE_EXE --build $GITHUB_WORKSPACE/build --target install --config Release -- -j`nproc`;
fi;
- name: Test pkg-config
shell: bash
run: PKG_CONFIG_PATH="$GITHUB_WORKSPACE/install/share/pkgconfig" pkg-config OpenCL-Headers --cflags | grep -q "\-I$GITHUB_WORKSPACE/install/include"