Skip to content

Commit fea7c77

Browse files
committed
Adds Rust support for ARM64 architecture
Enables Rust compilation for ARM64 architecture in the CI light Dockerfile. This change adds the necessary dependencies and configuration to build Rust-based projects on ARM64 platforms within the CI environment. It specifically installs `curl`, `libgcc`, `build-base`, and `musl-dev` and uses `rustup` to manage rust installations if the target platform is `linux/arm64`.
1 parent 196c102 commit fea7c77

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

flavors/ci_light/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,11 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \
9696
# Ignore npm package issues
9797
yarn config set ignore-engines true || true
9898

99+
ARG TARGETPLATFORM
100+
RUN [ "$TARGETPLATFORM" = "linux/arm64" ] && apk -U --no-cache upgrade && apk add --no-cache curl libgcc build-base musl-dev \
101+
&& curl https://sh.rustup.rs -sSf | sh -s -- -y || true
102+
ENV PATH="/root/.cargo/bin:${PATH}"
103+
99104
##############################
100105
# Installs rust dependencies #
101106
#############################################################################################
@@ -112,6 +117,7 @@ RUN mkdir -p ${GOPATH}/src ${GOPATH}/bin || true && \
112117
## @generated by .automation/build.py using descriptor files, please do not update manually ##
113118
#############################################################################################
114119

120+
115121
#PIPVENV__START
116122
RUN uv pip install --system --no-cache pip==${PIP_PIP_VERSION} virtualenv==${PIP_VIRTUALENV_VERSION} \
117123
&& uv venv --seed --no-project --no-managed-python --no-cache "/venvs/black" && VIRTUAL_ENV="/venvs/black" uv pip install --no-cache black==${PIP_BLACK_VERSION} \

0 commit comments

Comments
 (0)