ci: add .NET 10 NativeAOT AotAnywhere builder [CI]
This commit is contained in:
1 parent
0d08e90dab
commit
a1101424d2
5 files changed
+52
-13
No files matched your search
@@ -0,0 +1,32 @@
|
||||
# Shared .NET 10 NativeAOT build environment for MoShiro's Linux node images.
|
||||
# The SDK image includes the Linux NativeAOT compiler prerequisites. Warm the
|
||||
# repository-pinned AotAnywhere MSBuild SDK into this image so builds do not
|
||||
# depend on a writable host-mounted NuGet cache.
|
||||
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:10.0-noble-aot
|
||||
|
||||
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1 \
|
||||
DOTNET_NOLOGO=1 \
|
||||
NUGET_PACKAGES=/root/.nuget/packages
|
||||
|
||||
WORKDIR /opt/aotanywhere
|
||||
COPY global.json ./global.json
|
||||
COPY Directory.Packages.props ./Directory.Packages.props
|
||||
COPY backend/Directory.Build.props ./backend/Directory.Build.props
|
||||
COPY backend/BannedSymbols.txt ./backend/BannedSymbols.txt
|
||||
|
||||
WORKDIR /opt/aotanywhere/backend
|
||||
RUN printf '%s\n' \
|
||||
'<Project Sdk="Microsoft.NET.Sdk">' \
|
||||
' <Sdk Name="StuDev.AotAnywhere" />' \
|
||||
' <PropertyGroup>' \
|
||||
' <TargetFramework>net10.0</TargetFramework>' \
|
||||
' <PublishAot>true</PublishAot>' \
|
||||
' <UseAotAnywhere>true</UseAotAnywhere>' \
|
||||
' </PropertyGroup>' \
|
||||
'</Project>' > Warmup.csproj \
|
||||
&& dotnet restore Warmup.csproj -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-x64 \
|
||||
&& dotnet restore Warmup.csproj -p:PublishAot=true -p:UseAotAnywhere=true -r linux-musl-arm64 \
|
||||
&& rm Warmup.csproj \
|
||||
&& rm -rf artifacts
|
||||
|
||||
WORKDIR /src/backend
|
||||
Reference in new issue
Block a user