Skip to content

Commit 9775bb8

Browse files
committed
Enable unit tests for other OSes
1 parent b113fb7 commit 9775bb8

File tree

2 files changed

+68
-9
lines changed

2 files changed

+68
-9
lines changed

.github/workflows/build_test.yaml

+24-8
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
export CXX=g++
8787
mkdir build_rel
8888
cd build_rel
89-
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_NEON=ON -DASTCENC_ISA_NONE=ON -DASTCENC_PACKAGE=arm64 ..
89+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_NEON=ON -DASTCENC_ISA_NONE=ON -DASTCENC_PACKAGE=arm64 ..
9090
make install package -j4
9191
9292
- name: Build debug
@@ -132,7 +132,7 @@ jobs:
132132
export CXX=clang++
133133
mkdir build_rel
134134
cd build_rel
135-
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 ..
135+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON -DASTCENC_UNITTEST=ON -DASTCENC_PACKAGE=x64 ..
136136
make install package -j4
137137
138138
- name: Build debug
@@ -188,7 +188,7 @@ jobs:
188188
export CXX=g++
189189
mkdir build_rel
190190
cd build_rel
191-
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 ..
191+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON -DASTCENC_UNITTEST=ON -DASTCENC_PACKAGE=x64 ..
192192
make install package -j4
193193
194194
- name: Build debug
@@ -235,7 +235,7 @@ jobs:
235235
run: |
236236
mkdir build_rel
237237
cd build_rel
238-
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 ..
238+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_UNIVERSAL_BUILD=OFF -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
239239
make install package -j4
240240
241241
- name: Build debug
@@ -259,6 +259,10 @@ jobs:
259259
run: |
260260
python ./Test/astc_test_image.py --encoder sse4.1 --test-set Small
261261
262+
- name: Run unit tests
263+
run: ctest -E test-unit-avx2
264+
working-directory: build_rel
265+
262266
build-macos-universal-clang:
263267
name: macOS universal Clang
264268
runs-on: macos-14
@@ -272,7 +276,7 @@ jobs:
272276
run: |
273277
mkdir build_rel
274278
cd build_rel
275-
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNIVERSAL_BUILD=ON -DASTCENC_PACKAGE=x64 ..
279+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_UNIVERSAL_BUILD=ON -DASTCENC_PACKAGE=x64 ..
276280
make install package -j4
277281
278282
- name: Build debug
@@ -304,6 +308,10 @@ jobs:
304308
run: |
305309
python ./Test/astc_test_image.py --encoder universal --test-set Small
306310
311+
- name: Run unit tests
312+
run: ctest -E test-unit-avx2
313+
working-directory: build_rel
314+
307315
build-windows-x64-msvc:
308316
name: Windows x64 MSVC
309317
runs-on: windows-2022
@@ -320,7 +328,7 @@ jobs:
320328
run: |
321329
mkdir build_rel
322330
cd build_rel
323-
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 ..
331+
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
324332
nmake install package
325333
shell: cmd
326334

@@ -348,6 +356,10 @@ jobs:
348356
python ./Test/astc_test_image.py --test-set Small
349357
shell: cmd
350358

359+
- name: Run unit tests
360+
run: ctest
361+
working-directory: build_rel
362+
351363
build-windows-x64-clangcl:
352364
name: Windows x64 ClangCL
353365
runs-on: windows-2022
@@ -364,7 +376,7 @@ jobs:
364376
run: |
365377
mkdir build_rel
366378
cd build_rel
367-
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 ..
379+
cmake -G "Visual Studio 17 2022" -T ClangCL -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_UNITTEST=ON -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_PACKAGE=x64 ..
368380
msbuild astcencoder.sln -property:Configuration=Release
369381
msbuild PACKAGE.vcxproj -property:Configuration=Release
370382
msbuild INSTALL.vcxproj -property:Configuration=Release
@@ -374,7 +386,7 @@ jobs:
374386
run: |
375387
mkdir build_dbg
376388
cd build_dbg
377-
cmake -G "Visual Studio 17 2022" -T ClangCL -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
389+
cmake -G "Visual Studio 17 2022" -T ClangCL -DASTCENC_UNITTEST=ON -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
378390
msbuild astcencoder.sln -property:Configuration=Debug
379391
shell: cmd
380392

@@ -402,6 +414,10 @@ jobs:
402414
python ./Test/astc_test_image.py --test-set Small
403415
shell: cmd
404416

417+
- name: Run unit tests
418+
run: ctest
419+
working-directory: build_rel
420+
405421
build-windows-arm64-clangcl:
406422
name: Windows arm64 ClangCL
407423
runs-on: windows-2022

.github/workflows/post_weekly_release.yaml

+44-1
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,49 @@ jobs:
6262
--auth-key-file ../coverity.key \
6363
--strip-path ${GITHUB_WORKSPACE}
6464
65+
build-ubuntu-arm64:
66+
name: Ubuntu arm64
67+
runs-on: ubuntu-24.04
68+
steps:
69+
- name: Git checkout
70+
uses: actions/checkout@v4
71+
with:
72+
submodules: 'true'
73+
74+
- name: Build release
75+
run: |
76+
export CXX=clang++
77+
mkdir build_rel
78+
cd build_rel
79+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../ -DASTCENC_ISA_NEON=ON -DASTCENC_ISA_SVE_128=ON -DASTCENC_ISA_SVE_256=ON -DASTCENC_PACKAGE=arm64 ..
80+
make install package -j4
81+
82+
- name: Upload binaries
83+
uses: actions/upload-artifact@v4
84+
with:
85+
name: astcenc-linux-arm_64
86+
path: |
87+
build_rel/*.zip
88+
build_rel/*.zip.sha256
89+
90+
- name: Setup Python
91+
uses: actions/setup-python@v5
92+
with:
93+
python-version: '3.11'
94+
95+
- name: Get Python modules
96+
run: |
97+
python -m pip install --upgrade pip
98+
pip install numpy Pillow
99+
100+
- name: Run system tests
101+
# GitHub is using Cobalt-100, which has 128-bit SVE so we cannot test sve_256 here
102+
run: |
103+
python ./Test/astc_test_functional.py --encoder neon
104+
python ./Test/astc_test_functional.py --encoder sve_128
105+
python ./Test/astc_test_image.py --encoder neon --test-set Small
106+
python ./Test/astc_test_image.py --encoder sve_128 --test-set Small
107+
65108
build-ubuntu-x64:
66109
name: Ubuntu x64
67110
runs-on: ubuntu-22.04
@@ -100,7 +143,7 @@ jobs:
100143
- name: Run system tests
101144
run: |
102145
python ./Test/astc_test_functional.py
103-
python ./Test/astc_test_image.py --encoder=all-x86 --test-set Small
146+
python ./Test/astc_test_image.py --encoder all-x86 --test-set Small
104147
105148
build-macos-universal:
106149
name: macOS universal

0 commit comments

Comments
 (0)