Skip to content

Commit

Permalink
マルチトラック:mainをマージ (#2125)
Browse files Browse the repository at this point in the history
## 内容

project-multitrackのbufferにmainをマージします。

## 関連 Issue

(なし)

## スクリーンショット・動画など

(なし)

## その他

(なし)
  • Loading branch information
Hiroshiba committed Jun 20, 2024
2 parents 642a354 + 0d07c12 commit 12abe27
Show file tree
Hide file tree
Showing 129 changed files with 4,284 additions and 4,935 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,14 @@ module.exports = {
},
],
"@typescript-eslint/no-unused-vars": [
"warn",
process.env.NODE_ENV === "development" ? "warn" : "error", // 開発時のみwarn
{
ignoreRestSiblings: true,
},
],
"vue/attribute-hyphenation": ["error", "never"],
"vue/v-on-event-hyphenation": ["error", "never", { autofix: true }],
"vue/v-bind-style": ["error", "shorthand", { sameNameShorthand: "always" }],
"vue/component-name-in-template-casing": [
"error",
"PascalCase",
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/setup-environment/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,29 +12,29 @@ runs:
echo "cache-version=1" >> $GITHUB_ENV
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"

- name: Cache Electron
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ env.cache-version }}-${{ runner.os }}--electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_BUILDER_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-builder-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ env.cache-version }}-${{ runner.os }}--electron-builder-cache-
- name: Cache external dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ./build/vendored
key: ${{ env.cache-version }}-${{ runner.os }}--vendored-${{ hashFiles('build/*.js') }}
Expand Down
78 changes: 49 additions & 29 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ on:

env:
VOICEVOX_ENGINE_REPO_URL: "https://github.com/VOICEVOX/voicevox_engine"
VOICEVOX_ENGINE_VERSION: 0.19.0
VOICEVOX_RESOURCE_VERSION: 0.19.0
VOICEVOX_ENGINE_VERSION: 0.20-preview.0
VOICEVOX_RESOURCE_VERSION: 0.19.1
VOICEVOX_EDITOR_VERSION:
|- # releaseタグ名か、workflow_dispatchでのバージョン名か、999.999.999-developが入る
${{ github.event.release.tag_name || github.event.inputs.version || '999.999.999-develop' }}
Expand All @@ -55,7 +55,8 @@ jobs:
- windows-nvidia-prepackage
- windows-cpu-prepackage
- windows-directml-prepackage
- macos-cpu-prepackage
- macos-x64-cpu-prepackage
- macos-arm64-cpu-prepackage
include:
# Linux NVIDIA GPU
- artifact_name: linux-nvidia-prepackage
Expand Down Expand Up @@ -111,20 +112,30 @@ jobs:
installer_artifact_name: windows-directml-nsis-web
nsis_web_artifact_name: "VOICEVOX.Web.Setup.${version}.${ext}"
os: windows-2019
# macOS CPU
- artifact_name: macos-cpu-prepackage
# macOS CPU (x64)
- artifact_name: macos-x64-cpu-prepackage
artifact_path: dist_electron/mac
voicevox_engine_asset_name: macos-x64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-cpu
compressed_artifact_name: voicevox-macos-x64-cpu
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-cpu-dmg
macos_artifact_name: "VOICEVOX.${version}.${ext}"
installer_artifact_name: macos-x64-cpu-dmg
macos_artifact_name: "VOICEVOX.${version}-x64.${ext}"
os: macos-12
# macOS CPU (arm64)
- artifact_name: macos-arm64-cpu-prepackage
artifact_path: dist_electron/mac-arm64
voicevox_engine_asset_name: macos-arm64
package_name: voicevox-cpu
compressed_artifact_name: voicevox-macos-arm64-cpu
app_asar_dir: prepackage/VOICEVOX.app/Contents/Resources
installer_artifact_name: macos-arm64-cpu-dmg
macos_artifact_name: "VOICEVOX.${version}-arm64.${ext}"
os: macos-14

runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# NOTE: The default sed of macOS is BSD sed.
# There is a difference in specification between BSD sed and GNU sed,
Expand All @@ -149,21 +160,21 @@ jobs:
$sed -i 's/"version": "999.999.999"/"version": "${{ env.VOICEVOX_EDITOR_VERSION }}"/' package.json
- name: Setup Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
cache: "npm"

- name: Cache Electron
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-cache-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ env.cache-version }}-${{ runner.os }}--electron-cache-
- name: Cache Electron-Builder
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ${{ env.ELECTRON_BUILDER_CACHE }}
key: ${{ env.cache-version }}-${{ runner.os }}--electron-builder-cache-${{ hashFiles('**/package-lock.json') }}
Expand All @@ -174,7 +185,7 @@ jobs:
run: npm ci

