-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (77 loc) · 3.08 KB
/
csharp_test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: push
jobs:
build-native-dev-library:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./binding
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: ./.github/composite/build-dev-rust
with:
cache-path: ./binding/voicevox_core/target/release/libvoicevox_core.so
cache-key: ${{ runner.os }}-dev-library-${{ hashFiles('**/Cargo.lock', '**/VoicevoxCoreSharp.Core.Metas.props') }}
test-dotnet:
runs-on: ubuntu-latest
needs: build-native-dev-library
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 6
- uses: actions/cache/restore@v3
with:
path: ./binding/voicevox_core/target/release/libvoicevox_core.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
- uses: ./.github/composite/download-openjtalk-dict
with:
cache-path: open_jtalk_dic_utf_8-1.11.tar.gz
cache-key: open_jtalk_dic_utf_8-1.11
- run: |
cp open_jtalk_dic_utf_8-1.11.tar.gz ./tests/VoicevoxCoreSharp.Core.Tests/resources
tar zxf ./tests/VoicevoxCoreSharp.Core.Tests/resources/open_jtalk_dic_utf_8-1.11.tar.gz -C tests/VoicevoxCoreSharp.Core.Tests/resources/
- run: cp -r binding/voicevox_core/model ./tests/VoicevoxCoreSharp.Core.Tests/resources
- run: dotnet test VoicevoxCoreSharp-without-exmaples.slnf
run-dotnet-cli-example:
runs-on: ubuntu-latest
needs: build-native-dev-library
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8
- uses: actions/cache/restore@v3
with:
path: ./binding/voicevox_core/target/release/libvoicevox_core.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
- uses: ./.github/composite/download-openjtalk-dict
with:
cache-path: open_jtalk_dic_utf_8-1.11.tar.gz
cache-key: open_jtalk_dic_utf_8-1.11
- run: |
cp open_jtalk_dic_utf_8-1.11.tar.gz ./examples/cli/voicevox_core
tar zxf ./examples/cli/voicevox_core/open_jtalk_dic_utf_8-1.11.tar.gz -C ./examples/cli/voicevox_core/
- run: cp -r binding/voicevox_core/model ./examples/cli/voicevox_core
- run: cd examples/cli; dotnet run --property:UseNugetOnnxRuntime=true -- こんにちは
- run: file examples/cli/audio.wav
format-check:
runs-on: ubuntu-latest
needs: build-native-dev-library
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-dotnet@v3
with:
dotnet-version: 8
- run: make format/check