Skip to content

Commit eb86371

Browse files
committed
Add AotTest task in build script
1 parent b3d3df4 commit eb86371

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.build.ps1

+11
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,17 @@ task DotnetTest DotnetBuild, {
4949
}
5050
}
5151

52+
task AotTest {
53+
Push-Location ".\test\TinyIpc.Tests"
54+
dotnet publish /p:"AotTest=true" --framework "net9.0-windows"
55+
Pop-Location
56+
57+
Push-Location ".\artifacts\publish\TinyIpc.Tests\release_net9.0-windows_win-x64\"
58+
exec {
59+
.\TinyIpc.Tests.exe --disable-logo
60+
}
61+
}
62+
5263
task DotnetPack AssertVersion, {
5364
exec {
5465
dotnet pack ".\src\TinyIpc\TinyIpc.csproj" `

test/TinyIpc.Tests/TinyIpc.Tests.csproj

+6-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFrameworks>net481;net8.0-windows;net9.0-windows</TargetFrameworks>
5+
<TargetFrameworks>net9.0-windows;net8.0-windows;net481</TargetFrameworks>
66
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
77
</PropertyGroup>
88

9+
<PropertyGroup Condition=" '$(AotTest)' == 'true' ">
10+
<TargetFrameworks>net9.0-windows</TargetFrameworks>
11+
<PublishAot>true</PublishAot>
12+
</PropertyGroup>
13+
914
<ItemGroup>
1015
<ProjectReference Include="..\..\src\TinyIpc\TinyIpc.csproj" />
1116
</ItemGroup>

0 commit comments

Comments
 (0)