Skip to content
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
27 changes: 14 additions & 13 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- name: Install .NET SDK
uses: actions/setup-dotnet@v5
with:
dotnet-version: 9.0.x
dotnet-version: 10.0.x
- name: Compute version override for branch builds
if: ${{ !startsWith(github.ref, 'refs/tags/') }}
id: version
Expand Down Expand Up @@ -53,21 +53,22 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
arch: [ x64 ]
os: [ windows-2022, windows-2025, macos-14, macos-15 ]
tfm: [ net472, net8.0, net9.0 ]
os: [ windows-2022, windows-2025, macos-15, macos-26 ]
tfm: [ net472, net8.0, net10.0 ]
exclude:
- os: macos-14

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

macos-14 runners were deprecated earlier this month

tfm: net472
- os: macos-15
tfm: net472
- os: macos-26
tfm: net472
include:
- arch: arm64
os: macos-14
tfm: net8.0
- arch: arm64
os: macos-14
tfm: net9.0
- os: windows-2022
arch: x64
- os: windows-2025
arch: x64
- os: macos-15
arch: arm64
- os: macos-26
arch: arm64
fail-fast: false
steps:
- name: Checkout
Expand All @@ -78,7 +79,7 @@ jobs:
uses: actions/setup-dotnet@v5
with:
dotnet-version: |
9.0.x
10.0.x
8.0.x
- name: Run ${{ matrix.tfm }} tests
run: dotnet test LibGit2Sharp.sln --configuration Release --framework ${{ matrix.tfm }} --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
Expand Down
2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net472;net8.0;net9.0</TargetFrameworks>
<TargetFrameworks Condition="'$(TargetFrameworks)'==''">net472;net8.0;net10.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand Down
4 changes: 4 additions & 0 deletions LibGit2Sharp/CertificateX509.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ internal unsafe CertificateX509(git_certificate_x509* cert)
int len = checked((int)cert->len.ToUInt32());
byte[] data = new byte[len];
Marshal.Copy(new IntPtr(cert->data), data, 0, len);
#if NET9_0_OR_GREATER
Certificate = X509CertificateLoader.LoadCertificate(data);

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only added in net9.0

#else
Certificate = new X509Certificate(data);
#endif
}

internal CertificateX509(X509Certificate cert)
Expand Down
4 changes: 2 additions & 2 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net472;net8.0</TargetFrameworks>
<TargetFrameworks>net472;net8.0;net10.0</TargetFrameworks>
<LangVersion>12.0</LangVersion>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET</Description>
Expand All @@ -25,7 +25,7 @@
<MinVerBuildMetadata Condition="'$(libgit2_hash)' != ''">libgit2-$(libgit2_hash.Substring(0,7))</MinVerBuildMetadata>
</PropertyGroup>

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

Expand Down
2 changes: 1 addition & 1 deletion TrimmingTestApp/TrimmingTestApp.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net9.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<OutputType>Exe</OutputType>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
Expand Down
Loading