1
- name : Hop release
1
+ name : Hop CI
2
2
3
3
on :
4
4
push :
@@ -81,18 +81,18 @@ jobs:
81
81
name : headers-mingw
82
82
path : headers-mingw
83
83
84
- linuxNative :
84
+ linux :
85
85
runs-on : ubuntu-20.04
86
86
87
87
steps :
88
88
- uses : actions/checkout@v4
89
89
with :
90
90
submodules : ' recursive'
91
91
92
- - name : Install dependencies
92
+ - name : install dependencies
93
93
run : sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools
94
94
95
- - name : linux-linux
95
+ - name : build
96
96
run : |
97
97
git submodule update --recursive
98
98
./build.sh -t -d -r
@@ -105,7 +105,7 @@ jobs:
105
105
cp -r build/PerlinWorld demos/
106
106
cd demos && zip -r ../demos.zip * && cd ..
107
107
108
- - name : Tests
108
+ - name : unit tests
109
109
working-directory : ${{github.workspace}}/build
110
110
# Execute tests defined by the CMake configuration.
111
111
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
@@ -127,18 +127,54 @@ jobs:
127
127
name : demoLinux
128
128
path : demos.zip
129
129
130
- linuxXwindows :
130
+ linuxBuildAndRun :
131
131
runs-on : ubuntu-22.04
132
132
133
+ strategy :
134
+ matrix :
135
+ example : [PerlinWorld, SoftBodyTetris, Sprites, MeshEditor]
136
+
133
137
steps :
134
138
- uses : actions/checkout@v4
135
139
with :
136
140
submodules : ' recursive'
137
141
138
- - name : Install dependencies
142
+ - name : install dependencies
143
+ run : sudo apt-get update && sudo apt-get install -y build-essential xorg-dev mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools
144
+
145
+ - name : build
146
+ run : |
147
+ ./build.sh -t -r -d
148
+ - name : run ${{ matrix.example }}
149
+ run : |
150
+ cd build/${{ matrix.example }}
151
+ chmod +x ${{ matrix.example }}
152
+ export DISPLAY=:99
153
+ sudo Xvfb :99 -screen 0 800x600x24 &
154
+ sleep 5
155
+ MESA_GL_VERSION_OVERRIDE=3.3 ./${{ matrix.example }} &
156
+ export PID=$!
157
+ sleep 10
158
+ xwd -root -silent | convert xwd:- png:screenshot.png
159
+ sleep 5 && kill $PID
160
+ - name : upload screenshot
161
+ uses : actions/upload-artifact@v4
162
+ with :
163
+ name : ${{ matrix.example }}.png
164
+ path : build/${{ matrix.example }}/screenshot.png
165
+
166
+ windows :
167
+ runs-on : ubuntu-22.04
168
+
169
+ steps :
170
+ - uses : actions/checkout@v4
171
+ with :
172
+ submodules : ' recursive'
173
+
174
+ - name : install dependencies
139
175
run : sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64
140
176
141
- - name : linux-X-windows
177
+ - name : build
142
178
run : |
143
179
git submodule update --recursive
144
180
./build.sh -w -d -r -t
@@ -154,7 +190,7 @@ jobs:
154
190
cd demos && zip -r ../demos.zip * && cd ..
155
191
cp build/*.dll build/TestScriptPack/
156
192
157
- - name : Tests (wine64)
193
+ - name : unit tests
158
194
working-directory : ${{github.workspace}}/build
159
195
# Execute tests defined by the CMake configuration.
160
196
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
@@ -177,15 +213,52 @@ jobs:
177
213
name : demoWindows
178
214
path : demos.zip
179
215
180
- macosNative :
216
+ windowsBuildAndRun :
217
+ runs-on : ubuntu-22.04
218
+
219
+ strategy :
220
+ matrix :
221
+ example : [PerlinWorld, SoftBodyTetris, Sprites, MeshEditor]
222
+
223
+ steps :
224
+ - uses : actions/checkout@v4
225
+ with :
226
+ submodules : ' recursive'
227
+
228
+ - name : install dependencies
229
+ run : sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev xvfb x11-apps vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools wine64
230
+
231
+ - name : build
232
+ run : |
233
+ ./build.sh -r -w -d
234
+ - name : run ${{ matrix.example }}
235
+ run : |
236
+ cd build/${{ matrix.example }}
237
+ cp ../*.dll .
238
+ chmod +x ${{ matrix.example }}.exe
239
+ export DISPLAY=:99
240
+ sudo Xvfb :99 -screen 0 800x600x24 &
241
+ sleep 5
242
+ MESA_GL_VERSION_OVERRIDE=3.3 wine64 ${{ matrix.example }}.exe &
243
+ export PID=$!
244
+ sleep 10
245
+ xwd -root -silent | convert xwd:- png:screenshot.png
246
+ sleep 5 && kill $PID
247
+ - name : upload screenshots
248
+ uses : actions/upload-artifact@v4
249
+ with :
250
+ name : ${{ matrix.example }}-wine.png
251
+ path : build/${{ matrix.example }}/screenshot.png
252
+
253
+ macos :
181
254
runs-on : macos-13
182
255
183
256
steps :
184
257
- uses : actions/checkout@v4
185
258
with :
186
259
submodules : ' recursive'
187
260
188
- - name : Install dependencies
261
+ - name : install dependencies
189
262
run : |
190
263
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip
191
264
unzip vulkan-sdk.zip
@@ -194,7 +267,7 @@ jobs:
194
267
cd ~/vulkan/
195
268
python install_vulkan.py
196
269
197
- - name : macos build
270
+ - name : build
198
271
run : |
199
272
git submodule update --recursive
200
273
./build.sh -o -d -r -t
@@ -207,7 +280,7 @@ jobs:
207
280
cp -r build/PerlinWorld demos/
208
281
cd demos && zip -r ../demos.zip * && cd ..
209
282
210
- - name : Tests
283
+ - name : unit tests
211
284
working-directory : ${{github.workspace}}/build
212
285
# Execute tests defined by the CMake configuration.
213
286
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
@@ -225,51 +298,7 @@ jobs:
225
298
name : demomacos
226
299
path : demos.zip
227
300
228
- linuxRun :
229
- needs : linuxNative
230
- runs-on : ubuntu-20.04
231
-
232
- steps :
233
- - name : Install dependencies
234
- run : sudo apt-get update && sudo apt-get install -y xvfb x11-apps imagemagick
235
-
236
- - name : get linux demos
237
- uses : actions/download-artifact@v4
238
- with :
239
- name : demoLinux
240
-
241
- - name : launch and screenshot
242
- run : |
243
- unzip demos.zip
244
- cd PerlinWorld
245
- chmod +x PerlinWorld
246
- export DISPLAY=:99
247
- sudo Xvfb :99 -screen 0 800x600x24 &
248
- sleep 5
249
- MESA_GL_VERSION_OVERRIDE=3.3 ./PerlinWorld &
250
- export PID=$!
251
- sleep 10
252
- xwd -root -silent | convert xwd:- png:screenshot.png
253
- sleep 5 && kill $PID
254
- MESA_GL_VERSION_OVERRIDE=3.3 ./PerlinWorld map &
255
- export PID=$!
256
- sleep 10
257
- xwd -root -silent | convert xwd:- png:screenshot-map.png
258
- sleep 5 && kill $PID
259
-
260
- - name : upload artifact
261
- uses : actions/upload-artifact@v4
262
- with :
263
- name : screenshot
264
- path : PerlinWorld/screenshot.png
265
-
266
- - name : upload artifact
267
- uses : actions/upload-artifact@v4
268
- with :
269
- name : screenshot-map
270
- path : PerlinWorld/screenshot-map.png
271
-
272
- linuxXandroid :
301
+ android :
273
302
needs : [headers]
274
303
runs-on : ubuntu-20.04
275
304
@@ -278,7 +307,7 @@ jobs:
278
307
with :
279
308
submodules : ' recursive'
280
309
281
- - name : Install dependencies
310
+ - name : install dependencies
282
311
run : |
283
312
sudo apt-get update && sudo apt-get install -y build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools
284
313
wget https://dl.google.com/android/repository/android-ndk-r25c-linux.zip
@@ -295,7 +324,7 @@ jobs:
295
324
./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-34"
296
325
echo no | ./cmdline-tools/latest/bin/avdmanager create avd --name android34 --package "system-images;android-34;google_apis;x86_64"
297
326
298
- - name : build hop
327
+ - name : build
299
328
run : |
300
329
git submodule update --recursive
301
330
./build.sh -r --android android-ndk-r25c
@@ -352,7 +381,7 @@ jobs:
352
381
# path: screenshot-android.png
353
382
354
383
test-release :
355
- needs : [linuxNative , headers]
384
+ needs : [linux , headers]
356
385
runs-on : ubuntu-22.04
357
386
358
387
steps :
@@ -371,10 +400,10 @@ jobs:
371
400
with :
372
401
name : linuxbuild
373
402
374
- - name : Install dependencies
403
+ - name : install dependencies
375
404
run : sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools xvfb x11-apps imagemagick
376
405
377
- - name : linux lib test
406
+ - name : regression
378
407
run : |
379
408
ls
380
409
mv libHop-linux-x86_64.a libHop.a
@@ -388,7 +417,7 @@ jobs:
388
417
cmake .. && make
389
418
390
419
test-release-mingw :
391
- needs : [linuxXwindows , headers]
420
+ needs : [windows , headers]
392
421
runs-on : ubuntu-22.04
393
422
394
423
steps :
@@ -407,10 +436,10 @@ jobs:
407
436
with :
408
437
name : windowsbuild
409
438
410
- - name : Install dependencies
439
+ - name : install dependencies
411
440
run : sudo apt-get update && sudo apt-get install -y xorg-dev build-essential mesa-common-dev libx11-dev libxrandr-dev libgl1-mesa-dev libglu1-mesa-dev libfreetype6-dev libopenal-dev libsndfile1-dev libudev-dev g++-mingw-w64-x86-64-posix gcc-mingw-w64-x86-64-posix libz-mingw-w64-dev libxinerama-dev libxcursor-dev vulkan-tools libvulkan-dev vulkan-validationlayers-dev spirv-tools xvfb x11-apps imagemagick
412
441
413
- - name : mingw lib test
442
+ - name : regression
414
443
run : |
415
444
ls
416
445
mv libHop-windows.a libHop.a
@@ -422,7 +451,7 @@ jobs:
422
451
./build.sh
423
452
424
453
test-release-macos :
425
- needs : [macosNative , headers]
454
+ needs : [macos , headers]
426
455
runs-on : macos-13
427
456
428
457
steps :
@@ -441,7 +470,7 @@ jobs:
441
470
with :
442
471
name : macosbuild
443
472
444
- - name : Install dependencies
473
+ - name : install dependencies
445
474
run : |
446
475
wget https://sdk.lunarg.com/sdk/download/latest/mac/vulkan-sdk.zip -O vulkan-sdk.zip
447
476
unzip vulkan-sdk.zip
@@ -450,7 +479,7 @@ jobs:
450
479
cd ~/vulkan/
451
480
python install_vulkan.py
452
481
453
- - name : macos lib test
482
+ - name : regression
454
483
run : |
455
484
ls
456
485
mv libHop-macos.a libHop.a
@@ -463,7 +492,7 @@ jobs:
463
492
cmake .. -DCMAKE_TOOLCHAIN_FILE=../osx.cmake && make
464
493
465
494
release :
466
- needs : [linuxNative, linuxXwindows, linuxXandroid, macosNative , headers]
495
+ needs : [linux, windows, android, macos , headers]
467
496
if : github.ref_type == 'tag'
468
497
runs-on : ubuntu-20.04
469
498
0 commit comments