4
4
schedule :
5
5
- cron : " 0 20 * * *" # At 8 PM UTC, which is 3 AM UTC+7
6
6
push :
7
- branches :
8
- - main
9
7
tags : ["v[0-9]+.[0-9]+.[0-9]+"]
10
8
paths :
11
9
[
@@ -297,11 +295,9 @@ jobs:
297
295
mkdir -p nitro
298
296
cp llama.cpp/ggml-metal.metal nitro/
299
297
cp build/nitro nitro/
300
- tar -czvf nitro.tar.gz nitro
301
298
302
299
- name : Upload Artifact
303
300
uses : actions/upload-artifact@v2
304
- if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
305
301
with :
306
302
name : nitro-mac-arm64
307
303
path : ./nitro
@@ -330,16 +326,6 @@ jobs:
330
326
chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }}
331
327
rm -rf uploads/
332
328
333
-
334
- if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
335
- env :
336
- GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
337
- with :
338
- upload_url : ${{ needs.create-draft-release.outputs.upload_url }}
339
- asset_path : ./nitro.tar.gz
340
- asset_name : nitro-${{ needs.create-draft-release.outputs.version }}-mac-arm64.tar.gz
341
- asset_content_type : application/gzip
342
-
343
329
macOS-amd64-build :
344
330
runs-on : macos-latest
345
331
needs : [create-draft-release, set-nitro-version]
@@ -375,11 +361,9 @@ jobs:
375
361
run : |
376
362
mkdir -p nitro
377
363
cp build/nitro nitro/
378
- tar -czvf nitro.tar.gz nitro
379
364
380
365
- name : Upload Artifact
381
366
uses : actions/upload-artifact@v2
382
- if : github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event_name == 'pull_request'
383
367
with :
384
368
name : nitro-mac-amd64
385
369
path : ./nitro
@@ -400,14 +384,48 @@ jobs:
400
384
chmod +x ../.github/scripts/e2e-test-whisper-linux-and-mac.sh && ../.github/scripts/e2e-test-whisper-linux-and-mac.sh ./nitro ${{ env.WHISPER_MODEL_URL }}
401
385
rm -rf uploads/
402
386
387
+ universal-nitro-artifact-macos :
388
+ runs-on : macos-latest
389
+ needs : [create-draft-release, set-nitro-version, macOS-silicon-build, macOS-amd64-build]
390
+ if : always() && (needs.create-draft-release.result == 'success' || needs.create-draft-release.result == 'skipped') && needs.set-nitro-version.result == 'success'
391
+ timeout-minutes : 20
392
+ permissions :
393
+ contents : write
394
+ steps :
395
+ - name : download artifact amd64
396
+ uses : actions/download-artifact@v2
397
+ with :
398
+ name : nitro-mac-amd64
399
+ path : ./nitro-mac-amd64
400
+
401
+ - name : download artifact arm64
402
+ uses : actions/download-artifact@v2
403
+ with :
404
+ name : nitro-mac-arm64
405
+ path : ./nitro-mac-arm64
406
+
407
+ - name : bundle universal binary
408
+ run : |
409
+ mkdir -p nitro
410
+ ls ./nitro-mac-amd64
411
+ lipo -create ./nitro-mac-amd64/nitro ./nitro-mac-arm64/nitro -output ./nitro/nitro
412
+ cp ./nitro-mac-arm64/ggml-metal.metal ./nitro/ggml-metal.metal
413
+ tar -czvf nitro.tar.gz nitro
414
+
415
+ - name : Upload Artifact
416
+ uses : actions/upload-artifact@v2
417
+ with :
418
+ name : nitro-mac-universal
419
+ path : ./nitro
420
+
403
421
404
422
if : github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
405
423
env :
406
424
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
407
425
with :
408
426
upload_url : ${{ needs.create-draft-release.outputs.upload_url }}
409
427
asset_path : ./nitro.tar.gz
410
- asset_name : nitro-${{ needs.create-draft-release.outputs.version }}-mac-amd64 .tar.gz
428
+ asset_name : nitro-${{ needs.create-draft-release.outputs.version }}-mac-universal .tar.gz
411
429
asset_content_type : application/gzip
412
430
413
431
windows-amd64-build :
0 commit comments