89
89
name : rewatch-${{env.artifact_dir_name}}
90
90
path : ${{ env.artifact_dir_name }}
91
91
92
- # Build statically linked Linux binaries in an Alpine-based Docker container
93
- # See https://ocamlpro.com/blog/2021_09_02_generating_static_and_portable_executables_with_ocaml
94
- # for more info.
95
- # The container already comes with all required tools pre-installed
96
- # (see https://github.com/rescript-lang/docker-rescript-ci-build/blob/main/Dockerfile).
97
- # Note: Static ARM64 binaries cannot be built directly on Ubuntu runner because of
98
- # https://github.com/ocaml/opam-repository/issues/26216
99
- build-compiler-linux-arm :
100
- runs-on : buildjet-2vcpu-ubuntu-2204-arm
101
-
102
- steps :
103
- - name : Checkout
104
- uses : actions/checkout@v4
105
-
106
- - name : Build compiler binaries
107
- uses : docker://ghcr.io/rescript-lang/rescript-ci-build:alpine-3.20-ocaml-5.2.0-01
108
- with :
109
- args : opam exec -- dune build --display quiet --profile static
110
-
111
- - name : Build ninja binary
112
- uses : docker://ghcr.io/rescript-lang/rescript-ci-build:alpine-3.20-ocaml-5.2.0-01
113
- with :
114
- args : sh -c "cd ninja && LDFLAGS=-static python configure.py --bootstrap"
115
-
116
- - name : Use Node.js
117
- uses : actions/setup-node@v4
118
- with :
119
- node-version : 18
120
-
121
- - name : Get artifact dir name
122
- run : node .github/workflows/get_artifact_dir_name.js
123
-
124
- - name : Copy exes to platform bin dir
125
- run : |
126
- node ./scripts/copyExes.js -compiler
127
- node ./scripts/copyExes.js -ninja
128
-
129
- - name : " Upload artifacts: binaries"
130
- uses : actions/upload-artifact@v4
131
- with :
132
- name : binaries-${{ env.artifact_dir_name }}
133
- path : ${{ env.artifact_dir_name }}
134
-
135
92
build-compiler :
136
93
strategy :
137
94
fail-fast : false
@@ -143,6 +100,9 @@ jobs:
143
100
upload_libs : true
144
101
# Build the playground compiler on the fastest runner
145
102
build_playground : true
103
+ - os : buildjet-2vcpu-ubuntu-2204-arm # ARM
104
+ ocaml_compiler : ocaml-variants.5.2.0+options,ocaml-option-static
105
+ upload_binaries : true
146
106
- os : macos-13 # x64
147
107
ocaml_compiler : 5.2.0
148
108
upload_binaries : true
@@ -224,6 +184,8 @@ jobs:
224
184
uses : ocaml/setup-ocaml@v3.0.0
225
185
if : steps.cache-opam-env.outputs.cache-hit != 'true'
226
186
with :
187
+ opam-repositories : |
188
+ default: https://github.com/rescript-lang/opam-repository.git
227
189
ocaml-compiler : ${{matrix.ocaml_compiler}}
228
190
opam-pin : false
229
191
@@ -422,7 +384,6 @@ jobs:
422
384
package :
423
385
needs :
424
386
- build-compiler
425
- - build-compiler-linux-arm
426
387
- build-rewatch
427
388
428
389
runs-on : ubuntu-latest
0 commit comments