Skip to content

Commit

Permalink
voicevox_coreのビルドに使用されたものを使う
Browse files Browse the repository at this point in the history
  • Loading branch information
yamachu committed Jan 24, 2025
1 parent 7b2f967 commit 668e1c5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/csharp_test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: CI

on:
push:
pull_request:
branches-ignore:
- 'auto.**'
workflow_call:
Expand All @@ -24,7 +24,9 @@ jobs:
ref: ${{ inputs.checkout-ref || github.head_ref }}
- uses: ./.github/composite/build-dev-rust
with:
cache-path: ./binding/voicevox_core/target/release/libvoicevox_core.so
cache-path: |
./binding/voicevox_core/target/release/libvoicevox_core.so
./binding/voicevox_core/target/release/libonnxruntime.so
cache-key: ${{ runner.os }}-dev-library-${{ hashFiles('**/Cargo.lock', '**/VoicevoxCoreSharp.Core.Metas.props') }}

test-dotnet:
Expand All @@ -40,9 +42,12 @@ jobs:
dotnet-version: 6
- uses: actions/cache/restore@v4
with:
path: ./binding/voicevox_core/target/release/libvoicevox_core.so
path: |
./binding/voicevox_core/target/release/libvoicevox_core.so
./binding/voicevox_core/target/release/libonnxruntime.so
key: ${{ runner.os }}-dev-library-${{ hashFiles('**/Cargo.lock', '**/VoicevoxCoreSharp.Core.Metas.props') }}
- run: cp ./binding/voicevox_core/target/release/libvoicevox_core.so ./tests/VoicevoxCoreSharp.Core.Tests/resources/libvoicevox_core.so
- run: ls -al ./binding/voicevox_core/target/release; cp ./binding/voicevox_core/target/release/libonnxruntime.so ./examples/cli/voicevox_core/libonnxruntime.so
- uses: ./.github/composite/download-openjtalk-dict
with:
cache-path: open_jtalk_dic_utf_8-1.11.tar.gz
Expand All @@ -67,10 +72,13 @@ jobs:
dotnet-version: 8
- uses: actions/cache/restore@v4
with:
path: ./binding/voicevox_core/target/release/libvoicevox_core.so
path: |
./binding/voicevox_core/target/release/libvoicevox_core.so
./binding/voicevox_core/target/release/libonnxruntime.so
key: ${{ runner.os }}-dev-library-${{ hashFiles('**/Cargo.lock', '**/VoicevoxCoreSharp.Core.Metas.props') }}
- run: mkdir -p ./examples/cli/voicevox_core
- run: cp ./binding/voicevox_core/target/release/libvoicevox_core.so ./examples/cli/voicevox_core/libvoicevox_core.so
- run: ls -al ./binding/voicevox_core/target/release; cp ./binding/voicevox_core/target/release/libonnxruntime.so ./examples/cli/voicevox_core/libonnxruntime.so
- uses: ./.github/composite/download-openjtalk-dict
with:
cache-path: open_jtalk_dic_utf_8-1.11.tar.gz
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
<Import Project="..\..\src\VoicevoxCoreSharp.Core\VoicevoxCoreSharp.Core.Metas.props" />

<ItemGroup>
<PackageReference Include="Microsoft.ML.OnnxRuntime" Version="$(VoicevoxOnnxRuntimeVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.12.0" />
<PackageReference Include="xunit" Version="2.9.2" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
Expand Down Expand Up @@ -70,14 +69,14 @@
<Content Include="resources\libvoicevox_core.so" TargetPath="runtimes\$(_MyRuntimeIdentifier)\native\libvoicevox_core.so" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Content Include="resources\voicevox_core.dll" TargetPath="runtimes\$(_MyRuntimeIdentifier)\native\voicevox_core.dll" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />

<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime.dylib" TargetPath="libonnxruntime.dylib" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime.so" TargetPath="runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime.so" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\onnxruntime.dll" TargetPath="onnxruntime.dll" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
<Content Include="resources\libonnxruntime.dylib" TargetPath="libonnxruntime.dylib" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<Content Include="resources\libonnxruntime.so" TargetPath="libonnxruntime.so" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Content Include="resources\onnxruntime.dll" TargetPath="onnxruntime.dll" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />

<!-- for load testing -->
<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime.dylib" TargetPath="libonnxruntime_another_path.dylib" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime.so" TargetPath="runtimes\$(_MyRuntimeIdentifier)\native\libonnxruntime_another_path.so" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Content Include="$(OutputPath)runtimes\$(_MyRuntimeIdentifier)\native\onnxruntime.dll" TargetPath="onnxruntime_another_path.dll" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
<Content Include="resources\libonnxruntime.dylib" TargetPath="libonnxruntime_another_path.dylib" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('OSX'))" />
<Content Include="resources\libonnxruntime.so" TargetPath="libonnxruntime_another_path.so" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Linux'))" />
<Content Include="resources\onnxruntime.dll" TargetPath="onnxruntime_another_path.dll" Visible="false" CopyToOutputDirectory="PreserveNewest" Condition="$([MSBuild]::IsOsPlatform('Windows'))" />
</ItemGroup>

</Project>

0 comments on commit 668e1c5

Please sign in to comment.