Skip to content

Commit b6191a7

Browse files
committed
v4.0 dotnet testing updates
1 parent c93e382 commit b6191a7

File tree

4 files changed

+32
-64
lines changed

4 files changed

+32
-64
lines changed

.github/workflows/dotnet.yml

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -50,23 +50,18 @@ jobs:
5050
strategy:
5151
matrix:
5252
device: [cpu, cpu:1]
53-
os: [ubuntu-latest, macos-latest, macos-13, windows-latest]
53+
os: [ubuntu-latest, macos-latest, macos-15, windows-latest]
5454
dotnet-version: [2.1.x, 3.1.x, 6.0.x, 8.0.x, 10.0.x]
5555
include:
5656
- dotnet-version: 2.1.x
57-
binding-framework: netstandard2.0
5857
test-framework: netcoreapp2.1
5958
- dotnet-version: 3.1.x
60-
binding-framework: netstandard2.0
6159
test-framework: netcoreapp3.1
6260
- dotnet-version: 6.0.x
63-
binding-framework: net6.0
6461
test-framework: net6.0
6562
- dotnet-version: 8.0.x
66-
binding-framework: net8.0
6763
test-framework: net8.0
6864
- dotnet-version: 10.0.x
69-
binding-framework: net8.0
7065
test-framework: net10.0
7166
exclude:
7267
- os: ubuntu-latest
@@ -77,12 +72,6 @@ jobs:
7772
dotnet-version: 2.1.x
7873
- os: macos-latest
7974
dotnet-version: 3.1.x
80-
- os: macos-latest
81-
dotnet-version: 6.0.x
82-
- os: macos-13
83-
dotnet-version: 8.0.x
84-
- os: macos-13
85-
dotnet-version: 10.0.x
8675

8776
steps:
8877
- uses: actions/checkout@v3
@@ -92,17 +81,23 @@ jobs:
9281
with:
9382
dotnet-version: ${{ matrix.dotnet-version }}
9483

95-
- name: Set up .NET (8)
96-
if: ${{ matrix.os == 'ubuntu-latest' && matrix.dotnet-version == '6.0.x' }}
97-
uses: actions/setup-dotnet@v3
98-
with:
99-
dotnet-version: 8.0.x
100-
10184
- name: Build binding
102-
run: dotnet build Rhino/Rhino.csproj --framework ${{ matrix.binding-framework }}
85+
run: dotnet build Rhino/Rhino.csproj
86+
87+
- name: Set test framework version (linux)
88+
if: ${{ matrix.os == 'ubuntu-latest' }}
89+
run: sed -i 's/net6.0/${{matrix.test-framework}}/g' RhinoTest/RhinoTest.csproj
90+
91+
- name: Set test framework version (macos)
92+
if: ${{ matrix.os == 'macos-latest' || matrix.os == 'macos-15' }}
93+
run: sed -i '.bak' 's/net6.0/${{matrix.test-framework}}/g' RhinoTest/RhinoTest.csproj
94+
95+
- name: Set test framework version (windows)
96+
if: ${{ matrix.os == 'windows-latest' }}
97+
run: (Get-Content -Path "RhinoTest/RhinoTest.csproj") -replace "net6.0", "${{matrix.test-framework}}" | Set-Content -Path "RhinoTest/RhinoTest.csproj"
10398

10499
- name: Test
105-
run: dotnet test --framework ${{ matrix.test-framework }} -v n
100+
run: dotnet test -v n
106101
env:
107102
DEVICE: ${{ matrix.device }}
108103

@@ -120,9 +115,10 @@ jobs:
120115
- uses: actions/checkout@v3
121116

122117
- name: Build binding
123-
run: dotnet build Rhino/Rhino.csproj --framework net8.0
118+
run: dotnet build Rhino/Rhino.csproj
124119

125120
- name: Test
126-
run: dotnet test --framework net8.0 -v n
121+
run: dotnet test -v n
127122
env:
128-
DEVICE: ${{ matrix.device }}
123+
DEVICE: ${{ matrix.device }}
124+
DOTNET_ROLL_FORWARD: LatestMajor

binding/dotnet/README.md

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,21 @@ Rhino is:
2727

2828
## Compatibility
2929

30-
Platform compatible with .NET Framework 4.6.1+:
30+
Platforms compatible with .NET Standard 2.0+:
3131

32-
- Windows (x86_64, arm64)
32+
- macOS (x86_64)
33+
- Windows (x86_64)
3334

34-
Platforms compatible with .NET Core 2.0+:
35+
Platforms compatible with .NET 6.0+:
3536

3637
- Linux (x86_64)
37-
- macOS (x86_64)
38+
- macOS (x86_64, arm64)
3839
- Windows (x86_64, arm64)
39-
40-
Platforms compatible with .NET Core 3.0+:
41-
4240
- Raspberry Pi:
4341
- 3 (32 and 64 bit)
4442
- 4 (32 and 64 bit)
4543
- 5 (32 and 64 bit)
4644

47-
Platform compatible with .NET 6.0+:
48-
49-
- macOS (arm64)
50-
5145
## Installation
5246

