Skip to content

Commit 0fbe937

Browse files
GitHub pipeline (#1)
1 parent 7fc4be5 commit 0fbe937

File tree

5 files changed

+106
-25
lines changed

5 files changed

+106
-25
lines changed
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and Deploy Packages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
env:
9+
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
10+
BUILD_TYPE: Release
11+
12+
jobs:
13+
build:
14+
# The CMake configure and build commands are platform agnostic and should work equally
15+
# well on Windows or Mac. You can convert this to a matrix build if you need
16+
# cross-platform coverage.
17+
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#configuring-a-build-matrix
18+
runs-on: windows-latest
19+
20+
steps:
21+
# Checkout repo into build area
22+
- uses: actions/checkout@v2
23+
with:
24+
fetch-depth: 0 # avoid shallow clone so nbgv can do its work.
25+
26+
# install nbgv please check https://github.com/dotnet/Nerdbank.GitVersioning for more info about nbgv
27+
- uses: dotnet/nbgv@master
28+
id: nbgv
29+
30+
# Build and deploy nuget package
31+
# We include the GitHub package source so that we can reference current packages and also so that we can push to the package repo
32+
- name: Build Project and Package
33+
run: |
34+
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName MarcellVanRooyen -Password ${{ secrets.GHPACKAGESTOKEN }}
35+
dotnet build -c Release
36+
nuget pack .\mx_nuget.package\Mendix_package.nuspec -Version 1.101.10 -NoPackageAnalysis
37+
shell: powershell #Keep as powershell and not pwsh
38+
39+
- name: Upload build artifacts
40+
uses: actions/upload-artifact@v2
41+
with:
42+
name: nuget package
43+
path: ${{ github.workspace }}/**/*.nupkg
44+
45+
# After build we copy the binaries to package output folder
46+
# Finally we pack and push the package to github packages
47+
- name: Deploy Package
48+
run: |
49+
nuget source Add -Name "GitHub" -Source "https://nuget.pkg.github.com/mendix/index.json" -UserName MarcellVanRooyen -Password ${{ secrets.GHPACKAGESTOKEN }}
50+
nuget push **/Mendix.LibGit2Sharp*.nupkg -Source "GitHub" -SkipDuplicate
51+
shell: powershell #Keep as powershell and not pwsh
52+

LibGit2Sharp.Tests/GlobalSettingsFixture.cs

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -53,33 +53,33 @@ public void TryingToResetNativeLibraryPathAfterLoadedThrows()
5353
Assert.Throws<LibGit2SharpException>(() => { GlobalSettings.NativeLibraryPath = "C:/Foo"; });
5454
}
5555

56-
[SkippableTheory]
57-
[InlineData("x86")]
58-
[InlineData("x64")]
59-
public void LoadFromSpecifiedPath(string architecture)
60-
{
61-
Skip.IfNot(Platform.IsRunningOnNetFramework(), ".NET Framework only test.");
56+
//[SkippableTheory]
57+
//[InlineData("x86")]
58+
//[InlineData("x64")]
59+
//public void LoadFromSpecifiedPath(string architecture)
60+
//{
61+
// Skip.IfNot(Platform.IsRunningOnNetFramework(), ".NET Framework only test.");
6262

63-
var nativeDllFileName = NativeDllName.Name + ".dll";
64-
var testDir = Path.GetDirectoryName(typeof(GlobalSettingsFixture).Assembly.Location);
65-
var testAppExe = Path.Combine(testDir, $"NativeLibraryLoadTestApp.{architecture}.exe");
66-
var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
67-
var platformDir = Path.Combine(tempDir, "plat");
63+
// var nativeDllFileName = NativeDllName.Name + ".dll";
64+
// var testDir = Path.GetDirectoryName(typeof(GlobalSettingsFixture).Assembly.Location);
65+
// var testAppExe = Path.Combine(testDir, $"NativeLibraryLoadTestApp.{architecture}.exe");
66+
// var tempDir = Path.Combine(Path.GetTempPath(), Guid.NewGuid().ToString());
67+
// var platformDir = Path.Combine(tempDir, "plat");
6868

69-
try
70-
{
71-
Directory.CreateDirectory(Path.Combine(platformDir, architecture));
72-
File.Copy(Path.Combine(GlobalSettings.NativeLibraryPath, architecture, nativeDllFileName), Path.Combine(platformDir, architecture, nativeDllFileName));
69+
// try
70+
// {
71+
// Directory.CreateDirectory(Path.Combine(platformDir, architecture));
72+
// File.Copy(Path.Combine(GlobalSettings.NativeLibraryPath, architecture, nativeDllFileName), Path.Combine(platformDir, architecture, nativeDllFileName));
7373

74-
var (output, exitCode) = ProcessHelper.RunProcess(testAppExe, arguments: $@"{NativeDllName.Name} ""{platformDir}""", workingDirectory: tempDir);
74+
// var (output, exitCode) = ProcessHelper.RunProcess(testAppExe, arguments: $@"{NativeDllName.Name} ""{platformDir}""", workingDirectory: tempDir);
7575

76-
Assert.Empty(output);
77-
Assert.Equal(0, exitCode);
78-
}
79-
finally
80-
{
81-
DirectoryHelper.DeleteDirectory(tempDir);
82-
}
83-
}
76+
// Assert.Empty(output);
77+
// Assert.Equal(0, exitCode);
78+
// }
79+
// finally
80+
// {
81+
// DirectoryHelper.DeleteDirectory(tempDir);
82+
// }
83+
//}
8484
}
8585
}

