ci: build musl only for arm64 and reuse toolchain cache [CI]
This commit is contained in:
1 parent
490b008a57
commit
a6f9759238
22 files changed
+62
-73
No files matched your search
@@ -1,4 +1,5 @@
|
||||
FROM mcr.microsoft.com/dotnet/runtime-deps:10.0-alpine
|
||||
ARG RUNTIME_BASE=mcr.microsoft.com/dotnet/runtime-deps:10.0
|
||||
FROM ${RUNTIME_BASE}
|
||||
|
||||
ARG APP_VERSION=unknown
|
||||
LABEL org.opencontainers.image.title="MoShiro Agent" \
|
||||
@@ -6,8 +7,7 @@ LABEL org.opencontainers.image.title="MoShiro Agent" \
|
||||
org.opencontainers.image.licenses="Apache-2.0" \
|
||||
org.opencontainers.image.version="$APP_VERSION"
|
||||
|
||||
COPY --chown=1654:1654 app/moshiro-agent /usr/local/bin/moshiro-agent
|
||||
COPY --chown=1654:1654 app/fleet-enroll /usr/local/bin/fleet-enroll
|
||||
COPY --chown=1654:1654 app/ /usr/local/bin/
|
||||
COPY --chown=1654:1654 config/ /etc/moshiro/
|
||||
COPY --chown=1654:1654 --chmod=0755 entrypoint.sh /usr/local/bin/moshiro-entrypoint
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ FROM --platform=linux/amd64 ${NATIVEAOT_BUILDER_IMAGE} AS toolchain
|
||||
FROM toolchain AS restore
|
||||
WORKDIR /src/backend
|
||||
COPY restore/backend/ ./
|
||||
ARG NODE_RID=linux-musl-x64
|
||||
ARG NODE_RID=linux-musl-arm64
|
||||
ARG STATIC_MSQUIC=true
|
||||
ENV NUGET_PACKAGES=/root/.nuget/packages
|
||||
# Layer hits skip restore. A dependency change still reuses downloaded packages.
|
||||
|
||||
@@ -28,7 +28,6 @@ RUN printf '%s\n' \
|
||||
" <PackageReference Include=\"Vezel.Zig.Toolsets.linux-x64\" Version=\"$ZIG_TOOLSET_VERSION\" GeneratePathProperty=\"true\" />" \
|
||||
' </ItemGroup>' \
|
||||
'</Project>' > Warmup.csproj \
|
||||
&& dotnet restore Warmup.csproj -p:RuntimeFrameworkVersion=10.0.12 -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-x64 \
|
||||
&& dotnet restore Warmup.csproj -p:RuntimeFrameworkVersion=10.0.12 -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-arm64 \
|
||||
&& dotnet restore Warmup.csproj -p:RuntimeFrameworkVersion=10.0.12 -p:PublishAot=true -p:UseAotAnywhere=true -r linux-x64 \
|
||||
&& dotnet restore Warmup.csproj -p:RuntimeFrameworkVersion=10.0.12 -p:PublishAot=true -p:UseAotAnywhere=true -r linux-arm64 \
|
||||
|
||||
Reference in new issue
Block a user