Skip to content

Commit 6189846

Browse files
authored
Merge pull request #1917 from libgit2/ci-changes
Move to GitHub Actions
2 parents 79caa3d + 47e674d commit 6189846

36 files changed

+92
-877
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@ insert_final_newline = true
1414
trim_trailing_whitespace = false
1515
insert_final_newline = false
1616

17-
[*.{props,targets,csproj}]
17+
[*.{props,targets,csproj,config}]
1818
indent_size = 2

.github/workflows/ci.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [master, release-*]
5+
tags:
6+
- '[0-9]+.[0-9]+.[0-9]+'
7+
- '[0-9]+.[0-9]+.[0-9]+-*'
8+
pull_request:
9+
workflow_dispatch:
10+
env:
11+
DOTNET_NOLOGO: true
12+
jobs:
13+
build:
14+
name: ${{ matrix.name }}
15+
runs-on: ${{ matrix.os }}
16+
strategy:
17+
matrix:
18+
include:
19+
- os: windows-2019
20+
name: Windows
21+
- os: ubuntu-20.04
22+
name: Linux
23+
- os: macos-10.15
24+
name: macOS
25+
fail-fast: false
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2.3.4
29+
with:
30+
fetch-depth: 0
31+
- name: Setup .NET SDK
32+
uses: actions/setup-dotnet@v1.8.1
33+
with:
34+
dotnet-version: 5.0.x
35+
- name: Setup .NET Core 3.1 runtime
36+
uses: actions/setup-dotnet@v1.8.1
37+
with:
38+
dotnet-version: 3.1.x
39+
- name: Build
40+
run: dotnet build LibGit2Sharp.sln --configuration Release
41+
- name: Upload packages
42+
if: matrix.name == 'Windows'
43+
uses: actions/upload-artifact@v2.2.4
44+
with:
45+
name: NuGet packages
46+
path: bin/Packages/
47+
retention-days: 7
48+
- name: Run net472 tests
49+
if: matrix.name == 'Windows'
50+
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net472 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
51+
- name: Run netcoreapp3.1 tests
52+
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework netcoreapp3.1 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING
53+
- name: Run net5.0 tests
54+
run: dotnet test LibGit2Sharp.sln --configuration Release --no-restore --framework net5.0 --logger "GitHubActions" /p:ExtraDefine=LEAKS_IDENTIFYING

.travis.yml

Lines changed: 0 additions & 7 deletions
This file was deleted.

Directory.Build.props

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,12 @@
44
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
55
<OutputPath>$(MSBuildThisFileDirectory)bin\$(MSBuildProjectName)\$(Configuration)\</OutputPath>
66
<BaseIntermediateOutputPath>$(MSBuildThisFileDirectory)obj\$(MSBuildProjectName)\</BaseIntermediateOutputPath>
7-
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\$(Configuration)\</PackageOutputPath>
7+
<PackageOutputPath>$(MSBuildThisFileDirectory)bin\Packages\</PackageOutputPath>
88
<DefineConstants Condition=" '$(ExtraDefine)' != '' ">$(DefineConstants);$(ExtraDefine)</DefineConstants>
99
</PropertyGroup>
10-
10+
11+
<PropertyGroup Condition="'$(CI)' != ''">
12+
<ContinuousIntegrationBuild>true</ContinuousIntegrationBuild>
13+
</PropertyGroup>
14+
1115
</Project>

Directory.Build.targets

Lines changed: 0 additions & 8 deletions
This file was deleted.

LibGit2Sharp.Tests/BlobFixture.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public void CanGetBlobAsFilteredText(string autocrlf, string expectedText)
4343
}
4444
}
4545

46-
#if NETFRAMEWORK || NETCOREAPP2_1
46+
#if NETFRAMEWORK || NETCOREAPP3_1 //UTF-7 is disabled in .NET 5
4747
[Theory]
4848
[InlineData("ascii", 4, "31 32 33 34")]
4949
[InlineData("utf-7", 4, "31 32 33 34")]

LibGit2Sharp.Tests/LibGit2Sharp.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFrameworks>net472;netcoreapp2.1;net5.0</TargetFrameworks>
4+
<TargetFrameworks>net472;netcoreapp3.1;net5.0</TargetFrameworks>
55
</PropertyGroup>
66