- name: Checkout Product Version Resource
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
Expand All @@ -194,11 +205,16 @@ jobs:
cp resource/editor/PRIVACYPOLICY.md public/privacyPolicy.md
- name: Overwrite .env.production for Linux and macOS
if: startsWith(matrix.os, 'ubuntu-') || startsWith(matrix.os, 'macos-')
- name: Overwrite .env.production for Linux
if: startsWith(matrix.os, 'ubuntu-')
run: |
$sed -i 's|run.exe|./run|g' .env.production
- name: Overwrite .env.production for macOS
if: startsWith(matrix.os, 'macos-')
run: |
$sed -i 's|vv-engine/run.exe|../Resources/vv-engine/run|g' .env.production
- name: Replace .env.production infomations
run: |
# GTM ID
Expand Down Expand Up @@ -280,10 +296,10 @@ jobs:
run: |
mv voicevox_engine/ prepackage/vv-engine/
- name: Merge VOICEVOX ENGINE into prepackage/VOICEVOX.app/Contents/MacOS/
- name: Merge VOICEVOX ENGINE into prepackage/VOICEVOX.app/Contents/Resources/
if: startsWith(matrix.artifact_name, 'macos-')
run: |
mv voicevox_engine/ prepackage/VOICEVOX.app/Contents/MacOS/vv-engine/
mv voicevox_engine/ prepackage/VOICEVOX.app/Contents/Resources/vv-engine/
- name: Recover file permissions
if: startsWith(matrix.artifact_name, 'linux-') # linux
Expand All @@ -294,18 +310,22 @@ jobs:
- name: Recover file permissions for macOS build
if: startsWith(matrix.artifact_name, 'macos-') # macOS
run: |
chmod +x "prepackage/VOICEVOX.app/Contents/MacOS/vv-engine/run"
chmod +x "prepackage/VOICEVOX.app/Contents/Resources/vv-engine/run"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (GPU).app/Contents/MacOS/VOICEVOX Helper (GPU)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Plugin).app/Contents/MacOS/VOICEVOX Helper (Plugin)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper (Renderer).app/Contents/MacOS/VOICEVOX Helper (Renderer)"
chmod +x "prepackage/VOICEVOX.app/Contents/Frameworks/VOICEVOX Helper.app/Contents/MacOS/VOICEVOX Helper"
# NOTE: actions/upload-artifact@v3 does not upload `**.lproj` directories, which are an empty directory.
# NOTE: actions/upload-artifact@v4 does not upload `**.lproj` directories, which are an empty directory.
# Make `ja.lproj` directory because it is necessary for Japanese localization on macOS.
- name: Make .lproj directories in Resources directory of VOICEVOX.app
if: startsWith(matrix.artifact_name, 'macos-')
run: mkdir -p prepackage/VOICEVOX.app/Contents/Resources/ja.lproj prepackage/VOICEVOX.app/Contents/Resources/en.lproj

- name: Ad hoc code signing
if: endsWith(matrix.installer_artifact_name, '-dmg') # macOS
run: codesign --force --deep -s - prepackage/VOICEVOX.app

- name: Create Linux tar.gz (without nvidia)
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia')
run: |
Expand All @@ -317,15 +337,15 @@ jobs:
- 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'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-targz
path: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.tar.gz
- name: Upload Linux tar.gz (without nvidia) to Release Assets
if: startsWith(matrix.artifact_name, 'linux-') && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
Expand All @@ -347,15 +367,15 @@ jobs:
- 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'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}-zip
path: |-
${{ matrix.compressed_artifact_name }}-${{ env.VOICEVOX_EDITOR_VERSION }}.zip
- name: Upload Windows & Mac zip (without nvidia) to Release Assets
if: (startsWith(matrix.artifact_name, 'windows-') || startsWith(matrix.artifact_name, 'macos-')) && !contains(matrix.artifact_name, 'nvidia') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
Expand Down Expand Up @@ -436,15 +456,15 @@ jobs:
- name: Upload Linux AppImage split to Artifacts
if: endsWith(matrix.installer_artifact_name, '-appimage') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.7z.*
- name: Upload Linux AppImage split to Release Assets
if: endsWith(matrix.installer_artifact_name, '-appimage') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
Expand All @@ -454,15 +474,15 @@ jobs:

- name: Upload macOS dmg to Artifacts
if: endsWith(matrix.installer_artifact_name, '-dmg') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
dist_electron/*.dmg
- name: Upload macOS dmg to Release Assets
if: endsWith(matrix.installer_artifact_name, '-dmg') && (github.event.release.tag_name || github.event.inputs.version) != ''
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
Expand All @@ -472,7 +492,7 @@ jobs:

- name: Upload Windows NSIS Web to Artifacts
if: endsWith(matrix.installer_artifact_name, '-nsis-web') && github.event.inputs.upload_artifact == 'true'
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.installer_artifact_name }}-release
path: |-
Expand All @@ -481,7 +501,7 @@ jobs:
- 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) != ''
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ github.event.inputs.prerelease }}
tag_name: ${{ env.VOICEVOX_EDITOR_VERSION }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ on:
defaults:
run:
shell: bash

jobs:
check_node_version:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Check synchronize volta and .node_version
uses: My-MC/check-sync-volta-and-node-version@v0.0.3
2 changes: 1 addition & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: github/issue-labeler@v2.0
- uses: github/issue-labeler@v3.4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_latest_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
if: github.repository_owner == 'VOICEVOX'
steps:
- name: Trigger workflow_dispatch
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
build-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment
- run: npm run electron:build
Expand All @@ -52,7 +52,7 @@ jobs:
unit-test:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment

Expand All @@ -71,10 +71,13 @@ jobs:
voicevox_engine_asset_name: linux-cpu
- os: macos-latest
voicevox_engine_asset_name: macos-x64
# TODO: voicevox_nemo_negineがarm64に対応したら変更する
# - os: macos-latest
# voicevox_engine_asset_name: macos-arm64
- os: windows-latest
voicevox_engine_asset_name: windows-cpu
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment

Expand Down Expand Up @@ -135,7 +138,7 @@ jobs:
- name: Upload playwright report to artifact
if: failure()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: playwright-report-${{ matrix.os }}
path: playwright-report
Expand All @@ -161,7 +164,7 @@ jobs:
needs: [config, e2e-test]
if: needs.config.outputs.shouldUpdateSnapshots == 'true'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download artifacts
uses: actions/download-artifact@v4
Expand Down Expand Up @@ -192,7 +195,7 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-environment

Expand Down
Loading

0 comments on commit 12abe27

Please sign in to comment.