Skip to content

Commit

Permalink
Add cross-platform build/test config
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremy-visionaid committed Dec 1, 2024
1 parent 08c0844 commit d3a3d5d
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dotnet-desktop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:

# Execute all unit tests in the solution
- name: Execute unit tests
run: dotnet test --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true"
run: dotnet test --logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" $env:Solution_Name

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: dotnet build -c $env:Configuration /p:ContinuousIntegrationBuild=true
run: dotnet build -c $env:Configuration /p:ContinuousIntegrationBuild=true $env:Solution_Name
env:
Configuration: ${{ matrix.configuration }}
10 changes: 8 additions & 2 deletions OpenMcdf.Benchmarks/OpenMcdf.Benchmarks.csproj
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net8.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) == 'false'">net8.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net8.0-windows</TargetFrameworks>
<OutputType>Exe</OutputType>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="BenchmarkDotNet" />
</ItemGroup>

<ItemGroup Condition="$([MSBuild]::IsOSPlatform('windows')) == 'false'">
<Compile Remove="StructuredStorageBenchmarks.cs" />
<None Include="StructuredStorageBenchmarks.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\OpenMcdf\OpenMcdf.csproj" />
<ProjectReference Include="..\StructuredStorage\StructuredStorage.csproj" />
<ProjectReference Include="..\StructuredStorage\StructuredStorage.csproj" Condition="$([MSBuild]::IsOSPlatform('windows'))" />
</ItemGroup>

</Project>
13 changes: 13 additions & 0 deletions OpenMcdf.CrossPlatform.slnf
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"solution": {
"path": "OpenMcdf.sln",
"projects": [
"OpenMcdf/OpenMcdf.csproj",
"OpenMcdf.Benchmarks/OpenMcdf.Benchmarks.csproj",
"OpenMcdf.Ole/OpenMcdf.Ole.csproj",
"OpenMcdf.Ole.Tests/OpenMcdf.Ole.Tests.csproj",
"OpenMcdf.Perf/OpenMcdf.Perf.csproj",
"OpenMcdf.Tests/OpenMcdf.Tests.csproj"
]
}
}
3 changes: 2 additions & 1 deletion OpenMcdf.Tests/OpenMcdf.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net48;net8.0-windows</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows')) == false">net8.0</TargetFrameworks>
<TargetFrameworks Condition="$([MSBuild]::IsOSPlatform('windows'))">net48;net8.0-windows</TargetFrameworks>
<OutputType>Exe</OutputType>

<IsPackable>false</IsPackable>
Expand Down

0 comments on commit d3a3d5d

Please sign in to comment.