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

Add cross-platform build/test config #257

Merged
merged 1 commit into from
Dec 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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