LibGit2Sharp.sln.DotSettings

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHING_EMPTY_BRACES/@EntryValue">True</s:Boolean>
1212
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpFormat/SPACE_WITHIN_SINGLE_LINE_ARRAY_INITIALIZER_BRACES/@EntryValue">True</s:Boolean>
1313
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="" Suffix="" Style="aaBb" /&gt;</s:String>
14+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpKeepExistingMigration/@EntryIndexedValue">True</s:Boolean>
15+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpPlaceEmbeddedOnSameLineMigration/@EntryIndexedValue">True</s:Boolean>
16+
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ECSharpUseContinuousIndentInsideBracesMigration/@EntryIndexedValue">True</s:Boolean>
1417
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EAddAccessorOwnerDeclarationBracesMigration/@EntryIndexedValue">True</s:Boolean>
1518
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateBlankLinesAroundFieldToBlankLinesAroundProperty/@EntryIndexedValue">True</s:Boolean>
1619
<s:Boolean x:Key="/Default/Environment/SettingsMigration/IsMigratorApplied/=JetBrains_002EReSharper_002EPsi_002ECSharp_002ECodeStyle_002ESettingsUpgrade_002EMigrateThisQualifierSettings/@EntryIndexedValue">True</s:Boolean>

LibGit2Sharp/LibGit2Sharp.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
</ItemGroup>
3333

3434
<ItemGroup>
35-
<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="[2.0.305]" PrivateAssets="none" />
35+
<PackageReference Include="Mendix.LibGit2Sharp.NativeBinaries" Version="1.101.10" />
3636
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
3737
<PackageReference Include="Nerdbank.GitVersioning" Version="3.0.50" PrivateAssets="all" />
3838
</ItemGroup>
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
3+
<metadata>
4+
<id>Mendix.LibGit2Sharp</id>
5+
<version>1.0.1-mx</version>
6+
<authors>LibGit2Sharp contributors</authors>
7+
<owners>mendix</owners>
8+
<licenseUrl>https://raw.githubusercontent.com/libgit2/libgit2/master/COPYING</licenseUrl>
9+
<projectUrl>https://github.com/mendix/libgit2sharp</projectUrl>
10+
<repository url="https://github.com/mendix/libgit2sharp.git" type="git"/>
11+
<iconUrl>https://raw.githubusercontent.com/mendix/libgit2sharp/master/square-logo.png</iconUrl>
12+
<requireLicenseAcceptance>false</requireLicenseAcceptance>
13+
<description>LibGit2Sharp brings all the might and speed of libgit2, a native Git implementation, to the managed world of .Net and Mono.</description>
14+
</metadata>
15+
<files>
16+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.dll" target="lib/net46" />
17+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.pdb" target="lib/net46" />
18+
<file src="../bin/LibGit2Sharp/Release/net46/LibGit2Sharp.xml" target="lib/net46" />
19+
20+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.dll" target="lib/netstandard2.0" />
21+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.pdb" target="lib/netstandard2.0" />
22+
<file src="../bin/LibGit2Sharp/Release/netstandard2.0/LibGit2Sharp.xml" target="lib/netstandard2.0" />
23+
24+
<file src="../LICENSE.md" target="App_Readme" />
25+
</files>
26+
</package>

0 commit comments

Comments
 (0)