-
Notifications
You must be signed in to change notification settings - Fork 241
332 lines (283 loc) · 9.93 KB
/
build_test.yaml
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
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
name: Build and test
run-name: Build and test PR${{ github.event.number }}
on:
workflow_dispatch:
pull_request:
branches:
- main
jobs:
build-ubuntu-x64-clang:
name: Ubuntu x64 Clang
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build release
run: |
export CXX=clang++
mkdir build_rel
cd build_rel
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON -DASTCENC_UNITTEST=ON -DASTCENC_PACKAGE=x64 ..
make install package -j4
- name: Build debug
run: |
export CXX=clang++
mkdir build_dbg
cd build_dbg
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
make -j4
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: astcenc-linux-x64
path: |
build_rel/*.zip
build_rel/*.zip.sha256
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
- name: Run system tests
run: |
python ./Test/astc_test_functional.py --encoder=none
python ./Test/astc_test_functional.py --encoder=sse2
python ./Test/astc_test_functional.py --encoder=sse4.1
python ./Test/astc_test_functional.py --encoder=avx2
python ./Test/astc_test_image.py --encoder=none --test-set Small
python ./Test/astc_test_image.py --encoder=all-x86 --test-set Small
- name: Run unit tests
run: ctest
working-directory: build_rel
build-ubuntu-x64-gcc:
name: Ubuntu x64 GCC
runs-on: ubuntu-22.04
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build release
run: |
export CXX=g++
mkdir build_rel
cd build_rel
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON -DASTCENC_UNITTEST=ON -DASTCENC_PACKAGE=x64 ..
make install package -j4
- name: Build debug
run: |
export CXX=g++
mkdir build_dbg
cd build_dbg
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
make -j4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
- name: Python rests
run: |
python ./Test/astc_test_functional.py --encoder=none
python ./Test/astc_test_functional.py --encoder=sse2
python ./Test/astc_test_functional.py --encoder=sse4.1
python ./Test/astc_test_functional.py --encoder=avx2
python ./Test/astc_test_image.py --encoder=none --test-set Small
python ./Test/astc_test_image.py --encoder=all-x86 --test-set Small
- name: Run unit tests
run: ctest
working-directory: build_rel
build-macos-x64-clang:
name: macOS x64 Clang
runs-on: macos-12
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build release
run: |
mkdir build_rel
cd build_rel
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
make install package -j4
- name: Build debug
run: |
mkdir build_dbg
cd build_dbg
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
make -j4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
- name: Run system tests
run: |
python ./Test/astc_test_image.py --test-set Small
build-macos-universal-clang:
name: macOS universal Clang
runs-on: macos-14
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build release
run: |
mkdir build_rel
cd build_rel
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNIVERSAL_BUILD=ON -DASTCENC_PACKAGE=x64 ..
make install package -j4
- name: Build debug
run: |
mkdir build_dbg
cd build_dbg
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_UNIVERSAL_BUILD=ON ..
make -j4
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: astcenc-macos-universal
path: |
build_rel/*.zip
build_rel/*.zip.sha256
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
- name: Run system tests
run: |
python ./Test/astc_test_image.py --encoder=universal --test-set Small
build-windows-x64-msvc:
name: Windows x64 MSVC
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Visual Studio x86_6
uses: ilammy/msvc-dev-cmd@v1
- name: Build release
run: |
mkdir build_rel
cd build_rel
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
nmake install package
shell: cmd
- name: Build debug
run: |
mkdir build_dbg
cd build_dbg
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
nmake
shell: cmd
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
shell: cmd
- name: Run system tests
run: |
python ./Test/astc_test_image.py --test-set Small
shell: cmd
build-windows-x64-clangcl:
name: Windows x64 ClangCL
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Visual Studio x86_6
uses: ilammy/msvc-dev-cmd@v1
- name: Build release
run: |
mkdir build_rel
cd build_rel
cmake -G "Visual Studio 17 2022" -T ClangCL -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
msbuild astcencoder.sln -property:Configuration=Release
msbuild PACKAGE.vcxproj -property:Configuration=Release
msbuild INSTALL.vcxproj -property:Configuration=Release
shell: cmd
- name: Build debug
run: |
mkdir build_dbg
cd build_dbg
cmake -G "Visual Studio 17 2022" -T ClangCL -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
msbuild astcencoder.sln -property:Configuration=Debug
shell: cmd
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: astcenc-windows-x64
path: |
build_rel/*.zip
build_rel_arm64/*.zip
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Get Python modules
run: |
python -m pip install --upgrade pip
pip install numpy Pillow
shell: cmd
- name: Run system tests
run: |
python ./Test/astc_test_image.py --test-set Small
shell: cmd
build-windows-arm64-clangcl:
name: Windows arm64 ClangCL
runs-on: windows-2022
steps:
- name: Git checkout
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Setup Visual Studio arm64
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86_arm64
- name: Build release
run: |
mkdir build_rel
cd build_rel
cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON -DASTCENC_PACKAGE=arm64-clangcl ..
msbuild astcencoder.sln -property:Configuration=Release
msbuild PACKAGE.vcxproj -property:Configuration=Release
msbuild INSTALL.vcxproj -property:Configuration=Release
shell: cmd
- name: Build debug
run: |
mkdir build_dbg
cd build_dbg
cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON ..
msbuild astcencoder.sln -property:Configuration=Debug
shell: cmd
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: astcenc-windows-arm64
path: |
build_rel/*.zip