Skip to content

Move to GitHub Actions #1917

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 16 commits into from
Oct 15, 2021
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
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ insert_final_newline = true
trim_trailing_whitespace = false
insert_final_newline = false

[*.{props,targets,csproj}]
[*.{props,targets,csproj,config}]
indent_size = 2
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI
on:
push:
branches: [master, release-*]
tags:
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
workflow_dispatch:
env:
DOTNET_NOLOGO: true
jobs:
build:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: windows-2019
name: Windows
- os: ubuntu-20.04
name: Linux
- os: macos-10.15
name: macOS
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v2.3.4
with:
fetch-depth: 0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 5.0.x
- name: Setup .NET Core 3.1 runtime
uses: actions/setup-dotnet@v1.8.1
with:
dotnet-version: 3.1.x
- name: Build
run: dotnet build LibGit2Sharp.sln --configuration Release
- name: Upload packages
if: matrix.name == 'Windows'
uses: actions/upload-artifact@v2.2.4
with:
name: NuGet packages
path: bin/Packages/
retention-days: 7
- name: Run net472 tests
if: matrix.name == 'Windows'
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net472 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
- name: Run netcoreapp3.1 tests
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework netcoreapp3.1 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
- name: Run net5.0 tests
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net5.0 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

8 changes: 6 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<OutputPath>$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\$(Configuration)\</PackageOutputPath>
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\</PackageOutputPath>
<DefineConstants Condition=" '$(ExtraDefine)' != '' ">$(DefineConstants);$(ExtraDefine)</DefineConstants>
</PropertyGroup>


<PropertyGroup Condition="'$(CI)' != ''">
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
</PropertyGroup>

</Project>
8 changes: 0 additions & 8 deletions Directory.Build.targets

This file was deleted.

2 changes: 1 addition & 1 deletion LibGit2Sharp.Tests/BlobFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void CanGetBlobAsFilteredText(string autocrlf, string expectedText)
}
}

#if NETFRAMEWORK || NETCOREAPP2_1
#if NETFRAMEWORK || NETCOREAPP3_1 //UTF-7 is disabled in .NET 5
[Theory]
[InlineData("ascii", 4, "31 32 33 34")]
[InlineData("utf-7", 4, "31 32 33 34")]
Expand Down
6 changes: 3 additions & 3 deletions 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>net472;netcoreapp2.1;net5.0</TargetFrameworks>
<TargetFrameworks>net472;netcoreapp3.1;net5.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -11,8 +11,8 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="2.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
<PackageReference Include="Moq" Version="4.16.1" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.console" Version="2.4.1" />
Expand Down
31 changes: 0 additions & 31 deletions LibGit2Sharp.Tests/LibGit2Sharp.Tests.v2.ncrunchproject

This file was deleted.

17 changes: 0 additions & 17 deletions LibGit2Sharp.sln.DotSettings

This file was deleted.

13 changes: 0 additions & 13 deletions LibGit2Sharp.v2.ncrunchsolution

This file was deleted.

29 changes: 0 additions & 29 deletions LibGit2Sharp/CustomDictionary.xml

This file was deleted.

16 changes: 7 additions & 9 deletions LibGit2Sharp/LibGit2Sharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,27 @@
<PropertyGroup>
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</Description>
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET</Description>
<Company>LibGit2Sharp contributors</Company>
<Copyright>Copyright © LibGit2Sharp contributors</Copyright>
<PackageTags>libgit2 git</PackageTags>
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp/</PackageProjectUrl>
<Authors>LibGit2Sharp contributors</Authors>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<DebugType>embedded</DebugType>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
<PackageIcon>square-logo.png</PackageIcon>
<PackageLicenseFile>App_Readme/LICENSE.md</PackageLicenseFile>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
</PropertyGroup>

<ItemGroup>
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
<None Include="..\square-logo.png" Pack="true" PackagePath="" />
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" />
<None Include="..\LICENSE.md" Pack="true" PackagePath="App_Readme/" />
<None Include="..\CHANGES.md" Pack="true" PackagePath="App_Readme/" />
<None Include="..\square-logo.png" Pack="true" PackagePath="" Visible="false" />
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
<None Include="..\LICENSE.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
<None Include="..\CHANGES.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
<None Update="Core\Handles\Objects.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="Objects.cs" />
<Compile Update="Core\Handles\Objects.cs" DependentUpon="Objects.tt" DesignTime="True" AutoGen="True" />
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" /> <!-- Needed for T4 generation -->
Expand Down
25 changes: 0 additions & 25 deletions LibGit2Sharp/LibGit2Sharp.v2.ncrunchproject

This file was deleted.

18 changes: 0 additions & 18 deletions LibGit2Sharp/Properties/AssemblyInfo.cs

This file was deleted.

Loading