Skip to content

Commit

Permalink
Merge 51160ce into 1c10fe0
Browse files Browse the repository at this point in the history
  • Loading branch information
Hiroshiba committed Jun 17, 2023
2 parents 1c10fe0 + 51160ce commit 61e7799
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 41 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ env:
VOICEVOX_RESOURCE_VERSION: "0.14.3"
VOICEVOX_CORE_VERSION: "0.14.4"

defaults:
run:
shell: bash

jobs:
config: # 全 jobs で利用する定数の定義. `env` が利用できないコンテキストでも利用できる.
runs-on: ubuntu-latest
Expand All @@ -26,7 +30,6 @@ jobs:
steps:
- name: declare variables
id: vars
shell: bash
run: |
: # releaseタグ名か、workflow_dispatchでのバージョン名か、latestが入る
echo "version_or_latest=${{ github.event.release.tag_name || github.event.inputs.version || 'latest' }}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -111,7 +114,6 @@ jobs:

# Merge VOICEVOX RESOURCE
- name: Merge VOICEVOX RESOURCE
shell: bash
env:
DOWNLOAD_RESOURCE_PATH: download/resource
run: bash build_util/process_voicevox_resource.bash
Expand Down
28 changes: 4 additions & 24 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ env:
VOICEVOX_RESOURCE_VERSION: "0.14.3"
VOICEVOX_CORE_VERSION: "0.14.4"

defaults:
run:
shell: bash

jobs:
config: # 全 jobs で利用する定数の定義. `env` が利用できないコンテキストでも利用できる.
runs-on: ubuntu-latest
Expand All @@ -37,7 +41,6 @@ jobs:
steps:
- name: declare variables
id: vars
shell: bash
run: |
: # release タグ名, または workflow_dispatch でのバージョン名. リリースでない (push event) 場合は空文字列
echo "version=${{ github.event.release.tag_name || github.event.inputs.version }}" >> $GITHUB_OUTPUT
Expand Down Expand Up @@ -98,7 +101,6 @@ jobs:
steps:
- name: declare variables
id: vars
shell: bash
run: |
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ needs.config.outputs.version }}" >> $GITHUB_OUTPUT
Expand All @@ -109,7 +111,6 @@ jobs:
# so you need to install GNU 'sed' and 'split'.
- name: Install GNU sed on macOS
if: startsWith(matrix.os, 'macos-')
shell: bash
run: |
brew install gnu-sed coreutils
echo "/usr/local/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
Expand Down Expand Up @@ -142,7 +143,6 @@ jobs:

- name: Extract CUDA Dynamic Libraries
if: matrix.cuda_version != '' && steps.cuda-dll-cache.outputs.cache-hit != 'true'
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -171,7 +171,6 @@ jobs:
# Download cuDNN
- name: Export cuDNN url to calc hash
if: matrix.cudnn_url != ''
shell: bash
run: echo "${{ matrix.cudnn_url }}" > download/cudnn_url.txt

- name: Prepare cuDNN cache
Expand All @@ -185,7 +184,6 @@ jobs:

- name: Download and extract cuDNN Dynamic Libraries
if: matrix.cudnn_url != '' && steps.cudnn-dll-cache.outputs.cache-hit != 'true'
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -218,7 +216,6 @@ jobs:
# Donwload zlib
- name: Export zlib url to calc hash
if: matrix.zlib_url != ''
shell: bash
run: echo "${{ matrix.zlib_url }}" >> download/zlib_url.txt

- name: Cache zlib
Expand All @@ -231,7 +228,6 @@ jobs:

- name: Download zlib
if: steps.zlib-cache.outputs.cache-hit != 'true' && matrix.zlib_url != ''
shell: bash
run: |
curl -L "${{ matrix.zlib_url }}" -o download/zlib.zip
mkdir -p download/zlib
Expand All @@ -256,7 +252,6 @@ jobs:
cache: pip

- name: Install Python dependencies
shell: bash
run: |
python -m pip install -r requirements-dev.txt
Expand All @@ -283,13 +278,11 @@ jobs:
fi
- name: Create download directory
shell: bash
run: mkdir -p download/

# Donwload DirectML
- name: Export DirectML url to calc hash
if: endswith(matrix.target, '-directml')
shell: bash
run: echo "${{ matrix.directml_url }}" >> download/directml_url.txt

- name: Cache DirectML
Expand All @@ -302,7 +295,6 @@ jobs:

- name: Download DirectML
if: steps.directml-cache.outputs.cache-hit != 'true' && endswith(matrix.target, '-directml')
shell: bash
run: |
curl -L "${{ matrix.directml_url }}" -o download/directml.zip
mkdir -p download/directml
Expand All @@ -315,7 +307,6 @@ jobs:
# Download ONNX Runtime
- name: Export ONNX Runtime url to calc hash
shell: bash
run: echo "${{ matrix.onnxruntime_url }}" > download/onnxruntime_url.txt

- name: Prepare ONNX Runtime cache
Expand All @@ -327,7 +318,6 @@ jobs:

- name: Download ONNX Runtime (Windows)
if: steps.onnxruntime-cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows-')
shell: bash
run: |
curl -L "${{ matrix.onnxruntime_url }}" > download/onnxruntime.zip
Expand All @@ -346,7 +336,6 @@ jobs:
- name: Download ONNX Runtime (Mac/Linux)
if: steps.onnxruntime-cache.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows-') != true
shell: bash
run: |
curl -L "${{ matrix.onnxruntime_url }}" > download/onnxruntime.tgz
mkdir -p download/onnxruntime
Expand All @@ -371,7 +360,6 @@ jobs:

