@@ -107,7 +107,7 @@ jobs:
107
107
echo "linux=true" >> $GITHUB_OUTPUT;
108
108
echo "macos=true" >> $GITHUB_OUTPUT;
109
109
echo "windows=true" >> $GITHUB_OUTPUT;
110
-
110
+
111
111
112
112
# #####################################################################################
113
113
@@ -123,7 +123,7 @@ jobs:
123
123
steps :
124
124
# Checkout the actions for this repo owner
125
125
- name : Checkout Actions
126
- uses : actions/checkout@v3
126
+ uses : actions/checkout@v4
127
127
with :
128
128
repository : ${{ github.repository_owner }}/.github
129
129
path : ./Actions_${{ github.sha }}
@@ -157,15 +157,15 @@ jobs:
157
157
steps :
158
158
# Checkout the actions for this repo owner
159
159
- name : Checkout Actions
160
- uses : actions/checkout@v3
160
+ uses : actions/checkout@v4
161
161
with :
162
162
repository : ${{ github.repository_owner }}/.github
163
163
path : ./Actions_${{ github.sha }}
164
164
- run : mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
165
165
166
166
# Checkout the branch
167
167
- name : Checkout
168
- uses : actions/checkout@v3
168
+ uses : actions/checkout@v4
169
169
170
170
# Setup release tag
171
171
- name : Setup Release Tag
@@ -272,11 +272,11 @@ jobs:
272
272
273
273
# Checkout the branch
274
274
- name : Checkout
275
- uses : actions/checkout@v3
275
+ uses : actions/checkout@v4
276
276
277
277
# Checkout the actions for this repo owner
278
278
- name : Checkout Actions
279
- uses : actions/checkout@v3
279
+ uses : actions/checkout@v4
280
280
with :
281
281
repository : ${{ github.repository_owner }}/.github
282
282
path : ./Actions_${{ github.sha }}
@@ -324,7 +324,7 @@ jobs:
324
324
export LDEARCH=aarch64-apple-darwin
325
325
./makeright init
326
326
mkdir -p ../darwin.universal
327
- exe=ldeinit
327
+ exe=ldeinit
328
328
lipo -create \
329
329
-arch arm64 ../darwin.aarch64/${exe} \
330
330
-arch x86_64 ../darwin.x86_64/${exe} \
@@ -346,7 +346,7 @@ jobs:
346
346
lipo ${exe} -output ../darwin.x86_64/${exe} -extract x86_64
347
347
lipo ${exe} -output ../darwin.aarch64/${exe} -extract arm64
348
348
cp -p ${exe} ../darwin.universal/${exe}
349
- done
349
+ done
350
350
351
351
# Create release tar for github.
352
352
- name : Make release tar(s)
@@ -369,7 +369,7 @@ jobs:
369
369
# Push Release
370
370
- name : Push the release
371
371
uses : ncipollo/release-action@v1
372
- with :
372
+ with :
373
373
allowUpdates : true
374
374
artifacts :
375
375
/tmp/release_tars/${{ steps.tag.outputs.release_tag }}-darwin.x86_64.tgz,
@@ -383,7 +383,7 @@ jobs:
383
383
384
384
# Windows: build for Windows-Cygwin via Docker build and use results to
385
385
# create and push release assets to github
386
-
386
+
387
387
windows :
388
388
389
389
needs : [inputs, sentry]
@@ -418,21 +418,21 @@ jobs:
418
418
# Retrieve SDL2 and install in cygwin
419
419
- name : Install SDL2
420
420
id : sdl2
421
- env :
421
+ env :
422
422
GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
423
423
run : |
424
424
gh release download 2.26.5 --repo interlisp/cygwin-sdl --pattern *.tgz --output .\cygwin\sdl2.tar.gz
425
425
cygwin\bin\bash -login -c 'cd /; tar xzf sdl2.tar.gz'
426
426
427
427
# Checkout the branch
428
428
- name : Checkout
429
- uses : actions/checkout@v3
429
+ uses : actions/checkout@v4
430
430
with :
431
431
path : cygwin\maiko
432
432
433
433
# Checkout the actions for this repo owner
434
434
- name : Checkout Actions
435
- uses : actions/checkout@v3
435
+ uses : actions/checkout@v4
436
436
with :
437
437
repository : ${{ github.repository_owner }}/.github
438
438
path : ./Actions_${{ github.sha }}
@@ -473,6 +473,80 @@ jobs:
473
473
474
474
475
475
476
+ # #####################################################################################
477
+
478
+ # Emscripten: build and push Maiko compiled for Emscripten (to run Maiko in browser)
479
+
480
+ emscripten :
481
+
482
+ needs : [inputs, sentry]
483
+ if : |
484
+ needs.inputs.outputs.linux == 'true'
485
+ && (
486
+ needs.sentry.outputs.release_not_built == 'true'
487
+ || needs.inputs.outputs.force == 'true'
488
+ )
489
+
490
+ runs-on : ubuntu-latest
491
+
492
+ steps :
493
+
494
+ # Checkout the actions for this repo owner
495
+ - name : Checkout Actions
496
+ uses : actions/checkout@v4
497
+ with :
498
+ repository : ${{ github.repository_owner }}/.github
499
+ path : ./Actions_${{ github.sha }}
500
+ - run : mv ./Actions_${{ github.sha }}/actions ../actions && rm -rf ./Actions_${{ github.sha }}
501
+
502
+ # Install SDL2
503
+ - name : Install SDL2
504
+ run : |
505
+ export DEBIAN_FRONTEND=noninteractive
506
+ sudo -E apt-get install -y libsdl2-dev libsdl2-2.0-0
507
+
508
+ # Install Emscripten SDK
509
+ - name : Install Empscripten
510
+ working-directory : ../
511
+ run : |
512
+ git clone https://github.com/emscripten-core/emsdk.git
513
+ cd emsdk
514
+ ./emsdk install latest
515
+ ./emsdk activate latest
516
+ CWD="$(pwd)"
517
+ echo "${CWD}" >> ${GITHUB_PATH}
518
+ echo "${CWD}/upstream/emscripten" >> ${GITHUB_PATH}
519
+ echo "${CWD}/upstream/emscripten/tools" >> ${GITHUB_PATH}
520
+ echo "${CWD}/node/$(ls -d node/*64bit | tail -1)/bin" >> ${GITHUB_PATH}
521
+
522
+ # Checkout the maiko branch
523
+ - name : Checkout
524
+ uses : actions/checkout@v4
525
+
526
+ # Setup release tag
527
+ - name : Setup Release Tag
528
+ id : tag
529
+ uses : ./../actions/release-tag-action
530
+
531
+ # Compile maiko using Emscripten (no load build)
532
+ - name : Compile Maiko using Emscripten
533
+ working-directory : ./bin
534
+ run : |
535
+ ./makeright wasm_nl
536
+ cd ../emscripten.wasm_nl
537
+ tar -c -z -f ../${{ steps.tag.outputs.release_tag }}-emscripten.tgz *
538
+
539
+ # Push Release to github
540
+ - name : Push the release
541
+ uses : ncipollo/release-action@v1
542
+ with :
543
+ allowUpdates : true
544
+ artifacts : ${{ steps.tag.outputs.release_tag }}-emscripten.tgz
545
+ tag : ${{ steps.tag.outputs.release_tag }}
546
+ draft : ${{ needs.inputs.outputs.draft }}
547
+ token : ${{ secrets.GITHUB_TOKEN }}
548
+
549
+
476
550
# #####################################################################################
477
551
478
552
# Use set-sentry-action to determine set the sentry that says this release has
@@ -485,12 +559,12 @@ jobs:
485
559
outputs :
486
560
build_successful : ${{ steps.output.outputs.build_successful }}
487
561
488
- needs : [inputs, sentry, linux, macos, windows]
562
+ needs : [inputs, sentry, linux, macos, windows, emscripten ]
489
563
490
564
steps :
491
565
# Checkout the actions for this repo owner
492
566
- name : Checkout Actions
493
- uses : actions/checkout@v3
567
+ uses : actions/checkout@v4
494
568
with :
495
569
repository : ${{ github.repository_owner }}/.github
496
570
path : ./Actions_${{ github.sha }}
0 commit comments