Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build refactor #434

Merged
merged 33 commits into from
Mar 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
7fcd5a6
Use common compiler invocation
jamescourtney Mar 8, 2024
dd92aff
Update dotnet.yml
jamescourtney Mar 8, 2024
12cd094
Custom target
jamescourtney Mar 8, 2024
b13eddb
Merge branch 'build_refactor' of https://github.com/jamescourtney/Fla…
jamescourtney Mar 8, 2024
130d8a7
Extend timeout
jamescourtney Mar 9, 2024
aa6b6f3
Try mutex again
jamescourtney Mar 9, 2024
bcfaea1
Use fancy project reference
jamescourtney Mar 9, 2024
a5de070
Update charp8build.yml
jamescourtney Mar 9, 2024
d35aff2
Update csharp8 csproj
jamescourtney Mar 9, 2024
ff01a48
Merge branch 'build_refactor' of https://github.com/jamescourtney/Fla…
jamescourtney Mar 9, 2024
497f0f9
Update MonoAotValidation.yml
jamescourtney Mar 9, 2024
c4c745a
Revert "Update MonoAotValidation.yml"
jamescourtney Mar 9, 2024
686bb89
Update MonoAotValidation.yml
jamescourtney Mar 9, 2024
1b08761
Add stryker tests to sln
jamescourtney Mar 9, 2024
e79006f
Update others
jamescourtney Mar 9, 2024
aefd6d1
Update stryker.yml
jamescourtney Mar 9, 2024
ef39e59
Update codecov.yml
jamescourtney Mar 9, 2024
1977060
Add empty file
jamescourtney Mar 9, 2024
303a6be
Delete generated file
jamescourtney Mar 10, 2024
a1134cb
Fix stryker compile
jamescourtney Mar 10, 2024
e35506d
Fix native aot
jamescourtney Mar 12, 2024
b971a78
Update MonoAotValidation.yml
jamescourtney Mar 12, 2024
a0617d1
Update MonoAotValidation.yml
jamescourtney Mar 12, 2024
617e7c1
Remove extra sln
jamescourtney Mar 12, 2024
baa1327
Merge branch 'build_refactor' of https://github.com/jamescourtney/Fla…
jamescourtney Mar 12, 2024
2c5019b
Update MonoAotValidation.yml
jamescourtney Mar 12, 2024
149146d
Delete .github/workflows/charp8build.yml
jamescourtney Mar 12, 2024
079fc56
Update stryker.yml
jamescourtney Mar 12, 2024
ab9fff7
Reduce benchmark run time
jamescourtney Mar 12, 2024
8e8e085
Re-enable version in mutation testing mode
jamescourtney Mar 12, 2024
eb3a3ef
Mess a bit more with targets
jamescourtney Mar 12, 2024
66ac6d2
Update stryker.yml
jamescourtney Mar 12, 2024
29ebbf8
Disable packable from non-pipeline builds
jamescourtney Mar 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 10 additions & 24 deletions .github/workflows/MonoAotValidation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,34 +30,24 @@ jobs:
- name: Install Mono
run: sudo apt install mono-complete

- name: AOT Compile mscorlib
run: sudo mono -O=all --aot=full /usr/lib/mono/4.5/mscorlib.dll

- name: AOT Compile Other Libs
run: for i in /usr/lib/mono/gac/*/*/*.dll; do sudo mono -O=all --aot=full $i; done

- name: Restore dependencies
working-directory: src
run: dotnet restore

- name: Build FlatSharp.Compiler
working-directory: src/FlatSharp.Compiler
run: dotnet build -c Release

