Skip to content

Commit

Permalink
Merge 8efeeaf into b7269fa
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jan 7, 2022
2 parents b7269fa + 8efeeaf commit f10a8f6
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- created
workflow_dispatch:

env:
VOICEVOX_CORE_VERSION: '0.10.preview.0'
VOICEVOX_CORE_SOURCE_VERSION: '0.10.preview.0'

jobs:
build-docker:
runs-on: ${{ matrix.os }}
Expand All @@ -26,8 +30,6 @@ jobs:
- nvidia-ubuntu20.04
- cpu-ubuntu18.04
- nvidia-ubuntu18.04
voicevox_core_version: ['0.10.preview.0']
voicevox_core_source_version: ['0.10.preview.0']
include:
# Ubuntu 20.04
- tag: ''
Expand Down Expand Up @@ -106,8 +108,8 @@ jobs:
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
BASE_RUNTIME_IMAGE=${{ matrix.base_runtime_image }}
VOICEVOX_CORE_VERSION=${{ matrix.voicevox_core_version }}
VOICEVOX_CORE_SOURCE_VERSION=${{ matrix.voicevox_core_source_version }}
VOICEVOX_CORE_VERSION=${{ env.VOICEVOX_CORE_VERSION }}
VOICEVOX_CORE_SOURCE_VERSION=${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
VOICEVOX_CORE_LIBRARY_NAME=${{ matrix.voicevox_core_library_name }}
ONNXRUNTIME_URL=${{ matrix.onnxruntime_url }}
target: ${{ matrix.target }}
Expand Down
59 changes: 24 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ on:

env:
IMAGE_NAME: ${{ secrets.DOCKERHUB_USERNAME }}/voicevox_engine
PYTHON_VERSION: '3.8'
VOICEVOX_RESOURCE_VERSION: '0.10.preview.2'
VOICEVOX_CORE_VERSION: '0.10.preview.0'
VOICEVOX_CORE_SOURCE_VERSION: '0.10.preview.0'

jobs:
# Build Mac binary (x64 arch only)
Expand All @@ -18,12 +22,8 @@ jobs:
matrix:
include:
- os: macos-11
python: '3.8'
python_architecture: 'x64'
pip_cache_path: ~/Library/Caches/pip
voicevox_resource_version: '0.10.preview.2'
voicevox_core_version: '0.10.preview.0'
voicevox_core_source_version: '0.10.preview.0'
voicevox_core_library_name: libcore_cpu_x64.dylib
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.9.0/onnxruntime-osx-x64-1.9.0.tgz
artifact_name: macos-x64
Expand All @@ -44,7 +44,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.python_architecture }}

- name: Prepare Python dependencies cache
Expand All @@ -61,14 +61,14 @@ jobs:
id: venv-build-voicevox-cache
with:
path: ${{ env.pythonLocation }}
key: ${{ runner.os }}-libs-build_voicevox-${{ matrix.python }}-${{ matrix.python_architecture }}-${{ matrix.voicevox_core_version }}-${{ matrix.voicevox_core_source_version }}-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
key: ${{ runner.os }}-libs-build_voicevox-${{ env.PYTHON_VERSION }}-${{ matrix.python_architecture }}-${{ env.VOICEVOX_CORE_VERSION }}-${{ env.VOICEVOX_CORE_SOURCE_VERSION }}-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}

- name: Prepare Python venv for licenses.json generation cache
uses: actions/cache@v2
id: venv-generate-licenses-cache
with:
path: generate_licenses
key: ${{ runner.os }}-venv-libs-generate_licenses-${{ matrix.python }}-${{ matrix.python_architecture }}-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}
key: ${{ runner.os }}-venv-libs-generate_licenses-${{ env.PYTHON_VERSION }}-${{ matrix.python_architecture }}-${{ hashFiles('**/requirements.txt', '**/requirements-dev.txt') }}

- name: Prepare Python venv for licenses.json generation
shell: bash
Expand Down Expand Up @@ -123,15 +123,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ matrix.voicevox_resource_version }}
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ matrix.voicevox_resource_version }}
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

# Merge VOICEVOX RESOURCE
Expand All @@ -146,15 +146,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-core-cache
with:
key: ${{ matrix.os }}-voicevox-core-${{ matrix.voicevox_core_version }}
key: ${{ matrix.os }}-voicevox-core-${{ env.VOICEVOX_CORE_VERSION }}
path: download/core

- name: Download VOICEVOX Core release
if: steps.voicevox-core-cache.outputs.cache-hit != 'true'
shell: bash
run: |
# extracted like download/core/metas.json
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${{ matrix.voicevox_core_version }}/core.zip" > download/core.zip
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${{ env.VOICEVOX_CORE_VERSION }}/core.zip" > download/core.zip
ditto -x -k --sequesterRsrc --rsrc download/core.zip download/
rm download/core.zip
Expand All @@ -163,15 +163,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-core-source-cache
with:
key: ${{ matrix.os }}-voicevox-core-source-${{ matrix.voicevox_core_source_version }}
key: ${{ matrix.os }}-voicevox-core-source-${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
path: download/voicevox_core_source

- name: Checkout VOICEVOX Core source
if: steps.voicevox-core-source-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: VOICEVOX/voicevox_core
ref: ${{ matrix.voicevox_core_source_version }}
ref: ${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
path: download/voicevox_core_source

- name: Install dependencies for building VOICEVOX Core Python package
Expand Down Expand Up @@ -298,9 +298,6 @@ jobs:
tag:
- build-cpu-ubuntu18.04
- build-nvidia-ubuntu18.04
voicevox_resource_version: ['0.10.preview.2']
voicevox_core_version: ['0.10.preview.0']
voicevox_core_example_version: ['0.10.preview.0']
include:
- tag: build-cpu-ubuntu18.04
runtime_tag: cpu-ubuntu18.04 # for cache use
Expand Down Expand Up @@ -341,15 +338,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ matrix.voicevox_resource_version }}
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ matrix.voicevox_resource_version }}
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

