@@ -75,14 +75,19 @@ jobs:
75
75
if : steps.build-cache.outputs.cache-hit != 'true'
76
76
run : cargo build --manifest-path rewatch/Cargo.toml --target ${{matrix.rust-target}} --release
77
77
78
+ - name : Copy exe to platform bin dirs
79
+ run : |
80
+ cp rewatch/target/${{matrix.rust-target}}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }} rewatch
81
+ node ./scripts/copyExes.js -rewatch
82
+
78
83
- name : Get artifact dir name
79
84
run : node .github/workflows/get_artifact_dir_name.js
80
85
81
86
- name : " Upload artifact: rewatch binary"
82
87
uses : actions/upload-artifact@v4
83
88
with :
84
89
name : rewatch-${{env.artifact_dir_name}}
85
- path : rewatch/target/ ${{matrix.rust-target}}/release/rewatch${{ runner.os == 'Windows' && '.exe' || '' }}
90
+ path : ${{ env.artifact_dir_name }}
86
91
87
92
# Build statically linked Linux binaries in an Alpine-based Docker container
88
93
# See https://ocamlpro.com/blog/2021_09_02_generating_static_and_portable_executables_with_ocaml
@@ -108,32 +113,6 @@ jobs:
108
113
with :
109
114
args : sh -c "cd ninja && LDFLAGS=-static python configure.py --bootstrap"
110
115
111
- - name : " Upload artifacts"
112
- uses : actions/upload-artifact@v4
113
- with :
114
- name : static-binaries-linux-${{runner.arch}}
115
- path : |
116
- _build/install/default/bin
117
- ninja/ninja
118
-
119
- # The full build including tests does not work on Linux ARM because setup-ocaml fails.
120
- # Therefore, only upload the binaries from the static build
121
- upload-linux-arm64-binaries :
122
- needs :
123
- - build-rewatch
124
- - static-binaries-linux-arm
125
-
126
- runs-on : buildjet-2vcpu-ubuntu-2204-arm
127
-
128
- steps :
129
- - name : Checkout
130
- uses : actions/checkout@v4
131
-
132
- - name : Download static linux binaries
133
- uses : actions/download-artifact@v4
134
- with :
135
- name : static-binaries-linux-${{ runner.arch }}
136
-
137
116
- name : Use Node.js
138
117
uses : actions/setup-node@v4
139
118
with :
@@ -142,14 +121,8 @@ jobs:
142
121
- name : Get artifact dir name
143
122
run : node .github/workflows/get_artifact_dir_name.js
144
123
145
- - name : Download rewatch binary
146
- uses : actions/download-artifact@v4
147
- with :
148
- name : rewatch-${{ env.artifact_dir_name }}
149
- path : rewatch
150
-
151
124
- name : Copy exes to platform bin dirs
152
- run : node ./scripts/copyExes.js
125
+ run : node ./scripts/copyExes.js -compiler
153
126
154
127
- name : " Upload artifacts: binaries"
155
128
uses : actions/upload-artifact@v4
@@ -158,9 +131,6 @@ jobs:
158
131
path : ${{ env.artifact_dir_name }}
159
132
160
133
build :
161
- needs :
162
- - build-rewatch
163
-
164
134
strategy :
165
135
fail-fast : false
166
136
matrix :
@@ -197,12 +167,6 @@ jobs:
197
167
- name : Get artifact dir name
198
168
run : node .github/workflows/get_artifact_dir_name.js
199
169
200
- - name : Download rewatch binary
201
- uses : actions/download-artifact@v4
202
- with :
203
- name : rewatch-${{ env.artifact_dir_name }}
204
- path : rewatch
205
-
206
170
- name : Install dependencies (Linux)
207
171
if : runner.os == 'Linux'
208
172
@@ -345,7 +309,7 @@ jobs:
345
309
run : node scripts/buildNinjaBinary.js
346
310
347
311
- name : Copy exes to platform bin dirs
348
- run : node ./scripts/copyExes.js
312
+ run : node ./scripts/copyExes.js -compiler
349
313
350
314
- name : " Check if syntax subfolder has changed"
351
315
id : syntax-diff
@@ -424,7 +388,11 @@ jobs:
424
388
path : lib/ocaml
425
389
426
390
package :
427
- needs : build
391
+ needs :
392
+ - build
393
+ - build-rewatch
394
+ - static-binaries-linux-arm
395
+
428
396
runs-on : ubuntu-latest
429
397
430
398
steps :
@@ -442,7 +410,7 @@ jobs:
442
410
- name : Download artifacts
443
411
uses : actions/download-artifact@v4
444
412
with :
445
- pattern : " @(binaries-*|lib-ocaml)"
413
+ pattern : " @(binaries-*|rewatch-*| lib-ocaml)"
446
414
447
415
- name : Move artifacts
448
416
run : ./scripts/moveArtifacts.sh
0 commit comments