Open
Conversation
Comment on lines
+14
to
+44
| build: | ||
| name: Build | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install .NET SDK | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: 9.0.x | ||
| - name: Compute version suffix for branch builds | ||
| if: ${{ !startsWith(github.ref, 'refs/tags/') }} | ||
| id: version | ||
| run: | | ||
| # Sanitize branch name: lowercase, replace non-alphanumeric with hyphen, trim to 20 chars | ||
| BRANCH="${GITHUB_HEAD_REF:-${GITHUB_REF_NAME}}" | ||
| SAFE_BRANCH=$(echo "$BRANCH" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//' | sed 's/-$//' | cut -c1-20) | ||
| echo "override=${SAFE_BRANCH}.${{ github.run_number }}" >> "$GITHUB_OUTPUT" | ||
| - name: Build | ||
| run: dotnet build LibGit2Sharp.sln --configuration Release ${{ steps.version.outputs.override && format('/p:MinVerDefaultPreReleaseIdentifiers="{0}"', steps.version.outputs.override) || '' }} | ||
| - name: Upload packages | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: NuGet packages | ||
| path: artifacts/package/ | ||
| retention-days: 7 | ||
| - name: Verify trimming compatibility | ||
| run: dotnet publish TrimmingTestApp | ||
|
|
Comment on lines
+45
to
+76
| test: | ||
| name: Test / ${{ matrix.os }} / ${{ matrix.arch }} / ${{ matrix.tfm }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| matrix: | ||
| arch: [x64] | ||
| os: [windows-2022, macos-14] | ||
| tfm: [net472, net8.0, net9.0] | ||
| exclude: | ||
| - os: macos-14 | ||
| tfm: net472 | ||
| include: | ||
| - arch: arm64 | ||
| os: macos-14 | ||
| tfm: net8.0 | ||
| - arch: arm64 | ||
| os: macos-14 | ||
| tfm: net9.0 | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Install .NET SDK | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: | | ||
| 9.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 |
Comment on lines
+77
to
+116
| test-linux: | ||
| name: Test / ${{ matrix.distro }} / ${{ matrix.arch }} / ${{ matrix.tfm }} | ||
| runs-on: ${{ matrix.runnerImage }} | ||
| strategy: | ||
| matrix: | ||
| arch: [amd64, arm64] | ||
| distro: | ||
| [ | ||
| alpine.3.20, | ||
| alpine.3.21, | ||
| alpine.3.22, | ||
| centos.stream.9, | ||
| debian.12, | ||
| fedora.41, | ||
| fedora.42, | ||
| ubuntu.22.04, | ||
| ubuntu.24.04, | ||
| ] | ||
| sdk: ["8.0", "9.0"] | ||
| include: | ||
| - sdk: "8.0" | ||
| tfm: net8.0 | ||
| - sdk: "9.0" | ||
| tfm: net9.0 | ||
| - arch: amd64 | ||
| runnerImage: ubuntu-22.04 | ||
| - arch: arm64 | ||
| runnerImage: ubuntu-22.04-arm | ||
| fail-fast: false | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| fetch-depth: 0 | ||
| - name: Run ${{ matrix.tfm }} tests | ||
| run: | | ||
| git_command="git config --global --add safe.directory /app" | ||
| test_command="dotnet test LibGit2Sharp.sln --configuration Release -p:TargetFrameworks=${{ matrix.tfm }} --logger "GitHubActions" -p:ExtraDefine=LEAKS_IDENTIFYING" | ||
| docker run -t --rm --platform linux/${{ matrix.arch }} -v "$PWD:/app" -w /app -e OPENSSL_ENABLE_SHA1_SIGNATURES=1 gittools/build-images:${{ matrix.distro }}-sdk-${{ matrix.sdk }} sh -c "$git_command && $test_command" | ||
|
|
Comment on lines
+117
to
+133
| nuget-push: | ||
| name: Octopus NuGet Push | ||
| needs: [build, test, test-linux] | ||
| # && github.ref == 'refs/heads/octopus/master' | ||
| if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' && github.event_name != 'schedule' | ||
| runs-on: ubuntu-22.04 | ||
| steps: | ||
| - uses: actions/download-artifact@v8 | ||
|
|
||
| with: | ||
| path: staging | ||
| - name: Push package to feed 🐙 | ||
| id: push-feed | ||
| shell: bash | ||
| env: | ||
| FEED_API_KEY: ${{ secrets.FEED_API_KEY }} | ||
| FEED_SOURCE: ${{ secrets.FEED_SOURCE }} |
eddymoulton
commented
Apr 17, 2026
Collaborator
Author
There was a problem hiding this comment.
My formatter went to town, turn off whitespace
eddymoulton
commented
Apr 17, 2026
Comment on lines
+84
to
+92
| alpine.3.20, | ||
| alpine.3.21, | ||
| alpine.3.22, | ||
| centos.stream.9, | ||
| debian.12, | ||
| fedora.41, | ||
| fedora.42, | ||
| ubuntu.22.04, | ||
| ubuntu.24.04, |
Collaborator
Author
There was a problem hiding this comment.
Updated to remove older distros that are out of support
eddymoulton
commented
Apr 17, 2026
|
|
||
| <PropertyGroup> | ||
| <TargetFrameworks Condition="'$(TargetFrameworks)'==''">net472;net6.0;net8.0;net9.0</TargetFrameworks> | ||
| <TargetFrameworks Condition="'$(TargetFrameworks)'==''">net472;net8.0;net9.0</TargetFrameworks> |
Collaborator
Author
There was a problem hiding this comment.
Removes out of support net6.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Takes the new fork we've created of the native binaries, which is updated to fix the build which included an update to the libgit2 version (v1.8.4 to v1.9.2) that was required to get it running on arm mac agents.
This PR is split out to include only changes required by the libgit2 update - primarily struct updates - so that it can be merged upstream if the native binaries changes are accepted upstream too.
Relates to MD-1601