@@ -2,9 +2,6 @@ name: Build
2
2
3
3
on :
4
4
push :
5
- # release:
6
- # types:
7
- # - created
8
5
9
6
jobs :
10
7
linux :
@@ -232,9 +229,87 @@ jobs:
232
229
name : macos
233
230
path : ${{ env.VULKAN_ROOT_LOCATION }}/macOS/lib/libvulkan.1.dylib
234
231
232
+ macos-m1 :
233
+ runs-on : self-hosted
234
+
235
+ steps :
236
+ - uses : actions/checkout@v2
237
+ with :
238
+ submodules : true
239
+
240
+ - name : Setup env
241
+ run : echo "VULKAN_ROOT_LOCATION=$VULKAN_ROOT_LOCATION" >> $GITHUB_ENV
242
+
243
+ - run : arch -arm64 cmake -DSPACEMESHCUDA=OFF .
244
+
245
+ - run : arch -arm64 make
246
+
247
+ - name : Copy library
248
+ run : cp src/libgpu-setup.dylib test/libgpu-setup.dylib
249
+
250
+ - name : Fix library import paths
251
+ run : arch -arm64 install_name_tool -add_rpath @loader_path test/libgpu-setup.dylib
252
+
253
+ - name : Unit tests - Golden vectors
254
+ run : arch -arm64 test/gpu-setup-test --test-vector-check
255
+
256
+ - name : Unit tests - hash and bitstream
257
+ run : arch -arm64 test/gpu-setup-test --unit-tests
258
+
259
+ - name : Unit tests - PoW
260
+ run : arch -arm64 test/gpu-setup-test -tp -d 18 -id 0xe26b543725490682675f6f84ea7689601adeaf14caa7024ec1140c82754ca339 --salt 0x165310acce39719148915c356f25c5cb78e82203222cccdf3c15a9c3684e08cb -si 126202
261
+
262
+ - name : Unit tests - label lengths
263
+ run : arch -arm64 test/gpu-setup-test -il
264
+
265
+ - name : Unit tests - labels count
266
+ run : arch -arm64 test/gpu-setup-test -in
267
+
268
+ - name : Integration tests - concurrency test
269
+ run : arch -arm64 test/gpu-setup-test -ip
270
+
271
+ - name : Integration tests - cancelation test
272
+ run : arch -arm64 test/gpu-setup-test -ic
273
+
274
+ - name : Upload library
275
+ uses : actions/upload-artifact@v2
276
+ with :
277
+ name : macos-m1
278
+ path : src/libgpu-setup.dylib
279
+
280
+ - name : Upload test app
281
+ uses : actions/upload-artifact@v2
282
+ with :
283
+ name : macos-m1
284
+ path : test/gpu-setup-test
285
+
286
+ - name : Upload api.h
287
+ uses : actions/upload-artifact@v2
288
+ with :
289
+ name : macos-m1
290
+ path : include/api.h
291
+
292
+ - name : Upload MoltenVK
293
+ uses : actions/upload-artifact@v2
294
+ with :
295
+ name : macos-m1
296
+ path : ${{ env.VULKAN_ROOT_LOCATION }}/MoltenVK/dylib/macOS/libMoltenVK.dylib
297
+
298
+ - name : Upload MoltenVK config
299
+ uses : actions/upload-artifact@v2
300
+ with :
301
+ name : macos-m1
302
+ path : ${{ env.VULKAN_ROOT_LOCATION }}/MoltenVK/dylib/macOS/MoltenVK_icd.json
303
+
304
+ - name : Upload Vulkan
305
+ uses : actions/upload-artifact@v2
306
+ with :
307
+ name : macos-m1
308
+ path : ${{ env.VULKAN_ROOT_LOCATION }}/macOS/lib/libvulkan.1.dylib
309
+
235
310
release :
236
311
runs-on : ubuntu-latest
237
- needs : [linux, windows, macos]
312
+ needs : [linux, windows, macos, macos-m1 ]
238
313
env :
239
314
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
240
315
if : startsWith(github.ref, 'refs/tags/v')
@@ -282,6 +357,9 @@ jobs:
282
357
# asset_name: libgpu-setup-macos-${{ env.VERSION }}.zip
283
358
# asset_content_type: application/zip
284
359
360
+ - name : Archive MacOS-M1 Library
361
+ run : zip --junk-paths libgpu-setup-macos-m1-${{ env.VERSION }}.zip macos-m1/*
362
+
285
363
- name : Release
286
364
uses : softprops/action-gh-release@v1
287
365
with :
@@ -290,6 +368,6 @@ jobs:
290
368
libgpu-setup-linux-${{ env.VERSION }}.zip
291
369
libgpu-setup-windows-${{ env.VERSION }}.zip
292
370
libgpu-setup-macos-${{ env.VERSION }}.zip
371
+ libgpu-setup-macos-m1-${{ env.VERSION }}.zip
293
372
env :
294
373
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
295
-
0 commit comments