@@ -27,14 +27,19 @@ jobs:
2727 include :
2828 - os : macos-13 # x64
2929 rust-target : x86_64-apple-darwin
30+ node-target : darwin-x64
3031 - os : macos-14 # ARM
3132 rust-target : aarch64-apple-darwin
33+ node-target : darwin-arm64
3234 - os : ubuntu-24.04 # x64
3335 rust-target : x86_64-unknown-linux-musl
36+ node-target : linux-x64
3437 - os : ubuntu-24.04-arm # ARM
3538 rust-target : aarch64-unknown-linux-musl
39+ node-target : linux-arm64
3640 - os : windows-latest
3741 rust-target : x86_64-pc-windows-gnu
42+ node-target : win32-x64
3843
3944 runs-on : ${{matrix.os}}
4045
@@ -66,25 +71,22 @@ jobs:
6671 uses : dtolnay/rust-toolchain@master
6772 with :
6873 toolchain : stable
69- targets : ${{matrix.rust-target}}
74+ targets : ${{ matrix.rust-target }}
7075
7176 - name : Build rewatch
7277 if : steps.build-cache.outputs.cache-hit != 'true'
7378 run : cargo build --manifest-path rewatch/Cargo.toml --target ${{matrix.rust-target}} --release
7479
7580 - name : Copy rewatch exe to platform bin dir
7681 run : |
77- cp rewatch/target/${{matrix.rust-target}}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} rewatch
78- node ./scripts/copyExes.js -rewatch
79-
80- - name : Get artifact dir name
81- run : node .github/workflows/get_artifact_dir_name.js
82+ cp rewatch/target/${{ matrix.rust-target }}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} rewatch
83+ node scripts/copyExes.js --rewatch
8284
8385 - name : " Upload artifact: rewatch binary"
8486 uses : actions/upload-artifact@v4
8587 with :
86- name : rewatch-${{env.artifact_dir_name}}
87- path : ${{ env.artifact_dir_name }}
88+ name : rewatch-${{ env.artifact_dir_name }}
89+ path : packages/@rescript/ ${{ matrix.node-target }}/bin/rewatch.exe
8890
8991 build-compiler :
9092 strategy :
@@ -95,21 +97,26 @@ jobs:
9597 ocaml_compiler : ocaml-variants.5.3.0+options,ocaml-option-static
9698 upload_binaries : true
9799 upload_libs : true
100+ node-target : linux-x64
98101 - os : ubuntu-24.04-arm # ARM
99102 ocaml_compiler : ocaml-variants.5.3.0+options,ocaml-option-static
100103 upload_binaries : true
101104 # Build the playground compiler and run the benchmarks on the fastest runner
102105 build_playground : true
103106 benchmarks : true
107+ node-target : linux-arm64
104108 - os : macos-13 # x64
105109 ocaml_compiler : 5.3.0
106110 upload_binaries : true
111+ node-target : darwin-x64
107112 - os : macos-14 # ARM
108113 ocaml_compiler : 5.3.0
109114 upload_binaries : true
115+ node-target : darwin-arm64
110116 - os : windows-latest
111117 ocaml_compiler : 5.3.0
112118 upload_binaries : true
119+ node-target : win32-x64
113120
114121 # Verify that the compiler still builds with older OCaml versions
115122 - os : ubuntu-24.04
@@ -303,7 +310,7 @@ jobs:
303310 run : yarn install
304311
305312 - name : Copy compiler exes to platform bin dir
306- run : node ./ scripts/copyExes.js -compiler
313+ run : node scripts/copyExes.js - -compiler
307314
308315 - name : Restore ninja build cache
309316 id : ninja-build-cache
@@ -336,7 +343,7 @@ jobs:
336343
337344 - name : Copy ninja exe to platform bin dir
338345 if : steps.ninja-build-cache.outputs.cache-hit != 'true'
339- run : node ./ scripts/copyExes.js -ninja
346+ run : node scripts/copyExes.js - -ninja
340347
341348 - name : " Syntax: Run roundtrip tests"
342349 if : ${{ runner.os != 'Windows' }}
@@ -424,7 +431,7 @@ jobs:
424431 uses : actions/upload-artifact@v4
425432 with :
426433 name : binaries-${{ env.artifact_dir_name }}
427- path : ${{ env.artifact_dir_name }}
434+ path : packages/@rescript/ ${{ matrix.node-target }}/bin
428435
429436 - name : " Upload artifacts: lib/ocaml"
430437 if : matrix.upload_libs
@@ -491,15 +498,15 @@ jobs:
491498 matrix :
492499 include :
493500 - os : macos-13
494- target : darwin-x64
501+ node- target : darwin-x64
495502 - os : macos-14
496- target : darwin-arm64
503+ node- target : darwin-arm64
497504 - os : ubuntu-24.04
498- target : linux-x64
505+ node- target : linux-x64
499506 - os : ubuntu-24.04-arm
500- target : linux-arm64
507+ node- target : linux-arm64
501508 - os : windows-latest
502- target : win32-x64
509+ node- target : win32-x64
503510
504511 runs-on : ${{ matrix.os }}
505512
@@ -535,7 +542,7 @@ jobs:
535542 run : |
536543 npm i --ignore-scripts --no-audit \
537544 rescript-${{ needs.package.outputs.rescript_version }}.tgz \
538- rescript-${{ matrix.target }}-${{ needs.package.outputs.rescript_version }}.tgz
545+ rescript-${{ matrix.node- target }}-${{ needs.package.outputs.rescript_version }}.tgz
539546 shell : bash
540547 working-directory : ${{ steps.tmp-dir.outputs.path }}
541548
0 commit comments