# Merge VOICEVOX RESOURCE
- name: Merge VOICEVOX RESOURCE
shell: bash
env:
DOWNLOAD_RESOURCE_PATH: download/resource
run: bash build_util/process_voicevox_resource.bash
Expand All @@ -386,7 +374,6 @@ jobs:

- name: Download VOICEVOX Core
if: steps.voicevox-core-cache.outputs.cache-hit != 'true'
shell: bash
env:
VOICEVOX_CORE_ASSET_NAME: ${{ matrix.voicevox_core_asset_prefix }}-${{ env.VOICEVOX_CORE_VERSION }}
run: |
Expand All @@ -409,20 +396,17 @@ jobs:
rm download/${{ env.VOICEVOX_CORE_ASSET_NAME }}.zip
- name: Copy VOICEVOX Core Models
shell: bash
run: |
cp -r download/core/model ./
- name: Generate licenses.json
shell: bash
run: |
OUTPUT_LICENSE_JSON_PATH=engine_manifest_assets/dependency_licenses.json \
bash build_util/create_venv_and_generate_licenses.bash
# FIXME: VOICEVOX (editor) cannot build without licenses.json
cp engine_manifest_assets/dependency_licenses.json licenses.json
- name: Build run.py with PyInstaller
shell: bash
run: |
set -eux
Expand All @@ -448,7 +432,6 @@ jobs:
- name: Create artifact directory with symlink
if: startsWith(matrix.os, 'windows-')
shell: bash
env:
PYTHON_SITE_PACKAGES_DIR: C:/hostedtoolcache/windows/python/${{ steps.setup-python.outputs.python-version }}/x64/lib/site-packages
# create symlink instead of copy (Git Bash)
Expand Down Expand Up @@ -485,7 +468,6 @@ jobs:
- name: Create symlink of CUDA dependencies
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia')
shell: bash
run: |
set -eux
Expand All @@ -511,15 +493,13 @@ jobs:
- name: Code signing
if: github.event.inputs.code_signing == 'true' && startsWith(matrix.os, 'windows-')
shell: bash
run: |
bash build_util/codesign.bash "dist/run/run.exe"
env:
CERT_BASE64: ${{ secrets.CERT_BASE64 }}
CERT_PASSWORD: ${{ secrets.CERT_PASSWORD }}

- name: Rearchive and split artifact
shell: bash
run: |
mv dist/run/ "${{ matrix.target }}/"
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/release-test-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ env:
VERSION: |- # version指定時はversionを、それ以外はタグ名を使用
${{ (github.event.inputs || inputs).version }}
defaults:
run:
shell: bash

jobs:
test:
runs-on: [ ubuntu-20.04 ]
Expand Down Expand Up @@ -75,7 +79,6 @@ jobs:
# - ステータスコードが `200` の場合は正常終了します
# - ステータスコードが `200` 以外の場合は、5秒間スリープしてリトライします
- name: Wait for container to start
shell: bash -xv {0}
run: |
url="http://127.0.0.1:50021/version"
max_attempts=10
Expand All @@ -94,5 +97,4 @@ jobs:
exit 1
- name: Test
shell: bash
run: python build_util/check_release_build.py --skip_run_process --dist_dir dist/
8 changes: 4 additions & 4 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ env:
VERSION: |- # version指定時はversionを、それ以外はタグ名を使用
${{ (github.event.inputs || inputs).version }}
defaults:
run:
shell: bash

jobs:
test:
strategy:
Expand All @@ -51,7 +55,6 @@ jobs:
steps:
- name: declare variables
id: vars
shell: bash
run: |
echo "release_url=${{ env.REPO_URL }}/releases/download/${{ env.VERSION }}" >> $GITHUB_OUTPUT
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ env.VERSION }}" >> $GITHUB_OUTPUT
Expand All @@ -64,7 +67,6 @@ jobs:
cache: pip

- name: Download
shell: bash -euxv {0}
run: |
mkdir -p download
curl -L -o "download/list.txt" "${{ steps.vars.outputs.release_url }}/${{ steps.vars.outputs.package_name }}.7z.txt"
Expand All @@ -74,7 +76,6 @@ jobs:
- name: chmod +x
if: startsWith(matrix.target, 'linux') || startsWith(matrix.target, 'macos')
shell: bash
run: chmod +x dist/run

- name: Install libsndfile1
Expand All @@ -88,5 +89,4 @@ jobs:
pip install -r requirements-test.txt
- name: Test
shell: bash
run: python build_util/check_release_build.py --dist_dir dist/
7 changes: 0 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,6 @@ jobs:
matrix:
os: [ubuntu-20.04, windows-latest] # [ubuntu-20.04, macos-latest, windows-latest]
python: ["3.11.3"]
include:
- os: ubuntu-20.04
path: ~/.cache/pip
# - os: macos-latest
# path: ~/Library/Caches/pip
- os: windows-latest
path: ~\AppData\Local\pip\Cache

steps:
- uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/upload-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ env:
PUBLISH_BRANCH: "gh-pages"
DESTINATION_DIR: "api"

defaults:
run:
shell: bash

jobs:
upload-doc:
runs-on: ubuntu-20.04
Expand All @@ -28,12 +32,10 @@ jobs:
run: sudo apt-get install libsndfile1

- name: Install Python dependencies
shell: bash
run: |
pip install -r requirements.txt
- name: Make documents
shell: bash
run: |
python make_docs.py
Expand Down

0 comments on commit 61e7799

Please sign in to comment.