- name: Run FlatSharp.Compiler
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/pwsh-script@v2.0.3
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/Tests/CompileTests/NativeAot/*.fbs) -join ";"
dotnet src/FlatSharp.Compiler/bin/Release/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input "$fbs" -o src/Tests/CompileTests/NativeAot

- name: Build
working-directory: src/Tests/CompileTests/NativeAot
run: dotnet build -c Release

- name: Run (No AOT)
working-directory: src/Tests/CompileTests/NativeAot/bin/Release/net472
run: mono NativeAot.exe

- name: AOT Compile mscorlib
run: sudo mono -O=all --aot=full /usr/lib/mono/4.5/mscorlib.dll

- name: AOT Compile Other Libs
run: for i in /usr/lib/mono/gac/*/*/*.dll; do sudo mono -O=all --aot=full $i; done

- name: AOT Exes
working-directory: src/Tests/CompileTests/NativeAot/bin/Release/net472
run: mono -O=all --aot=full *.exe
Expand All @@ -66,10 +56,6 @@ jobs:
working-directory: src/Tests/CompileTests/NativeAot/bin/Release/net472
run: mono -O=all --aot=full *.dll

- name: Run (No AOT)
working-directory: src/Tests/CompileTests/NativeAot/bin/Release/net472
run: mono NativeAot.exe

- name: Run (AOT)
working-directory: src/Tests/CompileTests/NativeAot/bin/Release/net472
run: mono --full-aot NativeAot.exe
Expand Down
60 changes: 0 additions & 60 deletions .github/workflows/charp8build.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
env:
AppVeyorBuild: true
CoverageBuild: true
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
--format opencover `
--target "dotnet" `
--output e2etests.coverage.xml `
--targetargs "src\FlatSharp.Compiler\bin\Debug\net8.0\FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o src/tests/FlatSharpEndToEndTests"
--targetargs "src\FlatSharp.Compiler\bin\Debug\net8.0\FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o ."

- name: Run FlatSharp.Compiler (Pooling Tests)
# You may pin to the exact commit or the version.
Expand All @@ -81,7 +81,7 @@ jobs:
--format opencover `
--target "dotnet" `
--output pooling.coverage.xml `
--targetargs "src\FlatSharp.Compiler\bin\Debug\net8.0\FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --gen-poolable true --input `"$fbs`" -o src/tests/FlatSharpPoolableEndToEndTests"
--targetargs "src\FlatSharp.Compiler\bin\Debug\net8.0\FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --gen-poolable true --input `"$fbs`" -o ."

- name: Run FlatSharp.Compiler (Stryker Tests)
# You may pin to the exact commit or the version.
Expand All @@ -98,7 +98,7 @@ jobs:
--format opencover `
--target "dotnet" `
--output stryker.coverage.xml `
--targetargs "src/FlatSharp.Compiler/bin/Debug/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o src/tests/Stryker/CodeGen --mutation-testing-mode"
--targetargs "src/FlatSharp.Compiler/bin/Debug/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input `"$fbs`" -o . --mutation-testing-mode"

- name: E2E Tests
working-directory: src
Expand Down
24 changes: 0 additions & 24 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,30 +43,6 @@ jobs:
working-directory: src
run: dotnet restore

- name: Build FlatSharp.Compiler
working-directory: src/FlatSharp.Compiler
run: dotnet build -c Release /p:SignAssembly=true

- name: Run FlatSharp.Compiler (E2E Tests)
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/pwsh-script@v2.0.3
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/Tests/FlatSharpEndToEndTests/*.fbs) -join ";"
dotnet src/FlatSharp.Compiler/bin/Release/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input "$fbs" -o src/Tests/FlatSharpEndToEndTests

- name: Run FlatSharp.Compiler (Pooling Tests)
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/pwsh-script@v2.0.3
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/Tests/FlatSharpPoolableEndToEndTests/*.fbs) -join ";"
dotnet src/FlatSharp.Compiler/bin/Release/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --gen-poolable true --input "$fbs" -o src/Tests/FlatSharpPoolableEndToEndTests

- name: Build
working-directory: src
run: dotnet build -c Release /p:SignAssembly=true
Expand Down
20 changes: 3 additions & 17 deletions .github/workflows/stryker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
build:
runs-on: windows-2019
runs-on: windows-latest
env:
AppVeyorBuild: true
steps:
Expand All @@ -22,28 +22,14 @@ jobs:

- name: Install Stryker
run: dotnet tool install -g dotnet-stryker

- name: Build FlatSharp.Compiler
working-directory: src/FlatSharp.Compiler
run: dotnet build -c Release

- name: Run FlatSharp.Compiler (Mutation Tests)
# You may pin to the exact commit or the version.
# uses: Amadevus/pwsh-script@97a8b211a5922816aa8a69ced41fa32f23477186
uses: Amadevus/pwsh-script@v2.0.3
with:
# PowerShell script to execute in Actions-hydrated context
script: |
$fbs = (gci -r src/tests/Stryker/*.fbs) -join ";"
dotnet src/FlatSharp.Compiler/bin/Release/net8.0/FlatSharp.Compiler.dll --nullable-warnings false --normalize-field-names true --input "$fbs" -o src/tests/Stryker/CodeGen --mutation-testing-mode

- name: Build
working-directory: src/Tests/Stryker/Tests
run: dotnet build -c Release
run: dotnet build -c Debug

- name: Test
working-directory: src/Tests/Stryker/Tests
run: dotnet test -c Release
run: dotnet test -c Debug

- name: Mutate
working-directory: src/Tests/Stryker/Tests
Expand Down
10 changes: 1 addition & 9 deletions src/Benchmarks/Benchmark/Benchmark.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
<DelaySign>false</DelaySign>
<SignAssembly>false</SignAssembly>
<DefineConstants>$(DefineContants);CURRENT_VERSION_ONLY;RUN_COMPARISON_BENCHMARKS;FLATSHARP_7_0_0_OR_GREATER</DefineConstants>
<FlatSharpCompilerPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\FlatSharp.Compiler\bin\Release\net8.0\FlatSharp.Compiler.dll'))</FlatSharpCompilerPath>
<FlatSharpNameNormalization>true</FlatSharpNameNormalization>
<RunAnalyzersDuringLiveAnalysis>False</RunAnalyzersDuringLiveAnalysis>
<NeedsFlatSharpCompiler>true</NeedsFlatSharpCompiler>
</PropertyGroup>

<PropertyGroup Condition=" '$(BuildAot)' == 'true' ">
Expand Down Expand Up @@ -56,11 +55,4 @@
<FlatSharpSchema Include="FBBench/FlatSharp.fbs" />
<Protobuf Include="FBBench/Benchmark.proto" />
</ItemGroup>

<Import Project="..\..\FlatSharp.Compiler\FlatSharp.Compiler.targets" />

<Target Name="BuildCompiler" BeforeTargets="FlatSharpFbsCompile">
<MSBuild Projects="..\..\FlatSharp.Compiler\FlatSharp.Compiler.csproj" Properties="Configuration=Release;TargetFramework=net8.0" />
</Target>

</Project>
2 changes: 1 addition & 1 deletion src/Benchmarks/BenchmarkOld/BenchmarkOld.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<PackageReference Include="Newtonsoft.Json" />
<PackageReference Include="protobuf-net" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" />
Expand Down
45 changes: 20 additions & 25 deletions src/Benchmarks/ExperimentalBenchmark/ExperimentalBenchmark.csproj
Original file line number Diff line number Diff line change
@@ -1,30 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<DelaySign>false</DelaySign>
<SignAssembly>false</SignAssembly>
<!--<PublishAot>true</PublishAot>-->
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<FlatSharpCompilerPath>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)\..\..\FlatSharp.Compiler\bin\$(Configuration)\net8.0\FlatSharp.Compiler.dll'))</FlatSharpCompilerPath>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<DelaySign>false</DelaySign>
<SignAssembly>false</SignAssembly>
<!--<PublishAot>true</PublishAot>-->
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<NeedsFlatSharpCompiler>true</NeedsFlatSharpCompiler>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\FlatSharp.Compiler\FlatSharp.Compiler.csproj">
<PrivateAssets>all</PrivateAssets>
</ProjectReference>
<ProjectReference Include="..\..\FlatSharp.Runtime\FlatSharp.Runtime.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\FlatSharp.Runtime\FlatSharp.Runtime.csproj" />
</ItemGroup>

<ItemGroup>
<FlatSharpSchema Include="Benchmark.fbs" />
</ItemGroup>

<Import Project="..\..\FlatSharp.Compiler\FlatSharp.Compiler.targets" />
<ItemGroup>
<FlatSharpSchema Include="Benchmark.fbs" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<DelaySign>false</DelaySign>
<SignAssembly>false</SignAssembly>
<!--<PublishAot>true</PublishAot>-->
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<DelaySign>false</DelaySign>
<SignAssembly>false</SignAssembly>
<!--<PublishAot>true</PublishAot>-->
<IsPackable>false</IsPackable>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" />
<PackageReference Include="FlatSharp.Compiler" VersionOverride="7.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FlatSharp.Runtime" VersionOverride="7.4.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
<PackageReference Include="BenchmarkDotNet.Diagnostics.Windows" />
<PackageReference Include="FlatSharp.Compiler" VersionOverride="7.4.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FlatSharp.Runtime" VersionOverride="7.4.0" />
</ItemGroup>

<ItemGroup>
<Compile Include="../ExperimentalBenchmark/Program.cs" />
<FlatSharpSchema Include="../ExperimentalBenchmark/Benchmark.fbs" />
</ItemGroup>
<ItemGroup>
<Compile Include="../ExperimentalBenchmark/Program.cs" />
<FlatSharpSchema Include="../ExperimentalBenchmark/Benchmark.fbs" />
</ItemGroup>
</Project>
Loading
Loading