File tree 2 files changed +30
-6
lines changed
2 files changed +30
-6
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,24 @@ jobs:
103
103
- name : Checkout
104
104
uses : actions/checkout@v4
105
105
106
- - name : Build compiler binaries
107
- uses : docker://ghcr.io/rescript-lang/rescript-ci-build:alpine-3.20-ocaml-5.2.0-01
106
+ - name : Setup Docker buildx
107
+ uses : docker/setup-buildx-action@v3
108
108
with :
109
- args : opam exec -- dune build --display quiet --profile static
109
+ driver : docker # defaults to "docker-containerized"
110
110
111
- - name : Build ninja binary
112
- uses : docker://ghcr.io/rescript-lang/rescript-ci- build:alpine-3.20-ocaml-5.2.0-01
111
+ - name : Build Docker image
112
+ uses : docker/ build-push-action@v6
113
113
with :
114
- args : sh -c "cd ninja && LDFLAGS=-static python configure.py --bootstrap"
114
+ context : ./docker
115
+ tags : rescript-ci-build:latest
116
+ cache-from : type=gha
117
+ cache-to : type=gha,mode=max
118
+
119
+ - name : Build compiler binaries
120
+ run : docker run --rm -v ${{ github.workspace }}:/data -w /data rescript-ci-build:latest opam exec -- dune build --display quiet --profile static
121
+
122
+ - name : Build ninja binary
123
+ run : docker run --rm -v ${{ github.workspace }}:/data -w /data/ninja -e LDFLAGS="-static" rescript-ci-build:latest python configure.py --bootstrap
115
124
116
125
- name : Use Node.js
117
126
uses : actions/setup-node@v4
Original file line number Diff line number Diff line change
1
+ FROM alpine:3.20
2
+ LABEL org.opencontainers.image.authors=
"Christoph Knittel <[email protected] >"
3
+ LABEL org.opencontainers.image.description="Alpine-based Docker image for building statically linked ReScript binaries."
4
+
5
+ # - gcompat needed for ARM64, see https://github.com/actions/runner/issues/801#issuecomment-1374967227
6
+ # - python3 needed for ninja build
7
+ RUN apk add --no-cache bash gcc g++ git make opam python3 rsync gcompat
8
+
9
+ # We need to specify the OPAM dir explicitly as the GitHub Actions runner
10
+ # will set a different home directory when running in a container.
11
+ ENV OPAMROOT=/root/.opam
12
+
13
+ RUN opam init -y --compiler=5.2.0 --disable-sandboxing
14
+
15
+ RUN opam install -y dune cppo=1.6.9 ounit2=2.2.7
You can’t perform that action at this time.
0 commit comments