Skip to content

Commit

Permalink
Bumped versions (#276)
Browse files Browse the repository at this point in the history
* Bumped dotnet

* Bumped whisper.cpp

* Bumped xharness

* www

* Experinebt wutg wubdiws-latest

* added targets for maui with dotnet 9

* Fix static linking for iOS (#278)

---------

Co-authored-by: Aliaksei Kartashou <[email protected]>
  • Loading branch information
sandrohanea and AncientLust authored Nov 22, 2024
1 parent 9baedd4 commit 71040fa
Show file tree
Hide file tree
Showing 24 changed files with 44 additions and 45 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/dotnet-maui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- name: Download Artifacts
id: download-artifact
Expand All @@ -38,14 +38,14 @@ jobs:
run: dotnet restore ./Whisper.net.Maui.Tests.sln

- name: Publish android build
run: dotnet publish ./tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj -c Debug -f net8.0-android -p:EmbedAssembliesIntoApk=true
run: dotnet publish ./tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj -c Debug -f net9.0-android -p:EmbedAssembliesIntoApk=true

- name: Upload apk and ios app
uses: actions/upload-artifact@v4
with:
name: maui-build-artifacts
path: |
./tests/Whisper.net.Maui.Tests/bin/Debug/net8.0-android/com.companyname.whisper.net.maui.tests-Signed.apk
./tests/Whisper.net.Maui.Tests/bin/Debug/net9.0-android/com.companyname.whisper.net.maui.tests-Signed.apk
dotnet-maui-test-android:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -83,6 +83,7 @@ jobs:
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
arch: x86_64
script: xharness android test --app=./maui-build-artifacts/com.companyname.whisper.net.maui.tests-Signed.apk -p com.companyname.whisper.net.maui.tests -i com.companyname.whisper.net.maui.tests.AndroidMauiTestInstrumentation -o=./test-results/android

- name: Upload Maui Android xharness test results
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
with:
dotnet-version: |
8.0.x
6.0.x
9.0.x
- name: Download Artifacts
id: download-artifact
Expand Down Expand Up @@ -48,7 +48,7 @@ jobs:
with:
dotnet-version: |
8.0.x
6.0.x
9.0.x
- name: Download Artifacts
id: download-artifact
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
with:
dotnet-version: |
8.0.x
6.0.x
9.0.x
- name: Download Artifacts
id: download-artifact
Expand Down
13 changes: 5 additions & 8 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,20 @@
<!-- Directory.Packages.props gets included automatically during the build. Read more here:
https://learn.microsoft.com/en-us/nuget/consume-packages/Central-Package-Management-->
<ItemGroup>
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="8.0.0" />
<PackageVersion Include="System.Memory" Version="4.5.5" />
<PackageVersion Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageVersion Include="System.Memory" Version="4.6.0" />
<PackageVersion Include="System.IO.Compression" Version="4.3.0" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
<PackageVersion Include="FluentAssertions" Version="6.12.2" />
<PackageVersion Include="CommandLineParser" Version="2.9.1" />


<!-- Tests -->
<PackageVersion Include="coverlet.collector" Version="6.0.2" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageVersion Include="xunit" Version="2.9.2" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.8.2" />

<PackageVersion Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24555.2" />
<PackageVersion Include="Microsoft.DotNet.XHarness.TestRunners.Xunit" Version="10.0.0-prerelease.24564.1" />
<PackageVersion Include="xunit.assert" Version="2.9.2" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Logging.Debug" Version="9.0.0" />
<PackageVersion Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
<PackageVersion Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
</ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions Whisper.net.Demo/Whisper.net.Demo.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
<Import Condition="'$(EnableCoreML)' == 'true'" Project="../runtimes/Whisper.net.Runtime.CoreML/Whisper.net.Runtime.CoreML.targets" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<LangVersion>10</LangVersion>
<TargetFrameworks>net9.0</TargetFrameworks>
<LangVersion>13</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ namespace Whisper.net.Internals.Native.Implementations;
/// </summary>
internal partial class LibraryImportInternalWhisper : INativeWhisper
{
const string libraryName = "_Internal";
const string libraryName = "__Internal";

[LibraryImport(libraryName, StringMarshalling = StringMarshalling.Utf8)]
public static partial IntPtr whisper_init_from_file_with_params_no_state(string path, WhisperContextParams whisperContextParams);
Expand Down
4 changes: 2 additions & 2 deletions Whisper.net/Whisper.net.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
<LangVersion>13</LangVersion>
<Version>1.7.3</Version>
<Authors>Sandro Hanea</Authors>
<Description>Cross-platform dotnet bindings for Whisper.</Description>
Expand All @@ -30,7 +30,7 @@

<PropertyGroup Condition="$(USE_WHISPER_MAUI) != ''">
<TargetFrameworks>
net8.0;net6.0;netstandard2.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst;net8.0-android
net8.0;net9.0;netstandard2.0;net8.0-ios;net8.0-tvos;net8.0-maccatalyst;net8.0-android;net9.0-ios;net9.0-tvos;net9.0-maccatalyst;net9.0-android
</TargetFrameworks>
</PropertyGroup>

Expand Down
6 changes: 2 additions & 4 deletions examples/BlazorApp/BlazorApp.Client/BlazorApp.Client.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk.BlazorWebAssembly">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<NoDefaultLaunchSettingsFile>true</NoDefaultLaunchSettingsFile>
Expand All @@ -10,11 +10,9 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly" Version="9.0.0" />
<PackageReference Include="Whisper.net.Runtime" Version="1.7.2" />
<PackageReference Include="Whisper.net" Version="1.7.2" />
<!-- Version pinning for System.Text.Json just becasue of https://github.com/advisories/GHSA-hh2w-p6rv-4g7w warning -->
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions examples/BlazorApp/BlazorApp/BlazorApp.csproj
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net9.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\BlazorApp.Client\BlazorApp.Client.csproj" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" />
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="9.0.0" />
</ItemGroup>

</Project>
3 changes: 2 additions & 1 deletion examples/ContinuousRecognition/ContinuousRecognition.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>13</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/CoreML/CoreML.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/Diarization/Diarization.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net9.0</TargetFrameworks>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
Expand Down
6 changes: 3 additions & 3 deletions examples/Diarization/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@
fileStream.Position = headerSize + startSample * frameSize;

// Read the wave data for the specified time interval, into the readBuffer.
await fileStream.ReadAsync(readBuffer.AsMemory());
var read = await fileStream.ReadAsync(readBuffer.AsMemory());

// Process the readBuffer and convert to shorts.
var buffer = new short[bufferSize / 2];
for (var i = 0; i < buffer.Length; i++)
var buffer = new short[read / 2];
for (var i = 0; i < read; i++)
{
// Handle endianess manually and convert bytes to Int16.
buffer[i] = BitConverter.IsLittleEndian
Expand Down
2 changes: 1 addition & 1 deletion examples/MultiRuntime/MultiRuntime.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
3 changes: 2 additions & 1 deletion examples/NAudioMp3/NAudioMp3.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>13</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion examples/NAudioResampleWav/NAudioResampleWav.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net8.0</TargetFramework>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>13</LangVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion examples/NvidiaCuda/NvidiaCuda.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/OpenVinoExample/OpenVinoExample.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/ParallelExecution/ParallelExecution.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/Simple/Simple.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/SimpleSync/SimpleSync.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion examples/Vulkan/Vulkan.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net8.0; net472</TargetFrameworks>
<TargetFrameworks>net9.0; net472</TargetFrameworks>
<LangVersion>12</LangVersion>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion tests/Whisper.net.Maui.Tests/Whisper.net.Maui.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Import Project="../../runtimes/Whisper.net.Runtime/Whisper.net.Runtime.targets" />

<PropertyGroup>
<TargetFrameworks>net8.0-android;net8.0-ios;net8.0-maccatalyst</TargetFrameworks>
<TargetFrameworks>net9.0-android;net9.0-ios;net9.0-maccatalyst</TargetFrameworks>

<!-- Note for MacCatalyst:
The default runtime is maccatalyst-x64, except in Release config, in which case the default is maccatalyst-x64;maccatalyst-arm64.
Expand Down
6 changes: 3 additions & 3 deletions tests/Whisper.net.Tests/Whisper.net.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<PropertyGroup>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<LangVersion>12</LangVersion>
<LangVersion>13</LangVersion>
<IsTestProject>true</IsTestProject>
<TargetFrameworks>net8.0;net6.0</TargetFrameworks>
<TargetFrameworks>net8.0;net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
Expand All @@ -22,7 +22,7 @@

<PropertyGroup Condition="$([MSBuild]::IsOSPlatform('Windows'))">
<TargetFrameworks>
net8.0;net6.0;net472;
net8.0;net9.0;net472;
</TargetFrameworks>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion whisper.cpp
Submodule whisper.cpp updated 115 files

0 comments on commit 71040fa

Please sign in to comment.