Skip to content

Commit

Permalink
merge upstream 0.20 (#8)
Browse files Browse the repository at this point in the history
## 内容

VOICEVOX ENGINEのバージョン0.20をマージします。

## その他
  • Loading branch information
Hiroshiba authored Aug 7, 2024
2 parents 0c3ce40 + c7074a7 commit 43c1738
Show file tree
Hide file tree
Showing 382 changed files with 27,872 additions and 12,582 deletions.
4 changes: 3 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
test/**/__snapshots__/**/*.json linguist-generated=true

* text=auto
*.png -text
*.wav -text
*.wav -text
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @VOICEVOX/maintainer
* @VOICEVOX/main-reviewer
40 changes: 40 additions & 0 deletions .github/actions/prepare_python/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Prepare Python"
description: "Python ランタイムと依存パッケージをインストールし、Python バージョンを出力する"

inputs:
only-export-python-version:
description: "Python バージョンの出力のみをおこなうか否か"
required: false
default: "false"
requirements-suffix:
description: "依存パッケージインストール時に `rquirements` へ付ける接尾語"
required: false
default: ""
python-version:
description: "インストールされる Python ランタイムのバージョン。デフォルト値はこのリポジトリが想定する Python バージョン。"
required: false
default: "3.11.3"
outputs:
python-version:
description: "Python version"
value: ${{ steps.export-python-version.outputs.python-version }}

runs:
using: "composite"
steps:
- name: <Setup> Set up Python
if: ${{ inputs.only-export-python-version == 'false' }}
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
cache: pip

- name: <Setup> Install Python dependencies
if: ${{ inputs.only-export-python-version == 'false' }}
run: pip install -r requirements${{ inputs.requirements-suffix }}.txt
shell: bash

- name: <Deploy> Export Python version
id: export-python-version
run: echo "python-version=${{ inputs.python-version }}" >> $GITHUB_OUTPUT
shell: bash
6 changes: 0 additions & 6 deletions .github/labeler.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# API docs HTML ファイルを生成し、`gh-pages` ブランチへの push によって GitHub Pages 上のドキュメントとして公開

name: upload-docs

on:
push:
branches:
- "master"

env:
PUBLISH_DIR: "./docs/api"
PUBLISH_BRANCH: "gh-pages"
DESTINATION_DIR: "api"

defaults:
run:
shell: bash

jobs:
upload-doc:
runs-on: ubuntu-20.04
steps:
- name: <Setup> Check out the repository
uses: actions/checkout@v4

- name: <Setup> Prepare Python Runtime / Python Dependencies
uses: ./.github/actions/prepare_python

- name: <Build> Make documents
run: PYTHONPATH=. python tools/make_docs.py

- name: <Deploy> Deploy documents to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.PUBLISH_DIR }}
publish_branch: ${{ env.PUBLISH_BRANCH }}
destination_dir: ${{ env.DESTINATION_DIR }}
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ on:

env:
IMAGE_NAME: ${{ vars.DOCKERHUB_USERNAME }}/voicevox_nemo_engine
PYTHON_VERSION: "3.11.3"
VOICEVOX_RESOURCE_VERSION: "0.14.0"
VOICEVOX_CORE_VERSION: "0.14.0"
VOICEVOX_RESOURCE_VERSION: "0.20.0"
VOICEVOX_CORE_VERSION: "0.15.0"

defaults:
run:
Expand All @@ -28,11 +27,11 @@ jobs:
outputs:
version_or_latest: ${{ steps.vars.outputs.version_or_latest }}
steps:
- name: declare variables
- name: <Setup> Declare variables
id: vars
run: |
: # releaseタグ名か、workflow_dispatchでのバージョン名か、latestが入る
echo "version_or_latest=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_OUTPUT
echo "version_or_latest=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> "$GITHUB_OUTPUT"
build-docker:
needs: [config]
Expand Down Expand Up @@ -81,45 +80,50 @@ jobs:
platforms: linux/amd64

steps:
- uses: actions/checkout@v3
- name: <Setup> Check out the repository
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v2
- name: <Setup> Prepare Python version
id: prepare-python
uses: ./.github/actions/prepare_python
with:
only-export-python-version: true

- name: <Setup> Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Setup Docker Buildx
- name: <Setup> Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
uses: docker/login-action@v2
- name: <Setup> Login to DockerHub
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

# Download VOICEVOX RESOURCE
- name: Prepare VOICEVOX RESOURCE cache
uses: actions/cache@v3
- name: <Setup> Prepare VOICEVOX RESOURCE cache
uses: actions/cache@v4
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
- name: <Setup> Check out the VOICEVOX RESOURCE repository
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: VOICEVOX/voicevox_nemo_resource
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

# Merge VOICEVOX RESOURCE
- name: Merge VOICEVOX RESOURCE
- name: <Build> Merge VOICEVOX RESOURCE
env:
DOWNLOAD_RESOURCE_PATH: download/resource
run: bash build_util/process_voicevox_resource.bash
run: bash tools/process_voicevox_resource.bash

- name: Build and Deploy Docker image
uses: docker/build-push-action@v3
- name: <Build/Deploy> Build and Deploy Docker image
uses: docker/build-push-action@v5
env:
IMAGE_TAG:
|- # If it's a release, add the version, otherwise add the `latest`
Expand Down Expand Up @@ -151,7 +155,7 @@ jobs:
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
BASE_RUNTIME_IMAGE=${{ matrix.base_runtime_image }}
PYTHON_VERSION=${{ env.PYTHON_VERSION }}
PYTHON_VERSION=${{ steps.prepare-python.outputs.python-version }}
VOICEVOX_ENGINE_VERSION=${{ needs.config.outputs.version_or_latest }}
VOICEVOX_CORE_VERSION=${{ env.VOICEVOX_CORE_VERSION }}
VOICEVOX_RESOURCE_VERSION=${{ env.VOICEVOX_RESOURCE_VERSION }}
Expand All @@ -168,7 +172,7 @@ jobs:
# version が指定されている場合のみ実行する
if: needs.config.outputs.version_or_latest != 'latest'
needs: [config, build-docker]
uses: ./.github/workflows/release-test-docker.yml
uses: ./.github/workflows/test-engine-container.yml
with:
version: ${{ needs.config.outputs.version_or_latest }}
repo_url: ${{ format('{0}/{1}', github.server_url, github.repository) }} # このリポジトリのURL
Loading

0 comments on commit 43c1738

Please sign in to comment.