Skip to content

Commit 0a20ce0

Browse files
authored
Update nuget.org tests to point to new version and fix native library name resolution (#100)
* Update nuget.org tests to point to new version * Dynamically dispatch platform dependent library names
1 parent f720a41 commit 0a20ce0

35 files changed

+1338
-1069
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: nuget.org-linux
4+
5+
on:
6+
push: { branches: [ master ] }
7+
pull_request: { branches: [ master ] }
8+
release: { types: [published] } # runs on “Publish release” button
9+
workflow_dispatch: # lets you run it by hand
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v4
17+
name: Checkout Code
18+
with:
19+
fetch-depth: 0
20+
21+
# Necessary for running neato
22+
- name: Install libgts
23+
run: sudo apt-get update && sudo apt-get install -y libgts-0.7-5
24+
25+
- name: Setup .NET
26+
uses: actions/setup-dotnet@v3
27+
with:
28+
dotnet-version: 8.0.x
29+
30+
- name: Setup Just
31+
uses: extractions/setup-just@v3
32+
33+
- name: Build and test
34+
run: just test-nugetorg
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: nuget.org-windows
4+
5+
on:
6+
push: { branches: [ master ] }
7+
pull_request: { branches: [ master ] }
8+
release: { types: [published] } # runs on “Publish release” button
9+
workflow_dispatch: # lets you run it by hand
10+
11+
jobs:
12+
build:
13+
runs-on: windows-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
name: Checkout Code
17+
with:
18+
fetch-depth: 0
19+
20+
- name: Add msbuild to PATH
21+
uses: microsoft/[email protected]
22+
23+
- name: Setup NuGet.exe for use with actions
24+
uses: NuGet/[email protected]
25+
26+
- name: Setup Just
27+
uses: extractions/setup-just@v3
28+
29+
- name: Build and test
30+
run: just test-nugetorg

How-to-release.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
- Bump the version number in Rubjerg.Graphviz.csproj to the version to be released.
2-
- Make a PR and grab the nuget package from the CI artifacts.
1+
- Make a prerelease on github (and add a new tag there). This will trigger the CI.
2+
- Grab the nuget package from the CI artifacts.
33
- Upload the .nupkg file to nuget.org.
44
- Upload to https://www.nuget.org/packages/manage/upload
5+
- Mark as unlisted
56
- Make a cup of coffee
67
- Update the version of the referenced Nuget package in the NugetOrgTest project to the package that was just uploaded and run the test.
7-
- dotnet add Rubjerg.Graphviz.NugetOrgTest\Rubjerg.Graphviz.NugetOrgTest.csproj package Rubjerg.Graphviz
8-
- If the build and test succeeds we are ready to release. Merge the PR, add the tag, and push this to github.
9-
- Merge PR on github
10-
- git tag vx.y.z
11-
- git push github --tags
12-
- In GitHub, add a new release of the just pushed commit at https://github.com/Rubjerg/Graphviz.NetWrapper/releases.
8+
- dotnet add NugetOrgTests/Rubjerg.Graphviz.NugetOrgTest/Rubjerg.Graphviz.NugetOrgTest.csproj package Rubjerg.Graphviz
9+
- Make a PR for this and merge when this succeeds.
10+
- Mark prerelease as latest release on github and nuget.org

NugetOrgTests/Rubjerg.Graphviz.NugetOrgTest/Rubjerg.Graphviz.NugetOrgTest.csproj

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,20 @@
55
<TargetFrameworks>net8.0</TargetFrameworks>
66
<Platforms>x64</Platforms>
77
<PlatformTarget>x64</PlatformTarget>
8-
<Authors>Chiel ten Brinke</Authors>
9-
<Company>Rubjerg</Company>
108
<RestorePackagesPath>..\packages</RestorePackagesPath>
119
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
10+
<LangVersion>latest</LangVersion>
1211
<DebugType>embedded</DebugType>
12+
<!-- <RuntimeIdentifier>win-x64</RuntimeIdentifier> -->
13+
</PropertyGroup>
14+
15+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
16+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
1317
</PropertyGroup>
1418

1519
<ItemGroup>
1620
<PackageReference Include="Rubjerg.Graphviz">
17-
<Version>2.0.2</Version>
21+
<Version>3.0.0</Version>
1822
</PackageReference>
1923
<PackageReference Include="NUnit.ConsoleRunner">
2024
<Version>3.18.3</Version>

NugetOrgTests/Rubjerg.Graphviz.NugetOrgTransitiveTest/Rubjerg.Graphviz.NugetOrgTransitiveTest.csproj

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,16 @@
55
<TargetFrameworks>net8.0</TargetFrameworks>
66
<Platforms>x64</Platforms>
77
<PlatformTarget>x64</PlatformTarget>
8-
<Authors>Chiel ten Brinke</Authors>
9-
<Company>Rubjerg</Company>
108
<RestorePackagesPath>..\packages</RestorePackagesPath>
119
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
10+
<LangVersion>latest</LangVersion>
1211
<DebugType>embedded</DebugType>
1312
</PropertyGroup>
1413

14+
<PropertyGroup Condition="'$(Configuration)'=='Release'">
15+
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
16+
</PropertyGroup>
17+
1518
<ItemGroup>
1619
<ProjectReference Include="..\Rubjerg.Graphviz.NugetOrgTest\Rubjerg.Graphviz.NugetOrgTest.csproj" />
1720
</ItemGroup>

NugetOrgTests/Rubjerg.Graphviz.NugetOrgTransitiveTest/Test.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
using NUnit.Framework;
2-
using Rubjerg.Graphviz.Test;
32

43
namespace Rubjerg.Graphviz.NugetOrgTest
54
{

Rubjerg.Graphviz.Test/Reproductions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
using System.Globalization;
44
using System.IO;
55
using System.Linq;
6-
using static Rubjerg.Graphviz.ForeignFunctionInterface;
6+
using static Rubjerg.Graphviz.FFI.GraphvizFFI;
77

88
namespace Rubjerg.Graphviz.Test;
99

Rubjerg.Graphviz.Test/Rubjerg.Graphviz.Test.csproj

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
<TargetFrameworks>net8.0</TargetFrameworks>
66
<Platforms>x64</Platforms>
77
<PlatformTarget>x64</PlatformTarget>
8-
<Authors>Chiel ten Brinke</Authors>
9-
<Company>Rubjerg</Company>
108
<RestorePackagesPath>..\packages</RestorePackagesPath>
119
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
1210
<LangVersion>latest</LangVersion>

Rubjerg.Graphviz.Test/TestInterop.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using NUnit.Framework;
22
using System.IO;
33
using System;
4-
using static Rubjerg.Graphviz.ForeignFunctionInterface;
4+
using static Rubjerg.Graphviz.FFI.GraphvizFFI;
5+
using static Rubjerg.Graphviz.FFI.TestLib;
56

67
namespace Rubjerg.Graphviz.Test;
78

Rubjerg.Graphviz.Test/TestXDotLayout.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
namespace Rubjerg.Graphviz.Test;
66

7+
using FFI;
8+
79
[TestFixture()]
810
public class TestXDotLayout
911
{

0 commit comments

Comments
 (0)