@@ -11,74 +11,40 @@ concurrency:
11
11
group : ${{ github.ref }}
12
12
cancel-in-progress : true
13
13
14
- jobs :
15
- # Build statically linked Linux binaries in an Alpine-based Docker container
16
- # See https://ocamlpro.com/blog/2021_09_02_generating_static_and_portable_executables_with_ocaml
17
- # for more info.
18
- # The container already comes with all required tools pre-installed
19
- # (see https://github.com/rescript-lang/docker-rescript-ci-build/blob/main/Dockerfile).
20
- build-linux :
21
- strategy :
22
- fail-fast : false
23
- matrix :
24
- os : [ubuntu-latest, buildjet-2vcpu-ubuntu-2204-arm]
25
- # syntax explanation:
26
- # https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations
27
- include :
28
- - os : ubuntu-latest
29
- artifact-folder : linux
30
- - os : buildjet-2vcpu-ubuntu-2204-arm
31
- artifact-folder : linuxarm64
32
-
33
- runs-on : ${{matrix.os}}
34
-
35
- steps :
36
- - name : Checkout
37
- uses : actions/checkout@v4
38
-
39
- - name : Build
40
- uses : docker://ghcr.io/rescript-lang/rescript-ci-build:alpine-3.20-ocaml-5.2.0-01
41
- with :
42
- args : opam exec -- dune build --profile static
43
-
44
- - name : Copy and strip binaries
45
- run : |
46
- cp -f _build/install/default/bin/rescript-editor-analysis rescript-editor-analysis.exe
47
- cp -f _build/install/default/bin/rescript-tools rescript-tools.exe
48
- strip rescript-editor-analysis.exe rescript-tools.exe
49
-
50
- # Also avoids artifacts upload permission loss:
51
- # https://github.com/actions/upload-artifact/tree/ee69f02b3dfdecd58bb31b4d133da38ba6fe3700#permission-loss
52
- - name : Compress files
53
- run : |
54
- mkdir ${{matrix.artifact-folder}}
55
- mv rescript-editor-analysis.exe ${{matrix.artifact-folder}}
56
- mv rescript-tools.exe ${{matrix.artifact-folder}}
57
- tar -cvf binary.tar ${{matrix.artifact-folder}}
58
-
59
- - name : " Upload artifacts"
60
- uses : actions/upload-artifact@v4
61
- with :
62
- name : ${{matrix.artifact-folder}}
63
- path : binary.tar
64
-
14
+ jobs :
65
15
build :
66
16
strategy :
67
17
fail-fast : false
68
18
matrix :
69
19
os : [
70
20
macos-13, # x64
71
21
macos-14, # ARM
22
+ ubuntu-24.04, # x64
23
+ ubuntu-24.04-arm, # ARM
72
24
windows-latest,
73
25
]
74
26
# syntax explanation:
75
27
# https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#example-including-additional-values-into-combinations
76
28
include :
77
29
- os : macos-13
30
+ ocaml-compiler : 5.2.1
31
+ dune-profile : release
78
32
artifact-folder : darwin
79
33
- os : macos-14
34
+ ocaml-compiler : 5.2.1
35
+ dune-profile : release
80
36
artifact-folder : darwinarm64
37
+ - os : ubuntu-24.04
38
+ ocaml-compiler : ocaml-variants.5.2.1+options,ocaml-option-static
39
+ dune-profile : static
40
+ artifact-folder : linux
41
+ - os : ubuntu-24.04-arm
42
+ ocaml-compiler : ocaml-variants.5.2.1+options,ocaml-option-static
43
+ dune-profile : static
44
+ artifact-folder : linuxarm64
81
45
- os : windows-latest
46
+ ocaml-compiler : 5.2.1
47
+ dune-profile : release
82
48
artifact-folder : win32
83
49
84
50
runs-on : ${{matrix.os}}
101
67
- name : Use OCaml
102
68
uses : ocaml/setup-ocaml@v3
103
69
with :
104
- ocaml-compiler : 5.2.0
70
+ ocaml-compiler : ${{matrix.ocaml-compiler}}
105
71
opam-pin : false
106
72
107
73
- name : Use Node.js
120
86
# - run: opam pin add rescript-editor-analysis.dev . --no-action
121
87
# - run: opam install . --deps-only --with-doc --with-test
122
88
89
+ - name : Set dune profile according to platform
90
+ run : echo "DUNE_PROFILE=${{ matrix.dune-profile }}" >> $GITHUB_ENV
91
+
123
92
- name : Build
124
93
run : opam exec -- make
125
94
@@ -147,8 +116,7 @@ jobs:
147
116
package :
148
117
needs :
149
118
- build
150
- - build-linux
151
- runs-on : ubuntu-latest
119
+ runs-on : ubuntu-24.04
152
120
153
121
steps :
154
122
- uses : actions/checkout@v4
0 commit comments