# Merge VOICEVOX RESOURCE
Expand All @@ -374,8 +371,8 @@ jobs:
build-args: |
BASE_IMAGE=${{ matrix.base_image }}
BASE_RUNTIME_IMAGE=${{ matrix.base_runtime_image }}
VOICEVOX_CORE_VERSION=${{ matrix.voicevox_core_version }}
VOICEVOX_CORE_EXAMPLE_VERSION=${{ matrix.voicevox_core_example_version }}
VOICEVOX_CORE_VERSION=${{ env.VOICEVOX_CORE_VERSION }}
VOICEVOX_CORE_SOURCE_VERSION=${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
VOICEVOX_CORE_LIBRARY_NAME=${{ matrix.voicevox_core_library_name }}
ONNXRUNTIME_URL=${{ matrix.onnxruntime_url }}
target: ${{ matrix.target }}
Expand Down Expand Up @@ -427,25 +424,17 @@ jobs:
include:
# Windows CPU
- os: windows-2019
python: '3.8'
python_architecture: 'x64'
voicevox_resource_version: '0.10.preview.2'
voicevox_core_version: '0.10.preview.0'
voicevox_core_dll_name: core_cpu_x64.dll
voicevox_core_source_version: '0.10.preview.0'
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.9.0/onnxruntime-win-x64-1.9.0.zip
ccache_url: https://github.com/ccache/ccache/releases/download/v4.4.1/ccache-4.4.1-windows-64.zip
artifact_name: windows-cpu
nuitka_cache_path: nuitka_cache
pip_cache_path: ~\AppData\Local\pip\Cache
# Windows NVIDIA GPU
- os: windows-2019
python: '3.8'
python_architecture: 'x64'
voicevox_resource_version: '0.10.preview.2'
voicevox_core_version: '0.10.preview.0'
voicevox_core_dll_name: core_gpu_x64_nvidia.dll
voicevox_core_source_version: '0.10.preview.0'
onnxruntime_url: https://github.com/microsoft/onnxruntime/releases/download/v1.9.0/onnxruntime-win-x64-gpu-1.9.0.zip
cuda_version: '11.4.2'
cudnn_url: https://developer.download.nvidia.com/compute/redist/cudnn/v8.2.4/cudnn-11.4-windows-x64-v8.2.4.15.zip
Expand Down Expand Up @@ -546,7 +535,7 @@ jobs:
id: setup-python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python }}
python-version: ${{ env.PYTHON_VERSION }}
architecture: ${{ matrix.python_architecture }}

# Install Python dependencies
Expand Down Expand Up @@ -646,15 +635,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-resource-cache
with:
key: voicevox-resource-${{ matrix.voicevox_resource_version }}
key: voicevox-resource-${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

- name: Checkout VOICEVOX RESOURCE
if: steps.voicevox-resource-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: VOICEVOX/voicevox_resource
ref: ${{ matrix.voicevox_resource_version }}
ref: ${{ env.VOICEVOX_RESOURCE_VERSION }}
path: download/resource

# Merge VOICEVOX RESOURCE
Expand All @@ -670,14 +659,14 @@ jobs:
uses: actions/cache@v2
id: voicevox-core-cache
with:
key: ${{ matrix.os }}-voicevox-core-${{ matrix.voicevox_core_version }}
key: ${{ matrix.os }}-voicevox-core-${{ env.VOICEVOX_CORE_VERSION }}
path: download/core

- name: Download VOICEVOX Core
if: steps.voicevox-core-cache.outputs.cache-hit != 'true'
shell: bash
run: |
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${{ matrix.voicevox_core_version }}/core.zip" > download/core.zip
curl -L "https://github.com/VOICEVOX/voicevox_core/releases/download/${{ env.VOICEVOX_CORE_VERSION }}/core.zip" > download/core.zip
unzip download/core.zip -d download/
rm download/core.zip
Expand All @@ -686,15 +675,15 @@ jobs:
uses: actions/cache@v2
id: voicevox-core-source-cache
with:
key: ${{ matrix.os }}-voicevox-core-source-${{ matrix.voicevox_core_source_version }}
key: ${{ matrix.os }}-voicevox-core-source-${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
path: download/voicevox_core_source

- name: Checkout VOICEVOX Core source
if: steps.voicevox-core-source-cache.outputs.cache-hit != 'true'
uses: actions/checkout@v2
with:
repository: VOICEVOX/voicevox_core
ref: ${{ matrix.voicevox_core_source_version }}
ref: ${{ env.VOICEVOX_CORE_SOURCE_VERSION }}
path: download/voicevox_core_source

- name: Install VOICEVOX Core Python package
Expand Down

0 comments on commit f10a8f6

Please sign in to comment.