-
Notifications
You must be signed in to change notification settings - Fork 350
feat: 差分アップデートを追加 #2701
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
base: main
Are you sure you want to change the base?
feat: 差分アップデートを追加 #2701
Changes from 45 commits
8a10e2e
c316767
b871001
42768ac
d87d436
66dc391
4c54143
655a72f
cafc5ca
4ce246c
6164b65
1b5fddb
7f749ee
e6a412f
58e2451
58c10e6
1c683b0
63c43bd
8369deb
16394e5
b69bb9e
9911ffc
3d2abb5
d30d896
e5ef5fe
2036dc8
1d21dc6
30fec5c
cd95804
b651811
2ff2d3d
fe2ac52
dc8dde5
57571e9
915364a
3f2515f
3474cbb
d9d448e
d52003d
a3dcde1
de599b7
abb37fa
e2b1ddd
3274b2d
8b03f99
7624268
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| VITE_APP_NAME=voicevox | ||
| VITE_APP_NAME=voicevox-test | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (ここに関係ないけど、議論分けたいのでここにコメントしました) ちょっと相談です!! あるいは抜本的な解決策として、先にエンジン分離をやってしまえば、差分アプデがすごく簡単になる(githubのみで完結する)ことを思いつきました。 現状まだ考えきれてないですが、サーバー追加周りは考えることが山ほどあるなと思ってます。 まああとで考えれば良いことが多いですが、であればもうエンジン分離してしまった方が早いんじゃないかと、ふと思ったのでコメントしてみました…。 |
||
| VITE_DEFAULT_ENGINE_INFOS=`[ | ||
| { | ||
| "uuid": "074fc39e-678b-4c13-8916-ffca8d505d1d", | ||
|
|
@@ -10,5 +10,5 @@ VITE_DEFAULT_ENGINE_INFOS=`[ | |
| } | ||
| ]` | ||
| VITE_OFFICIAL_WEBSITE_URL=https://voicevox.hiroshiba.jp/ | ||
| VITE_LATEST_UPDATE_INFOS_URL=https://voicevox.hiroshiba.jp/updateInfos.json | ||
| VITE_LATEST_UPDATE_INFOS_URL=https://random-files.sevenc7c.com/update_infos.json | ||
| VITE_GTM_CONTAINER_ID=GTM-DUMMY | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,10 +20,6 @@ on: | |
| description: "コード署名する" | ||
| type: boolean | ||
| default: false | ||
| upload_artifact: | ||
| description: "デバッグ用に成果物をartifactにアップロードするか" | ||
| type: boolean | ||
| default: false | ||
|
|
||
| env: | ||
| VOICEVOX_ENGINE_VERSION: 0.24.1 | ||
|
|
@@ -53,7 +49,7 @@ jobs: | |
| - artifact_name: linux-nvidia-prepackage | ||
| artifact_path: dist_electron/linux-unpacked | ||
| voicevox_engine_asset_name: linux-nvidia | ||
| package_name: voicevox | ||
| package_name: voicevox-test | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. メモ:ここら辺も戻す |
||
| compressed_artifact_name: voicevox-linux-nvidia | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: linux-nvidia-appimage | ||
|
|
@@ -65,7 +61,7 @@ jobs: | |
| - artifact_name: linux-cpu-x64-prepackage | ||
| artifact_path: dist_electron/linux-unpacked | ||
| voicevox_engine_asset_name: linux-cpu-x64 | ||
| package_name: voicevox-cpu | ||
| package_name: voicevox-test-cpu | ||
| compressed_artifact_name: voicevox-linux-cpu-x64 | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: linux-cpu-x64-appimage | ||
|
|
@@ -77,7 +73,7 @@ jobs: | |
| - artifact_name: linux-cpu-arm64-prepackage | ||
| artifact_path: dist_electron/linux-arm64-unpacked | ||
| voicevox_engine_asset_name: linux-cpu-arm64 | ||
| package_name: voicevox-cpu | ||
| package_name: voicevox-test-cpu | ||
| compressed_artifact_name: voicevox-linux-cpu-arm64 | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: linux-cpu-arm64-appimage | ||
|
|
@@ -89,7 +85,7 @@ jobs: | |
| - artifact_name: windows-nvidia-prepackage | ||
| artifact_path: dist_electron/win-unpacked | ||
| voicevox_engine_asset_name: windows-nvidia | ||
| package_name: voicevox-cuda | ||
| package_name: voicevox-test-cuda | ||
| compressed_artifact_name: voicevox-windows-nvidia | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: windows-nvidia-nsis-web | ||
|
|
@@ -99,7 +95,7 @@ jobs: | |
| - artifact_name: windows-cpu-prepackage | ||
| artifact_path: dist_electron/win-unpacked | ||
| voicevox_engine_asset_name: windows-cpu | ||
| package_name: voicevox-cpu | ||
| package_name: voicevox-test-cpu | ||
| compressed_artifact_name: voicevox-windows-cpu | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: windows-cpu-nsis-web | ||
|
|
@@ -109,7 +105,7 @@ jobs: | |
| - artifact_name: windows-directml-prepackage | ||
| artifact_path: dist_electron/win-unpacked | ||
| voicevox_engine_asset_name: windows-directml | ||
| package_name: voicevox | ||
| package_name: voicevox-test | ||
| compressed_artifact_name: voicevox-windows-directml | ||
| app_asar_dir: prepackage/resources | ||
| installer_artifact_name: windows-directml-nsis-web | ||
|
|
@@ -119,7 +115,7 @@ jobs: | |
| - artifact_name: macos-cpu-x64-prepackage | ||
| artifact_path: dist_electron/mac | ||
| voicevox_engine_asset_name: macos-x64 | ||
| package_name: voicevox-cpu | ||
| package_name: voicevox-test-cpu | ||
| compressed_artifact_name: voicevox-macos-cpu-x64 | ||
| app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources | ||
| installer_artifact_name: macos-cpu-x64-dmg | ||
|
|
@@ -129,7 +125,7 @@ jobs: | |
| - artifact_name: macos-cpu-arm64-prepackage | ||
| artifact_path: dist_electron/mac-arm64 | ||
| voicevox_engine_asset_name: macos-arm64 | ||
| package_name: voicevox-cpu | ||
| package_name: voicevox-test-cpu | ||
| compressed_artifact_name: voicevox-macos-cpu-arm64 | ||
| app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources | ||
| installer_artifact_name: macos-cpu-arm64-dmg | ||
|
|
@@ -157,7 +153,7 @@ jobs: | |
| # so different package/product names should be used for CPU/DirectML/GPU builds. | ||
| - name: Replace package name & version | ||
| run: | | ||
| $sed -i 's/"name": "voicevox"/"name": "${{ matrix.package_name }}"/' package.json | ||
| $sed -i 's/"name": "voicevox-test"/"name": "${{ matrix.package_name }}"/' package.json | ||
| # $sed -i 's/productName: "VOICEVOX"/productName: "${{ matrix.product_name }}"/' vue.config.js | ||
|
|
||
| $sed -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json | ||
|
|
@@ -255,6 +251,7 @@ jobs: | |
| LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }} | ||
| LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }} | ||
| MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }} | ||
| INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }} | ||
|
|
||
| # https://github.com/electron-userland/electron-builder/issues/3179 | ||
| USE_HARD_LINKS: false | ||
|
|
@@ -342,7 +339,7 @@ jobs: | |
| rm $name.tar | ||
|
|
||
| - name: Upload Linux tar.gz (without nvidia) to Artifacts | ||
| if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true' | ||
| if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact_name }}-targz | ||
|
|
@@ -372,7 +369,7 @@ jobs: | |
| 7z rn $name.zip prepackage/ VOICEVOX/ | ||
|
|
||
| - name: Upload Windows & Mac zip (without nvidia) to Artifacts | ||
| if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && github.event.inputs.upload_artifact == 'true' | ||
| if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.artifact_name }}-zip | ||
|
|
@@ -412,20 +409,32 @@ jobs: | |
| THUMBPRINT_PATH: /tmp/esignercka_thumbprint.txt | ||
| SIGNTOOL_PATH_PATH: /tmp/signtool_path.txt | ||
|
|
||
| - name: Create app-update.yml | ||
| run: | | ||
| # prepackageを使うとapp-update.ymlが生成されないので、手動で作成する | ||
| cat <<YAML > ${{ matrix.app_asar_dir }}/app-update.yml | ||
| provider: generic | ||
| url: https://vv-update-api.sevenc7c.workers.dev/${{ matrix.installer_artifact_name }} | ||
| useMultipleRangeRequest: false | ||
| updaterCacheDirName: ${{ matrix.package_name }}-updater | ||
| YAML | ||
|
Comment on lines
+412
to
+420
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ここはワークアラウンドって感じでしょうか? ちょっと大掛かりになっちゃうんですけれども、そもそもprepackageがもういらない気がしてきました。 ちょっとさすがにしんどすぎますかね・・・・? 🙇 (もしprepackageなくす場合、今のコードでprepackageなくしても問題ないかを @aoirint さんにもコメントいただけると心強そう。お忙しそうであれば僕と @sevenc-nanashi さんの判断だけで進んじゃって良さそう!)
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ビルドフックでエンジン差し込みを行うって感じですかね?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. よくわかってないのですが、そんな感じな気がしました!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. PRとしてはここどうするかも考えどころですねぇ。
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 今作業中ですが、そこそこ大きくなりそうなので一旦別PRにしたほうが良さそう。このPRでは変更しない(一旦prepackageのまま or 先にprepackageをやめるPRが完成してマージされたらそっち)みたいな感じで行こうと思います。
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. おお、失礼しました!!! お待ちしています!!
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. review request頂いたけど、ここどうしましょう?👀
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
これの気持ちですね。一旦これでレビューしてもらえると...
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. なるほどです。 |
||
|
|
||
| # NOTE: prepackage can be removed before splitting nsis-web archive | ||
| - name: Build Electron | ||
| if: endsWith(matrix.installer_artifact_name, '-nsis-web') || endsWith(matrix.installer_artifact_name, '-appimage') # windows and linux | ||
| env: | ||
| NSIS_WEB_ARTIFACT_NAME: ${{ matrix.nsis_web_artifact_name }} | ||
| LINUX_ARTIFACT_NAME: ${{ matrix.linux_artifact_name }} | ||
| LINUX_EXECUTABLE_NAME: ${{ matrix.linux_executable_name }} | ||
| INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }} | ||
| run: | | ||
| pnpm run electron:build --prepackaged prepackage/ | ||
|
|
||
| - name: Build Electron (for macOS) | ||
| if: endsWith(matrix.installer_artifact_name, '-dmg') # macOS | ||
| env: | ||
| MACOS_ARTIFACT_NAME: ${{ matrix.macos_artifact_name }} | ||
| INSTALLER_ARTIFACT_NAME: ${{ matrix.installer_artifact_name }} | ||
| run: | | ||
sevenc-nanashi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| pnpm run electron:build --prepackaged prepackage/VOICEVOX.app | ||
|
|
||
|
|
@@ -460,13 +469,14 @@ jobs: | |
| mv archives.txt "${{ matrix.installer_artifact_name }}.7z.txt" | ||
| done | ||
|
|
||
| - name: Upload Linux AppImage split to Artifacts | ||
| if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact == 'true' | ||
| - name: Upload Linux AppImage to Artifacts | ||
| if: endsWith(matrix.installer_artifact_name, '-appimage') | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.installer_artifact_name }}-release | ||
| path: |- | ||
| dist_electron/*.7z.* | ||
| dist_electron/*.AppImage | ||
| dist_electron/*.yml | ||
|
|
||
| - name: Upload Linux AppImage split to Release Assets | ||
| if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != '' | ||
|
|
@@ -479,12 +489,13 @@ jobs: | |
| target_commitish: ${{ github.sha }} | ||
|
|
||
| - name: Upload macOS dmg to Artifacts | ||
| if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact == 'true' | ||
| if: endsWith(matrix.installer_artifact_name, '-dmg') | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.installer_artifact_name }}-release | ||
| path: |- | ||
| dist_electron/*.dmg | ||
| dist_electron/*.yml | ||
|
|
||
| - name: Upload macOS dmg to Release Assets | ||
| if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != '' | ||
|
|
@@ -496,14 +507,21 @@ jobs: | |
| dist_electron/*.dmg | ||
| target_commitish: ${{ github.sha }} | ||
|
|
||
| - name: Copy Windows NSIS ini | ||
| if: endsWith(matrix.installer_artifact_name, '-nsis-web') | ||
| run: | | ||
| cp dist_electron/nsis-web/out/*.ini dist_electron/nsis-web/ | ||
|
|
||
| - name: Upload Windows NSIS Web to Artifacts | ||
| if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact == 'true' | ||
| if: endsWith(matrix.installer_artifact_name, '-nsis-web') | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: ${{ matrix.installer_artifact_name }}-release | ||
| path: |- | ||
| dist_electron/nsis-web/out/*.7z.* | ||
| dist_electron/nsis-web/*.7z | ||
| dist_electron/nsis-web/*.exe | ||
| dist_electron/nsis-web/*.ini | ||
| dist_electron/nsis-web/*.yml | ||
|
|
||
| - name: Upload Windows NSIS Web to Release Assets | ||
| if: endsWith(matrix.installer_artifact_name, '-nsis-web') && (github.event.release.tag_name || github.event.inputs.version) != '' | ||
|
|
@@ -515,3 +533,37 @@ jobs: | |
| dist_electron/nsis-web/out/*.7z.* | ||
| dist_electron/nsis-web/*.exe | ||
| target_commitish: ${{ github.sha }} | ||
|
|
||
| upload-to-huggingface: | ||
| needs: build-and-upload | ||
| runs-on: ubuntu-latest | ||
| if: (github.event.release.tag_name || github.event.inputs.version) | ||
| steps: | ||
| - name: Download artifacts | ||
| uses: actions/download-artifact@v4 | ||
| with: | ||
| pattern: "*-release" | ||
| path: ./artifacts | ||
|
|
||
| - name: Organize artifacts | ||
| run: | | ||
| cd artifacts | ||
| for file in *; do | ||
| # -releaseを消す | ||
| mv "$file" "${file//-release/}" | ||
| done | ||
|
|
||
| - name: Upload to Hugging Face | ||
| run: | | ||
| if [ -z "${{ secrets.HUGGINGFACE_TOKEN }}" ]; then | ||
| # NOTE: if内ではsecretsは展開されないので、run内でチェックする | ||
| echo "Hugging Face token is not set. Skipping upload." | ||
| exit 0 | ||
| fi | ||
sevenc-nanashi marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| pip3 install huggingface_hub[cli] | ||
|
|
||
| huggingface-cli login --token ${{ secrets.HUGGINGFACE_TOKEN }} | ||
| huggingface-cli upload \ | ||
| sevenc-nanashi/vv-poc-editor-update-storage \ | ||
| artifacts $VOICEVOX_EDITOR_VERSION | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
メモ:戻す