-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Fix docker build OOMing in CI for arm64 builds #14173
Changes from 4 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +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 | |
|
||
RUN curl -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path --default-toolchain stable | ||
|
||
|
||
# arm64 builds consume a lot of memory if `CARGO_NET_GIT_FETCH_WITH_CLI` is not | ||
# set to true, so we expose it as a build-arg. | ||
ARG CARGO_NET_GIT_FETCH_WITH_CLI | ||
ENV CARGO_NET_GIT_FETCH_WITH_CLI=$CARGO_NET_GIT_FETCH_WITH_CLI | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. er, note that (I guess it won't do any harm, but it does seem like an odd variable for us to export to our image). Instead you have to do There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, though There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah yes, fair |
||
|
||
# To speed up rebuilds, install all of the dependencies before we copy over | ||
# the whole synapse project, so that this layer in the Docker cache can be | ||
# used while you develop on the source | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do ARGs become environment variables for the directives below them? (otherwise how does this work?!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, I believe so!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point, it doesn't look like it from a quick local test:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nyargh what
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh for gods sake,
RUN $TEST
would do the right thing, but we actually need anENV TEST=$TEST
I think