downgrade CMake #411
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches-ignore: | |
- 'auto.**' | |
workflow_call: | |
inputs: | |
checkout-ref: | |
description: 'The ref to checkout' | |
required: false | |
type: string | |
push: | |
branches: | |
- main | |
jobs: | |
build-native-dev-library: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./binding | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
ref: ${{ inputs.checkout-ref || github.head_ref }} | |
# https://github.com/yamachu/VoicevoxCoreSharp/issues/194 の対応のため一旦 CMake のバージョンを下げている | |
# CMake 4.0.0 でもビルドが通るようになったら消す | |
- uses: jwlawson/actions-setup-cmake@802fa1a2c4e212495c05bf94dba2704a92a472be # v2.0.2 | |
with: | |
cmake-version: 3.31.6 | |
- uses: ./.github/composite/build-dev-rust | |
with: | |
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: | |
runs-on: ubuntu-latest | |
needs: build-native-dev-library | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
ref: ${{ inputs.checkout-ref || github.head_ref }} | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9 | |
- uses: actions/cache/restore@v4 | |
with: | |
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 | |
cp ./binding/voicevox_core/target/release/libonnxruntime.so ./tests/VoicevoxCoreSharp.Core.Tests/resources/libonnxruntime.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/ | |
- name: sample.vvmを自前でzipコマンドで作成する | |
run: mkdir -p tests/VoicevoxCoreSharp.Core.Tests/resources/model; cd binding/voicevox_core/model/sample.vvm; zip -r ../../../../tests/VoicevoxCoreSharp.Core.Tests/resources/model/sample.vvm . | |
- run: dotnet test VoicevoxCoreSharp-without-exmaples.slnf | |
run-dotnet-cli-example: | |
runs-on: ubuntu-latest | |
needs: build-native-dev-library | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
ref: ${{ inputs.checkout-ref || github.head_ref }} | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9 | |
- uses: actions/cache/restore@v4 | |
with: | |
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: | | |
mkdir -p ./examples/cli/voicevox_core/c_api/lib | |
cp ./binding/voicevox_core/target/release/libvoicevox_core.so ./examples/cli/voicevox_core/c_api/lib/libvoicevox_core.so | |
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 | |
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@v4 | |
with: | |
submodules: true | |
ref: ${{ inputs.checkout-ref || github.head_ref }} | |
- uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 9 | |
- run: make format/check |