77
<ItemGroup>
@@ -11,8 +11,8 @@
1111
</ItemGroup>
1212

1313
<ItemGroup>
14-
<PackageReference Include="coverlet.msbuild" Version="2.7.0" />
15-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.10.0" />
14+
<PackageReference Include="GitHubActionsTestLogger" Version="1.2.0" />
15+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.11.0" />
1616
<PackageReference Include="Moq" Version="4.16.1" />
1717
<PackageReference Include="xunit" Version="2.4.1" />
1818
<PackageReference Include="xunit.runner.console" Version="2.4.1" />

LibGit2Sharp.Tests/LibGit2Sharp.Tests.v2.ncrunchproject

Lines changed: 0 additions & 31 deletions
This file was deleted.

LibGit2Sharp.sln.DotSettings

Lines changed: 0 additions & 17 deletions
This file was deleted.

LibGit2Sharp.v2.ncrunchsolution

Lines changed: 0 additions & 13 deletions
This file was deleted.

LibGit2Sharp/CustomDictionary.xml

Lines changed: 0 additions & 29 deletions
This file was deleted.

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,29 +3,27 @@
33
<PropertyGroup>
44
<TargetFrameworks>netstandard2.0;netcoreapp2.1</TargetFrameworks>
55
<GenerateDocumentationFile>true</GenerateDocumentationFile>
6-
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</Description>
6+
<Description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .NET</Description>
77
<Company>LibGit2Sharp contributors</Company>
88
<Copyright>Copyright © LibGit2Sharp contributors</Copyright>
99
<PackageTags>libgit2 git</PackageTags>
1010
<PackageProjectUrl>https://github.com/libgit2/libgit2sharp/</PackageProjectUrl>
1111
<Authors>LibGit2Sharp contributors</Authors>
1212
<PublishRepositoryUrl>true</PublishRepositoryUrl>
1313
<EmbedUntrackedSources>true</EmbedUntrackedSources>
14-
<AllowedOutputExtensionsInPackageBuildOutputFolder>$(AllowedOutputExtensionsInPackageBuildOutputFolder);.pdb</AllowedOutputExtensionsInPackageBuildOutputFolder>
15-
<IncludeSymbols>true</IncludeSymbols>
16-
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
14+
<DebugType>embedded</DebugType>
1715
<SignAssembly>true</SignAssembly>
1816
<AssemblyOriginatorKeyFile>..\libgit2sharp.snk</AssemblyOriginatorKeyFile>
1917
<PackageIcon>square-logo.png</PackageIcon>
2018
<PackageLicenseFile>App_Readme/LICENSE.md</PackageLicenseFile>
19+
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
2120
</PropertyGroup>
2221

2322
<ItemGroup>
24-
<CodeAnalysisDictionary Include="CustomDictionary.xml" />
25-
<None Include="..\square-logo.png" Pack="true" PackagePath="" />
26-
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" />
27-
<None Include="..\LICENSE.md" Pack="true" PackagePath="App_Readme/" />
28-
<None Include="..\CHANGES.md" Pack="true" PackagePath="App_Readme/" />
23+
<None Include="..\square-logo.png" Pack="true" PackagePath="" Visible="false" />
24+
<None Include="..\README.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
25+
<None Include="..\LICENSE.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
26+
<None Include="..\CHANGES.md" Pack="true" PackagePath="App_Readme/" Visible="false" />
2927
<None Update="Core\Handles\Objects.tt" Generator="TextTemplatingFileGenerator" LastGenOutput="Objects.cs" />
3028
<Compile Update="Core\Handles\Objects.cs" DependentUpon="Objects.tt" DesignTime="True" AutoGen="True" />
3129
<Service Include="{508349b6-6b84-4df5-91f0-309beebad82d}" /> <!-- Needed for T4 generation -->

LibGit2Sharp/LibGit2Sharp.v2.ncrunchproject

Lines changed: 0 additions & 25 deletions
This file was deleted.

LibGit2Sharp/Properties/AssemblyInfo.cs

Lines changed: 0 additions & 18 deletions
This file was deleted.

0 commit comments

Comments
 (0)