Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DirectMLへの対応 #788

Merged
merged 5 commits into from
Apr 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 30 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:

env:
VOICEVOX_ENGINE_REPO_URL: "https://github.com/VOICEVOX/voicevox_engine"
VOICEVOX_ENGINE_VERSION: 0.11.4
VOICEVOX_ENGINE_VERSION: 0.12.1-preview
VOICEVOX_RESOURCE_VERSION: 0.11.4
VOICEVOX_EDITOR_VERSION:
|- # releaseのときはタグが、それ以外は999.999.999がバージョン名に
Expand All @@ -32,6 +32,7 @@ jobs:
- linux-noengine-cpu-prepackage
- windows-noengine-prepackage
- windows-noengine-cpu-prepackage
- windows-noengine-directml-prepackage
- macos-noengine-cpu-prepackage
include:
# Linux NVIDIA GPU
Expand Down Expand Up @@ -64,6 +65,13 @@ jobs:
nsis_web_artifact_name: "VOICEVOX-CPU Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# Windows DirectML
- artifact_name: windows-noengine-directml-prepackage
artifact_path: dist_electron/win-unpacked
package_name: voicevox-directml
nsis_web_artifact_name: "VOICEVOX-DirectML Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# macOS CPU
- artifact_name: macos-noengine-cpu-prepackage
artifact_path: dist_electron/mac
Expand Down Expand Up @@ -91,6 +99,7 @@ jobs:
run: |
# GPU: "name": "voicevox" => "name": "voicevox"
# CPU: "name": "voicevox" => "name": "voicevox-cpu"
# DirectML: "name": "voicevox" => "name": "voicevox-directml"
"${{ matrix.sed_name }}" -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# "${{ matrix.sed_name }}" -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js

Expand Down Expand Up @@ -274,6 +283,7 @@ jobs:
- linux-cpu-prepackage
- windows-nvidia-prepackage
- windows-cpu-prepackage
- windows-directml-prepackage
- macos-cpu-prepackage
include:
# Linux NVIDIA GPU
Expand Down Expand Up @@ -302,6 +312,12 @@ jobs:
voicevox_engine_asset_name: windows-cpu
compressed_artifact_name: voicevox-windows-cpu
app_asar_dir: prepackage/resources
# Windows DirectML
- artifact_name: windows-directml-prepackage
noengine_artifact_name: windows-noengine-directml-prepackage
voicevox_engine_asset_name: windows-directml
compressed_artifact_name: voicevox-windows-directml
app_asar_dir: prepackage/resources
# macOS CPU
- artifact_name: macos-cpu-prepackage
noengine_artifact_name: macos-noengine-cpu-prepackage
Expand Down Expand Up @@ -504,6 +520,7 @@ jobs:
- linux-cpu-appimage
- windows-nvidia-nsis-web
- windows-cpu-nsis-web
- windows-directml-nsis-web
- macos-cpu-dmg
include:
# Linux NVIDIA GPU
Expand Down Expand Up @@ -536,6 +553,13 @@ jobs:
nsis_web_artifact_name: "VOICEVOX-CPU Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# Windows DirectML
- artifact_name: windows-directml-nsis-web
engine_artifact_name: windows-directml-prepackage
package_name: voicevox-directml
nsis_web_artifact_name: "VOICEVOX-DirectML Web Setup ${version}.${ext}"
sed_name: sed
os: windows-2019
# macOS CPU
- artifact_name: macos-cpu-dmg
engine_artifact_name: macos-cpu-prepackage
Expand All @@ -558,17 +582,18 @@ jobs:
run: |
brew install gnu-sed

# NOTE: If the CPU/GPU builds have the same package name,
# NOTE: If the CPU/DirectML/GPU builds have the same package name,
# the NSIS installers and the 7z files have duplicate names.
# For Linux, If they have the same product name,
# the AppImages have duplicate names.
# Files with the same name cannot be uploaded to a single GitHub Release,
# so different package/product names should be used for CPU/GPU builds.
# so different package/product names should be used for CPU/DirectML/GPU builds.
- name: Replace package name & version
shell: bash
run: |
# GPU: "name": "voicevox" => "name": "voicevox"
# CPU: "name": "voicevox" => "name": "voicevox-cpu"
# DirectML: "name": "voicevox" => "name": "voicevox-directml"
Copy link
Member

@y-chan y-chan Apr 16, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同様の変更が100行目付近にも必要そうです...!

# Rename executable file
- name: Replace package name & version
shell: bash
run: |
# GPU: "name": "voicevox" => "name": "voicevox"
# CPU: "name": "voicevox" => "name": "voicevox-cpu"
"${{ matrix.sed_name }}" -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# "${{ matrix.sed_name }}" -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js
"${{ matrix.sed_name }}" -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json

"${{ matrix.sed_name }}" -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json
# "${{ matrix.sed_name }}" -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js

Expand Down Expand Up @@ -732,8 +757,10 @@ jobs:
- linux-cpu-prepackage-targz
- windows-nvidia-nsis-web
- windows-cpu-nsis-web
- windows-directml-nsis-web
- windows-nvidia-prepackage-zip
- windows-cpu-prepackage-zip
- windows-directml-prepackage-zip
- macos-cpu-dmg
- macos-cpu-prepackage-zip
include:
Expand Down