-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: liberate VOICEVOX CORE (#825)
1. manifest.jsonの"…_filename"部分を変更し、.binを認識できるようにする。 .binの場合、 VOICEVOX/ort#8 で追加される `SessionBuilder::commit_from_vv_bin`を用いる。 ```json "predict_duration": { "type": "onnx", "filename": "predict_duration.onnx" }, ``` ```json "predict_duration": { "type": "vv_bin", "filename": "pd.bin" }, ``` 2. `Onnxruntime::LIB_NAME`を`"onnxruntime"`から`"voicevox_onnxruntime"` にする。compatible_engineの場合だけ、`"voicevox_onnxruntime"`で失敗す ると`"onnxruntime"`にフォールバックするようにする(モック目的で使える ように)。 3. VOICEVOX/ort#8 でログのフィルタリングをやめる代わりに、C APIのログ フィルタの`ort=info`を`ort=warn`にする。 4. build_and_deploy_downloaderの`is_production`周りを吹き飛ばす。 5. #913 の続きとして、Rust APIの`package.license`を設定。 残る課題は以下の通り。 > README周り(たぶんcore.zip内のreadmeは削除で良さそう?) > #825 (comment) > > downloader周り(一旦壊れることになる・・・?いやならなさそうな気がする!) > #825 (comment) > > is_productionフラグを失くす? > #825 (comment) #825 (review) Resolves: VOICEVOX/voicevox_project#24 Resolves: #388 Resolves: #722
- Loading branch information
Showing
36 changed files
with
382 additions
and
304 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ on: | |
type: boolean | ||
required: false | ||
default: false | ||
# TODO: ライセンス表記およびモデル配布形体の方針が固まったら廃止 | ||
# <https://github.com/VOICEVOX/voicevox_core/pull/825#discussion_r1740115058> | ||
is_production: | ||
description: "製品版をビルドする" | ||
type: boolean | ||
|
@@ -158,30 +160,15 @@ jobs: | |
build_and_deploy: | ||
needs: config | ||
environment: ${{ inputs.is_production && 'production' || '' }} # 製品版のenvironment | ||
environment: ${{ inputs.code_signing && 'production' || '' }} # コード署名用のenvironment | ||
strategy: | ||
matrix: | ||
include: ${{ fromJson(needs.config.outputs.includes) }} | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
ASSET_NAME: voicevox_core-${{ matrix.artifact_name }}-${{ needs.config.outputs.version }} | ||
steps: | ||
- uses: actions/checkout@v4 # 製品版ではない場合 | ||
if: ${{ !inputs.is_production }} | ||
- uses: actions/checkout@v4 # 製品版の場合 | ||
if: inputs.is_production | ||
with: | ||
fetch-depth: 0 # 全履歴取得 | ||
token: ${{ secrets.PRODUCTION_GITHUB_TOKEN }} | ||
- name: Merge production branch | ||
if: inputs.is_production | ||
shell: bash | ||
run: | | ||
( | ||
git remote add private ${{ secrets.PRODUCTION_REPOSITORY_URL }} | ||
git fetch private refs/tags/${{ env.PRODUCTION_REPOSITORY_TAG }} | ||
git -c user.name=dummy -c [email protected] merge FETCH_HEAD | ||
) > /dev/null 2>&1 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Python 3.10 | ||
if: matrix.python_whl | ||
uses: actions/setup-python@v5 | ||
|
@@ -230,22 +217,14 @@ jobs: | |
fi | ||
- name: cache target | ||
uses: Swatinem/rust-cache@v2 | ||
if: ${{ !inputs.is_production }} | ||
- name: build voicevox_core_c_api | ||
shell: bash | ||
run: | | ||
case ${{ matrix.c_release_format }} in | ||
plain-cdylib) linking=load-onnxruntime ;; | ||
ios-xcframework) linking=link-onnxruntime ;; | ||
esac | ||
function build() { | ||
cargo build -p voicevox_core_c_api -v --features "$linking" --target ${{ matrix.target }} --release | ||
} | ||
if ${{ !inputs.is_production }}; then | ||
build | ||
else | ||
build > /dev/null 2>&1 | ||
fi | ||
cargo build -p voicevox_core_c_api -v --features "$linking" --target ${{ matrix.target }} --release | ||
env: | ||
RUSTFLAGS: -C panic=abort | ||
- name: build voicevox_core_python_api | ||
|
@@ -256,26 +235,11 @@ jobs: | |
pip install --upgrade poetry | ||
poetry config virtualenvs.create false | ||
(cd crates/voicevox_core_python_api && poetry install --with dev) | ||
function build() { | ||
maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --target ${{ matrix.target }} --release | ||
} | ||
if ${{ !inputs.is_production }}; then | ||
build | ||
else | ||
build > /dev/null 2>&1 | ||
fi | ||
maturin build --manifest-path ./crates/voicevox_core_python_api/Cargo.toml --target ${{ matrix.target }} --release | ||
echo "whl=$(find ./target/wheels -type f)" >> "$GITHUB_OUTPUT" | ||
- name: build voicevox_core_java_api | ||
if: contains(matrix.target, 'android') | ||
run: | | ||
function build() { | ||
cargo build -p voicevox_core_java_api -v --target ${{ matrix.target }} --release | ||
} | ||
if ${{ !inputs.is_production }}; then | ||
build | ||
else | ||
build > /dev/null 2>&1 | ||
fi | ||
run: cargo build -p voicevox_core_java_api vv --target ${{ matrix.target }} --release | ||
- name: Organize artifact | ||
run: | | ||
mkdir -p "artifact/${{ env.ASSET_NAME }}" | ||
|
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.