ci: persist NuGet restore cache across Linux builds [CI]
This commit is contained in:
1 parent
f2af7950e7
commit
59c98e6d7b
6 files changed
+34
-25
No files matched your search
@@ -16,8 +16,7 @@ ARG MOSHIRO_COMMIT=
|
||||
ARG MOSHIRO_BUILT_AT=
|
||||
ENV MOSHIRO_TAG=$MOSHIRO_TAG MOSHIRO_COMMIT=$MOSHIRO_COMMIT MOSHIRO_BUILT_AT=$MOSHIRO_BUILT_AT
|
||||
# Build the project graph once; both native publishes reuse these managed outputs.
|
||||
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
|
||||
test -n "$NODE_RID" \
|
||||
RUN test -n "$NODE_RID" \
|
||||
&& echo "building managed outputs for $NODE_RID" \
|
||||
&& dotnet build Agent.Native.proj -m:3 -c Release -r "$NODE_RID" --no-restore \
|
||||
-p:PublishAot=true -p:UseAotAnywhere=true -p:SelfContained=true -p:Version="$APP_VERSION" \
|
||||
@@ -30,8 +29,7 @@ FROM managed AS build-agent
|
||||
ARG NODE_RID=linux-musl-arm64
|
||||
ARG STATIC_MSQUIC=true
|
||||
ARG APP_VERSION=0.0.0-dev
|
||||
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
|
||||
dotnet publish agent/src/MoShiro.Agent -m:3 -c Release -r "$NODE_RID" \
|
||||
RUN dotnet publish agent/src/MoShiro.Agent -m:3 -c Release -r "$NODE_RID" \
|
||||
--self-contained true --no-build --no-restore -p:PublishAot=true -p:UseAotAnywhere=true \
|
||||
-p:Version="$APP_VERSION" -p:StaticMsQuic="$STATIC_MSQUIC" -p:StaticExecutable="$STATIC_MSQUIC" \
|
||||
-p:RuntimeFrameworkVersion=10.0.12 -p:InvariantGlobalization=true -p:UseAppHost=true -p:StripSymbols=true \
|
||||
@@ -47,8 +45,7 @@ FROM managed AS build-enroll
|
||||
ARG NODE_RID=linux-musl-arm64
|
||||
ARG STATIC_MSQUIC=true
|
||||
ARG APP_VERSION=0.0.0-dev
|
||||
RUN --mount=type=cache,id=moshiro-nuget,target=/root/.nuget/packages,ro \
|
||||
dotnet publish fleet/tools/fleet-enroll -m:3 -c Release -r "$NODE_RID" \
|
||||
RUN dotnet publish fleet/tools/fleet-enroll -m:3 -c Release -r "$NODE_RID" \
|
||||
--self-contained true --no-build --no-restore -p:PublishAot=true -p:UseAotAnywhere=true \
|
||||
-p:Version="$APP_VERSION" -p:StaticMsQuic="$STATIC_MSQUIC" -p:StaticExecutable="$STATIC_MSQUIC" \
|
||||
-p:RuntimeFrameworkVersion=10.0.12 -p:InvariantGlobalization=true -p:UseAppHost=true -p:StripSymbols=true \
|
||||
|
||||
Reference in new issue
Block a user