@@ -20,18 +20,18 @@ jobs:
20
20
# for more info.
21
21
# The container already comes with all required tools pre-installed
22
22
# (see https://github.com/rescript-lang/docker-rescript-ci-build/blob/main/Dockerfile).
23
- static-binaries-linux :
23
+ static-binaries-linux-amd64 :
24
24
runs-on : ubuntu-latest
25
25
26
26
container :
27
- image : ghcr.io/rescript-lang/rescript-ci-build:v1.0.0
27
+ image : ghcr.io/rescript-lang/rescript-ci-build:main
28
28
29
29
steps :
30
30
- name : Checkout
31
31
uses : actions/checkout@v3
32
32
33
33
- name : Build compiler binaries
34
- run : opam exec -- dune build --profile static
34
+ run : opam exec -- dune build --display quiet -- profile static
35
35
36
36
- name : Build ninja binary
37
37
working-directory : ninja
@@ -42,18 +42,58 @@ jobs:
42
42
- name : " Upload artifacts"
43
43
uses : actions/upload-artifact@v3
44
44
with :
45
- name : static-binaries-linux
45
+ name : static-binaries-linux-amd64
46
+ path : |
47
+ _build/install/default/bin
48
+ ninja/ninja
49
+
50
+ static-binaries-linux-arm64 :
51
+ runs-on : buildjet-2vcpu-ubuntu-2204-arm
52
+
53
+ container :
54
+ image : ghcr.io/rescript-lang/rescript-ci-build:main
55
+
56
+ steps :
57
+ # See https://github.com/actions/runner/issues/801#issuecomment-1374967227.
58
+ - name : Workaround for Github actions runner on Alpine arm64
59
+ run : sed -i "s:ID=alpine:ID=NotpineForGHA:" /etc/os-release
60
+
61
+ - name : Checkout
62
+ uses : actions/checkout@v3
63
+
64
+ - name : Build compiler binaries
65
+ run : opam exec -- dune build --display quiet --profile static
66
+
67
+ - name : Build ninja binary
68
+ working-directory : ninja
69
+ env :
70
+ LDFLAGS : -static
71
+ run : python3 configure.py --bootstrap --verbose
72
+
73
+ - name : " Upload artifacts"
74
+ uses : actions/upload-artifact@v3
75
+ with :
76
+ name : static-binaries-linux-arm64
46
77
path : |
47
78
_build/install/default/bin
48
79
ninja/ninja
49
80
50
81
build :
51
- needs : static-binaries-linux
82
+ needs :
83
+ - static-binaries-linux-amd64
84
+ - static-binaries-linux-arm64
52
85
53
86
strategy :
54
87
fail-fast : false
55
88
matrix :
56
- os : [macos-latest, ubuntu-latest, windows-latest, macos-arm]
89
+ os :
90
+ [
91
+ macos-latest,
92
+ macos-arm,
93
+ ubuntu-22.04,
94
+ buildjet-2vcpu-ubuntu-2204-arm,
95
+ windows-latest,
96
+ ]
57
97
ocaml_compiler : [4.14.0]
58
98
59
99
runs-on : ${{matrix.os}}
@@ -73,11 +113,17 @@ jobs:
73
113
with :
74
114
fetch-depth : 2 # to be able to check for changes in subfolder res_syntax later
75
115
76
- - name : Download static linux binaries
77
- if : runner.os == 'Linux'
116
+ - name : Download static linux binaries (amd64)
117
+ if : runner.os == 'Linux' && runner.arch == "X64"
118
+ uses : actions/download-artifact@v3
119
+ with :
120
+ name : static-binaries-linux-amd64
121
+
122
+ - name : Download static linux binaries (arm64)
123
+ if : runner.os == 'Linux' && runner.arch == "ARM64"
78
124
uses : actions/download-artifact@v3
79
125
with :
80
- name : static-binaries-linux
126
+ name : static-binaries-linux-arm64
81
127
82
128
- name : Make static linux binaries executable
83
129
if : runner.os == 'Linux'
0 commit comments