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

Update CI #160

Merged
merged 6 commits into from
Nov 23, 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
43 changes: 19 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@ jobs:
- os: windows-2019
name: win-arm64
param: -arm64
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-x64
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-musl-x64
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-arm64
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-musl-arm
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-musl-arm64
- os: ubuntu-20.04
- os: ubuntu-24.04
name: linux-arm
- os: macos-11
- os: macos-13
name: osx-x64
- os: macos-11
- os: macos-13
name: osx-arm64
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.2.2
with:
submodules: true
- name: Build Windows
Expand All @@ -54,44 +54,39 @@ jobs:
if: runner.os == 'macOS'
run: ./build.libgit2.sh
- name: Setup QEMU
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
if: matrix.name == 'linux-musl-arm' || matrix.name == 'linux-musl-arm64'
run: docker run --rm --privileged multiarch/qemu-user-static:register --reset
- name: Build Linux
if: runner.os == 'Linux'
run: ./dockerbuild.sh
- name: Upload artifacts
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.4.3
with:
name: ${{ matrix.name }}
path: nuget.package/runtimes/${{ matrix.name }}
package:
name: Create package
needs: build
runs-on: windows-2019
runs-on: ubuntu-24.04
env:
DOTNET_NOLOGO: true
steps:
- name: Checkout
uses: actions/checkout@v4.1.2
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4.0.0
uses: actions/setup-dotnet@v4.1.0
with:
dotnet-version: 8.0.x
- name: Install MinVer
run: dotnet tool install --global minver-cli
- name: Run MinVer
id: minver
run: echo "version=$(minver)" >> $env:GITHUB_OUTPUT
dotnet-version: 9.0.x
- name: Download artifacts
uses: actions/[email protected].7
uses: actions/[email protected].8
with:
path: nuget.package/runtimes/
- name: Create package
run: ./nuget.exe Pack nuget.package/NativeBinaries.nuspec -Version ${{ steps.minver.outputs.version }} -NoPackageAnalysis
run: dotnet pack nuget.package
- name: Upload NuGet package
uses: actions/upload-artifact@v4.3.1
uses: actions/upload-artifact@v4.4.3
with:
name: NuGet package
path: ./*.nupkg
path: ./nuget.package/*.nupkg
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,7 @@
*.dylib
*.so
*.zip

bin/
obj/
.vs/
Binary file removed nuget.exe
Binary file not shown.
29 changes: 29 additions & 0 deletions nuget.package/LibGit2Sharp.NativeBinaries.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<NoBuild>true</NoBuild>
<IncludeBuildOutput>false</IncludeBuildOutput>
<SuppressDependenciesWhenPacking>true</SuppressDependenciesWhenPacking>
<Authors>LibGit2Sharp contributors</Authors>
<PackageLicenseFile>libgit2\libgit2.license.txt</PackageLicenseFile>
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp.nativebinaries</PackageProjectUrl>
<PackageIcon>libgit2\libgit2.png</PackageIcon>
<Description>Native binaries for LibGit2Sharp</Description>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<PackageOutputPath>$(MSBuildThisFileDirectory)</PackageOutputPath>
<NoWarn>$(NoWarn);NU5127</NoWarn>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="MinVer" Version="6.0.0" PrivateAssets="all" />
</ItemGroup>

<ItemGroup>
<None Update="build\**\*" Pack="true" PackagePath="" />
<None Update="buildMultiTargeting\**\*" Pack="true" PackagePath="" />
<None Update="libgit2\**\*" Pack="true" PackagePath="" />
<None Update="runtimes\**\*" Pack="true" PackagePath="" />
</ItemGroup>

</Project>
14 changes: 0 additions & 14 deletions nuget.package/NativeBinaries.nuspec

This file was deleted.