Skip to content

Commit

Permalink
build: Arm64 now using NativeAOT. Also clean bin & obj first.
Browse files Browse the repository at this point in the history
  • Loading branch information
gerardog committed Nov 28, 2022
1 parent a9d93ac commit 9a9abe1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions build/01-build.ps1
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
pushd $PSScriptRoot\..
"-- Cleaning bin & obj folders"
Get-Item ".\src\gsudo\bin\", ".\src\gsudo\obj\" -ErrorAction Ignore | Remove-Item -Recurse -Force
"-- Building net7.0 win-arm64"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\arm64 -f net7.0 -r win-arm64 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\arm64 -f net7.0 -r win-arm64 --sc -p:PublishAot=true -p:IlcOptimizationPreference=Size -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
"-- Building net7.0 win-x64"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net7.0 -r win-x64 --sc -p:PublishAot=true -p:IlcOptimizationPreference=Size -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
"-- Building net7.0 win-x86"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x86 -f net7.0 -r win-x86 --sc -p:PublishReadyToRun=true -p:PublishSingleFile=true -v minimal -p:WarningLevel=0 || $(exit $LASTEXITCODE)
"-- Building net7.0 win-x64"
dotnet publish .\src\gsudo\gsudo.csproj -c Release -o .\artifacts\x64 -f net7.0 -r win-x64 --sc -p:PublishAot=true -p:IlcOptimizationPreference=Size || $(exit $LASTEXITCODE)

cp .\src\gsudo.Wrappers\* .\artifacts\x86
cp .\src\gsudo.Wrappers\* .\artifacts\x64
Expand Down

0 comments on commit 9a9abe1

Please sign in to comment.