This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree 3 files changed +11
-1
lines changed
3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 27
27
28
28
- name : Inspect builder
29
29
run : docker buildx inspect
30
-
30
+
31
31
- name : Log in to DockerHub
32
32
uses : docker/login-action@v2
33
33
with :
55
55
tags : " ${{ steps.set-tag.outputs.tags }}"
56
56
file : " docker/Dockerfile"
57
57
platforms : linux/amd64,linux/arm64
58
+ build-args :
59
+ # arm64 builds OOM otherwise. c.f. https://github.com/rust-lang/cargo/issues/10583
60
+ CARGO_NET_GIT_FETCH_WITH_CLI : true
Original file line number Diff line number Diff line change
1
+ Fix docker build OOMing in CI for arm64 builds.
Original file line number Diff line number Diff line change @@ -108,6 +108,12 @@ RUN mkdir /rust /cargo
108
108
109
109
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable
110
110
111
+
112
+ # arm64 builds consume a lot of memory if `CARGO_NET_GIT_FETCH_WITH_CLI` is not
113
+ # set to true, so we expose it as a build-arg.
114
+ ARG CARGO_NET_GIT_FETCH_WITH_CLI=false
115
+ ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_NET_GIT_FETCH_WITH_CLI
116
+
111
117
# To speed up rebuilds, install all of the dependencies before we copy over
112
118
# the whole synapse project, so that this layer in the Docker cache can be
113
119
# used while you develop on the source
You can’t perform that action at this time.
0 commit comments