File tree 2 files changed +29
-6
lines changed
2 files changed +29
-6
lines changed Original file line number Diff line number Diff line change @@ -103,15 +103,23 @@ 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
+
109
+ - name : Build Docker image
110
+ uses : docker/build-push-action@v6
108
111
with :
109
- args : opam exec -- dune build --display quiet --profile static
112
+ context : ./docker
113
+ tags : rescript-ci-build:latest
114
+ load : true
115
+ cache-from : type=gha
116
+ cache-to : type=gha,mode=max
117
+
118
+ - name : Build compiler binaries
119
+ run : docker run --rm -v ${{ github.workspace }}:/data -w /data rescript-ci-build:latest opam exec -- dune build --display quiet --profile static
110
120
111
121
- 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"
122
+ run : docker run --rm -v ${{ github.workspace }}:/data -w /data/ninja -e LDFLAGS="-static" rescript-ci-build:latest python configure.py --bootstrap
115
123
116
124
- name : Use Node.js
117
125
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