Skip to content
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
34 changes: 34 additions & 0 deletions .github/workflows/nuget.org-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a basic workflow to help you get started with Actions

name: nuget.org-linux

on:
push: { branches: [ master ] }
pull_request: { branches: [ master ] }
release: { types: [published] } # runs on “Publish release” button
workflow_dispatch: # lets you run it by hand

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
name: Checkout Code
with:
fetch-depth: 0

# Necessary for running neato
- name: Install libgts
run: sudo apt-get update && sudo apt-get install -y libgts-0.7-5

- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x

- name: Setup Just
uses: extractions/setup-just@v3

- name: Build and test
run: just test-nugetorg
30 changes: 30 additions & 0 deletions .github/workflows/nuget.org-windows.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This is a basic workflow to help you get started with Actions

name: nuget.org-windows

on:
push: { branches: [ master ] }
pull_request: { branches: [ master ] }
release: { types: [published] } # runs on “Publish release” button
workflow_dispatch: # lets you run it by hand

jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
name: Checkout Code
with:
fetch-depth: 0

- name: Add msbuild to PATH
uses: microsoft/[email protected]

- name: Setup NuGet.exe for use with actions
uses: NuGet/[email protected]

- name: Setup Just
uses: extractions/setup-just@v3

- name: Build and test
run: just test-nugetorg
14 changes: 6 additions & 8 deletions How-to-release.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
- Bump the version number in Rubjerg.Graphviz.csproj to the version to be released.
- Make a PR and grab the nuget package from the CI artifacts.
- Make a prerelease on github (and add a new tag there). This will trigger the CI.
- Grab the nuget package from the CI artifacts.
- Upload the .nupkg file to nuget.org.
- Upload to https://www.nuget.org/packages/manage/upload
- Mark as unlisted
- Make a cup of coffee
- Update the version of the referenced Nuget package in the NugetOrgTest project to the package that was just uploaded and run the test.
- dotnet add Rubjerg.Graphviz.NugetOrgTest\Rubjerg.Graphviz.NugetOrgTest.csproj package Rubjerg.Graphviz
- If the build and test succeeds we are ready to release. Merge the PR, add the tag, and push this to github.
- Merge PR on github
- git tag vx.y.z
- git push github --tags
- In GitHub, add a new release of the just pushed commit at https://github.com/Rubjerg/Graphviz.NetWrapper/releases.
- dotnet add NugetOrgTests/Rubjerg.Graphviz.NugetOrgTest/Rubjerg.Graphviz.NugetOrgTest.csproj package Rubjerg.Graphviz
- Make a PR for this and merge when this succeeds.
- Mark prerelease as latest release on github and nuget.org
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
<Company>Rubjerg</Company>
<RestorePackagesPath>..\packages</RestorePackagesPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>
<!-- <RuntimeIdentifier>win-x64</RuntimeIdentifier> -->
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Rubjerg.Graphviz">
<Version>2.0.2</Version>
<Version>3.0.0</Version>
</PackageReference>
<PackageReference Include="NUnit.ConsoleRunner">
<Version>3.18.3</Version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,16 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
<Company>Rubjerg</Company>
<RestorePackagesPath>..\packages</RestorePackagesPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Rubjerg.Graphviz.NugetOrgTest\Rubjerg.Graphviz.NugetOrgTest.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using NUnit.Framework;
using Rubjerg.Graphviz.Test;

namespace Rubjerg.Graphviz.NugetOrgTest
{
Expand Down
2 changes: 1 addition & 1 deletion Rubjerg.Graphviz.Test/Reproductions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using static Rubjerg.Graphviz.ForeignFunctionInterface;
using static Rubjerg.Graphviz.FFI.GraphvizFFI;

namespace Rubjerg.Graphviz.Test;

Expand Down
2 changes: 0 additions & 2 deletions Rubjerg.Graphviz.Test/Rubjerg.Graphviz.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
<Company>Rubjerg</Company>
<RestorePackagesPath>..\packages</RestorePackagesPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<LangVersion>latest</LangVersion>
Expand Down
3 changes: 2 additions & 1 deletion Rubjerg.Graphviz.Test/TestInterop.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
using NUnit.Framework;
using System.IO;
using System;
using static Rubjerg.Graphviz.ForeignFunctionInterface;
using static Rubjerg.Graphviz.FFI.GraphvizFFI;
using static Rubjerg.Graphviz.FFI.TestLib;

namespace Rubjerg.Graphviz.Test;

Expand Down
2 changes: 2 additions & 0 deletions Rubjerg.Graphviz.Test/TestXDotLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

namespace Rubjerg.Graphviz.Test;

using FFI;

[TestFixture()]
public class TestXDotLayout
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,16 @@
<TargetFrameworks>net8.0</TargetFrameworks>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
<Authors>Chiel ten Brinke</Authors>
<Company>Rubjerg</Company>
<RestorePackagesPath>..\packages</RestorePackagesPath>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<LangVersion>latest</LangVersion>
<DebugType>embedded</DebugType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)'=='Release'">
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="NUnit.ConsoleRunner">
<Version>3.18.3</Version>
Expand Down
3 changes: 2 additions & 1 deletion Rubjerg.Graphviz/CGraphThing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
using System.Linq;
using System.Collections.Generic;
using System.Diagnostics;
using static Rubjerg.Graphviz.ForeignFunctionInterface;
using static Rubjerg.Graphviz.FFI.GraphvizFFI;
using System.Globalization;
using Rubjerg.Graphviz.FFI;

namespace Rubjerg.Graphviz;

Expand Down
19 changes: 0 additions & 19 deletions Rubjerg.Graphviz/Constants.cs

This file was deleted.

2 changes: 1 addition & 1 deletion Rubjerg.Graphviz/Edge.cs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
using System;
using System.Collections.Generic;
using System.Linq;
using static Rubjerg.Graphviz.ForeignFunctionInterface;
using static Rubjerg.Graphviz.FFI.GraphvizFFI;

namespace Rubjerg.Graphviz;

Expand Down
14 changes: 14 additions & 0 deletions Rubjerg.Graphviz/FFI/Constants.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
namespace Rubjerg.Graphviz.FFI;

internal static class Constants
{
public const string GvcLibNameWindows = "gvc";
public const string CGraphLibNameWindows = "cgraph";
public const string XDotLibNameWindows = "xdot";

public const string GvcLibNameLinux = "libgvc.so.6";
public const string CGraphLibNameLinux = "libcgraph.so.6";
public const string XDotLibNameLinux = "libxdot.so.4";

public const string GraphvizWrapperLibName = "GraphvizWrapper";
}
Loading
Loading