5347
You can install the latest version of Rhino by getting the latest [Rhino Nuget package](https://www.nuget.org/packages/Rhino/) in Visual Studio or using the .NET CLI:

binding/dotnet/Rhino/Rhino.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net8.0;net6.0;netstandard2.0</TargetFrameworks>
4+
<TargetFrameworks>net6.0;netstandard2.0</TargetFrameworks>
55
<Version>4.0.0</Version>
66
<Authors>Picovoice</Authors>
77
<Company />
@@ -43,39 +43,26 @@
4343
<Content Include="Rhino.targets">
4444
<PackagePath>
4545
buildTransitive/net6.0/Rhino.targets;
46-
buildTransitive/net8.0/Rhino.targets;
4746
</PackagePath>
4847
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
4948
</Content>
5049
</ItemGroup>
5150

5251
<!--.NET Standard 2.0+ Libs-->
5352
<ItemGroup>
54-
<Content Include="..\..\..\lib\windows\amd64\libpv_rhino.dll">
53+
<Content Include="..\..\..\lib\windows\amd64\*">
5554
<PackagePath>
56-
buildTransitive/netstandard2.0/libpv_rhino.dll;
57-
buildTransitive/net6.0/lib/windows/amd64/libpv_rhino.dll;
58-
buildTransitive/net8.0/lib/windows/amd64/libpv_rhino.dll;
55+
buildTransitive/netstandard2.0;
56+
buildTransitive/net6.0/lib/windows/amd64;
5957
</PackagePath>
6058
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
61-
<Link>lib\windows\amd64\libpv_rhino.dll</Link>
62-
<Visible>false</Visible>
63-
</Content>
64-
<Content Include="..\..\..\lib\windows\amd64\pv_ypu_impl_cuda.dll">
65-
<PackagePath>
66-
buildTransitive/netstandard2.0/pv_ypu_impl_cuda.dll;
67-
buildTransitive/net6.0/lib/windows/amd64/pv_ypu_impl_cuda.dll;
68-
buildTransitive/net8.0/lib/windows/amd64/pv_ypu_impl_cuda.dll;
69-
</PackagePath>
70-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
71-
<Link>lib\windows\amd64\libpv_rhino.dll</Link>
59+
<Link>lib\windows\amd64\%(Filename)%(Extension)</Link>
7260
<Visible>false</Visible>
7361
</Content>
7462
<Content Include="..\..\..\lib\mac\x86_64\libpv_rhino.dylib">
7563
<PackagePath>
7664
buildTransitive/netstandard2.0/libpv_rhino.dylib;
7765
buildTransitive/net6.0/lib/mac/x86_64/libpv_rhino.dylib;
78-
buildTransitive/net8.0/lib/mac/x86_64/libpv_rhino.dylib;
7966
</PackagePath>
8067
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
8168
<Link>lib\mac\x86_64\libpv_rhino.dylib</Link>
@@ -88,7 +75,6 @@
8875
<Content Include="..\..\..\lib\mac\arm64\libpv_rhino.dylib">
8976
<PackagePath>
9077
buildTransitive/net6.0/lib/mac/arm64/libpv_rhino.dylib;
91-
buildTransitive/net8.0/lib/mac/arm64/libpv_rhino.dylib;
9278
</PackagePath>
9379
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
9480
<Link>lib\mac\arm64\libpv_rhino.dylib</Link>
@@ -97,7 +83,6 @@
9783
<Content Include="..\..\..\lib\windows\arm64\libpv_rhino.dll">
9884
<PackagePath>
9985
buildTransitive/net6.0/lib/windows/arm64/libpv_rhino.dll;
100-
buildTransitive/net8.0/lib/windows/arm64/libpv_rhino.dll;
10186
</PackagePath>
10287
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
10388
<Link>lib\windows\arm64\libpv_rhino.dll</Link>
@@ -106,7 +91,6 @@
10691
<Content Include="..\..\..\lib\linux\x86_64\libpv_rhino.so">
10792
<PackagePath>
10893
buildTransitive/net6.0/lib/linux/x86_64/libpv_rhino.so;
109-
buildTransitive/net8.0/lib/linux/x86_64/libpv_rhino.so;
11094
</PackagePath>
11195
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
11296
<Link>lib\linux\x86_64\libpv_rhino.so</Link>
@@ -115,7 +99,6 @@
11599
<Content Include="..\..\..\lib\raspberry-pi\**\*" Exclude="..\..\..\lib\raspberry-pi\arm11\*">
116100
<PackagePath>
117101
buildTransitive/net6.0/lib/raspberry-pi;
118-
buildTransitive/net8.0/lib/raspberry-pi;
119102
</PackagePath>
120103
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
121104
<Link>lib\raspberry-pi\%(RecursiveDir)%(Filename)%(Extension)</Link>

binding/dotnet/RhinoTest/RhinoTest.csproj

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

33
<PropertyGroup>
4-
<TargetFrameworks>net10.0;net8.0;net6.0;netcoreapp3.1;netcoreapp2.1;</TargetFrameworks>
4+
<TargetFrameworks>net6.0</TargetFrameworks>
55
<IsPackable>false</IsPackable>
66
</PropertyGroup>
77

@@ -39,14 +39,9 @@
3939
</Content>
4040
</ItemGroup>
4141
<ItemGroup>
42-
<Content Include="..\..\..\lib\windows\amd64\libpv_rhino.dll">
42+
<Content Include="..\..\..\lib\windows\amd64\*">
4343
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
44-
<Link>libpv_rhino.dll</Link>
45-
<Visible>false</Visible>
46-
</Content>
47-
<Content Include="..\..\..\lib\windows\amd64\pv_ypu_impl_cuda.dll">
48-
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
49-
<Link>pv_ypu_impl_cuda.dll</Link>
44+
<Link>%(Filename)%(Extension)</Link>
5045
<Visible>false</Visible>
5146
</Content>
5247
<Content Include="..\..\..\lib\linux\x86_64\libpv_rhino.so">

0 commit comments

Comments
 (0)