Skip to content

Commit 773e2b1

Browse files
authored
Migrate CI to GitHub Actions (#466)
Migrate to GutHub Actions from Jenkins
1 parent 0d6c904 commit 773e2b1

9 files changed

+581
-868
lines changed

.github/workflows/build_test.yaml

+231
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
name: build-test
2+
run-name: Build and test
3+
4+
on:
5+
workflow_dispatch:
6+
pull_request:
7+
branches:
8+
- main
9+
10+
jobs:
11+
build-ubuntu:
12+
name: Build and test on Ubuntu
13+
runs-on: ubuntu-22.04
14+
steps:
15+
- name: Git checkout
16+
uses: actions/checkout@v4
17+
with:
18+
submodules: 'true'
19+
20+
- name: Build R
21+
run: |
22+
export CXX=clang++
23+
mkdir build_rel
24+
cd build_rel
25+
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 ..
26+
make install package -j4
27+
28+
- name: Build D
29+
run: |
30+
export CXX=clang++
31+
mkdir build_dbg
32+
cd build_dbg
33+
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
34+
make -j4
35+
36+
- name: Upload binaries
37+
uses: actions/upload-artifact@v4
38+
with:
39+
name: astcenc-linux-x64
40+
path: |
41+
build_rel/*.zip
42+
build_rel/*.zip.sha256
43+
44+
- name: Setup Python
45+
uses: actions/setup-python@v5
46+
with:
47+
python-version: '3.11'
48+
49+
- name: Get Python modules
50+
run: |
51+
python -m pip install --upgrade pip
52+
pip install numpy Pillow
53+
54+
- name: Python Tests
55+
run: |
56+
python ./Test/astc_test_functional.py --encoder=none
57+
python ./Test/astc_test_functional.py --encoder=sse2
58+
python ./Test/astc_test_functional.py --encoder=sse4.1
59+
python ./Test/astc_test_functional.py --encoder=avx2
60+
python ./Test/astc_test_image.py --encoder=none --test-set Small --test-quality medium
61+
python ./Test/astc_test_image.py --encoder=all-x86 --test-set Small --test-quality medium
62+
63+
- name: ctest
64+
run: ctest
65+
working-directory: build_rel
66+
67+
build-macos:
68+
name: Build and test on MacOS
69+
runs-on: macos-12
70+
steps:
71+
- name: Git checkout
72+
uses: actions/checkout@v4
73+
with:
74+
submodules: 'true'
75+
76+
- name: Build R
77+
run: |
78+
mkdir build_rel
79+
cd build_rel
80+
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 ..
81+
make install package -j4
82+
83+
- name: Build D
84+
run: |
85+
mkdir build_dbg
86+
cd build_dbg
87+
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 ..
88+
make -j4
89+
90+
- name: Upload binaries
91+
uses: actions/upload-artifact@v4
92+
with:
93+
name: astcenc-macos-x64
94+
path: |
95+
build_rel/*.zip
96+
build_rel/*.zip.sha256
97+
98+
- name: Setup Python
99+
uses: actions/setup-python@v5
100+
with:
101+
python-version: '3.11'
102+
103+
- name: Get Python modules
104+
run: |
105+
python -m pip install --upgrade pip
106+
pip install numpy Pillow
107+
108+
- name: Python Tests
109+
run: |
110+
python ./Test/astc_test_image.py --test-set Small --test-quality medium
111+
112+
build-windows-msvc:
113+
name: Build and test on Windows MSVC
114+
runs-on: windows-2022
115+
steps:
116+
- name: Git checkout
117+
uses: actions/checkout@v4
118+
with:
119+
submodules: 'true'
120+
121+
- name: Setup Visual Studio x86_6
122+
uses: ilammy/msvc-dev-cmd@v1
123+
- name: Build R
124+
run: |
125+
mkdir build_rel
126+
cd build_rel
127+
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-cl ..
128+
nmake install package
129+
shell: cmd
130+
- name: Build D
131+
run: |
132+
mkdir build_dbg
133+
cd build_dbg
134+
cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=Debug -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON -DASTCENC_ISA_NONE=ON ..
135+
nmake
136+
shell: cmd
137+
138+
- name: Upload binaries
139+
uses: actions/upload-artifact@v4
140+
with:
141+
name: astcenc-windows-x64-cl
142+
path: build_rel/*.zip
143+
144+
- name: Setup Python
145+
uses: actions/setup-python@v5
146+
with:
147+
python-version: '3.11'
148+
149+
- name: Get Python modules
150+
run: |
151+
python -m pip install --upgrade pip
152+
pip install numpy Pillow
153+
shell: cmd
154+
155+
- name: Python Tests
156+
run: |
157+
python ./Test/astc_test_image.py --test-set Small --test-quality medium
158+
shell: cmd
159+
160+
build-windows-ClangCL:
161+
name: Build and test on Windows ClangCL
162+
runs-on: windows-2022
163+
steps:
164+
- name: Git checkout
165+
uses: actions/checkout@v4
166+
with:
167+
submodules: 'true'
168+
169+
- name: Setup Visual Studio x86_6
170+
uses: ilammy/msvc-dev-cmd@v1
171+
- name: Build R
172+
run: |
173+
mkdir build_rel
174+
cd build_rel
175+
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-clangcl ..
176+
msbuild astcencoder.sln -property:Configuration=Release
177+
msbuild PACKAGE.vcxproj -property:Configuration=Release
178+
msbuild INSTALL.vcxproj -property:Configuration=Release
179+
shell: cmd
180+
- name: Build D
181+
run: |
182+
mkdir build_dbg
183+
cd build_dbg
184+
cmake -G "Visual Studio 17 2022" -T ClangCL -DASTCENC_ISA_AVX2=ON -DASTCENC_ISA_SSE41=ON -DASTCENC_ISA_SSE2=ON ..
185+
msbuild astcencoder.sln -property:Configuration=Debug
186+
shell: cmd
187+
188+
- name: Setup Visual Studio arm64
189+
uses: ilammy/msvc-dev-cmd@v1
190+
with:
191+
arch: x86_arm64
192+
- name: Build R
193+
run: |
194+
mkdir build_rel_arm64
195+
cd build_rel_arm64
196+
cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON -DASTCENC_PACKAGE=arm64-clangcl ..
197+
msbuild astcencoder.sln -property:Configuration=Release
198+
msbuild PACKAGE.vcxproj -property:Configuration=Release
199+
msbuild INSTALL.vcxproj -property:Configuration=Release
200+
shell: cmd
201+
- name: Build D
202+
run: |
203+
mkdir build_dbg_arm64
204+
cd build_dbg_arm64
205+
cmake -G "Visual Studio 17 2022" -A ARM64 -T ClangCL -DASTCENC_ISA_NEON=ON ..
206+
msbuild astcencoder.sln -property:Configuration=Debug
207+
shell: cmd
208+
209+
- name: Upload binaries
210+
uses: actions/upload-artifact@v4
211+
with:
212+
name: astcenc-windows-multi-clangcl
213+
path: |
214+
build_rel/*.zip
215+
build_rel_arm64/*.zip
216+
217+
- name: Setup Python
218+
uses: actions/setup-python@v5
219+
with:
220+
python-version: '3.11'
221+
222+
- name: Get Python modules
223+
run: |
224+
python -m pip install --upgrade pip
225+
pip install numpy Pillow
226+
shell: cmd
227+
228+
- name: Python Tests
229+
run: |
230+
python ./Test/astc_test_image.py --test-set Small --test-quality medium
231+
shell: cmd

0 commit comments

Comments
 (0)