8000 Updates for trimming compatibility by bording · Pull Request #2084 · libgit2/libgit2sharp · GitHub
[go: up one dir, main page]

Skip to content

Updates for trimming compatibility #2084

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

Merged
merged 4 commits into from
Mar 16, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
Add project to test trimming compatibility
  • Loading branch information
bording committed Mar 16, 2024
commit 2cad6cd44dcb419d9bcadaeab92dd75d3b68ff9a
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
name: NuGet packages
path: bin/Packages/
retention-days: 7
- name: Verify trimming compatibility
run: dotnet publish TrimmingTestApp
test:
name: Test / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ matrix.tfm }}
runs-on: ${{ matrix.os }}
Expand Down
4 changes: 4 additions & 0 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@
<MinVerBuildMetadata Condition="'$(libgit2_hash)' != ''">libgit2-$(libgit2_hash.Substring(0,7))</MinVerBuildMetadata>
</PropertyGroup>

<PropertyGroup Condition="'$(TargetFramework)' == 'net6.0'">
<IsTrimmable>true</IsTrimmable>
</PropertyGroup>

<ItemGroup>
<None Include="..\square-logo.png" Pack="true" PackagePath="" Visible="false" />
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
Expand Down
3 changes: 3 additions & 0 deletions TrimmingTestApp/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
using LibGit2Sharp;

_ = new Repository();
18 changes: 18 additions & 0 deletions TrimmingTestApp/TrimmingTestApp.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<PublishTrimmed>true</PublishTrimmed>
<PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\LibGit2Sharp\LibGit2Sharp.csproj" />
<TrimmerRootAssembly Include="LibGit2Sharp" />
</ItemGroup>

</Project>
0