Add remote server cross compilation (#19136)

This will allow us to compile debug builds of the remote-server for a
different architecture than the one we are developing on.

This also adds a CI step for building our remote server with minimal
dependencies.

Release Notes:

- N/A
This commit is contained in:
Mikayla Maki 2024-10-12 23:23:56 -07:00 committed by GitHub
parent f73a076a63
commit bebe24ea77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 542 additions and 161 deletions

17
Dockerfile-cross Normal file
View file

@ -0,0 +1,17 @@
# syntax=docker/dockerfile:1
ARG CROSS_BASE_IMAGE
FROM ${CROSS_BASE_IMAGE}
WORKDIR /app
ARG TZ=Etc/UTC \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
DEBIAN_FRONTEND=noninteractive
ENV CARGO_TERM_COLOR=always
COPY script/install-mold script/
RUN ./script/install-mold "2.34.0"
COPY script/remote-server script/
RUN ./script/remote-server
COPY . .