Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into patch-fix_cuda_symlink
Browse files Browse the repository at this point in the history
  • Loading branch information
aoirint committed Jun 19, 2023
2 parents d7d356d + f27468f commit 88ceabf
Show file tree
Hide file tree
Showing 9 changed files with 38 additions and 42 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-restore.outputs.cache-hit != 'true'
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -178,7 +178,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: Restore cached cuDNN
Expand All @@ -192,7 +191,6 @@ jobs:

- name: Download and extract cuDNN Dynamic Libraries
if: matrix.cudnn_url != '' && steps.cudnn-dll-cache-restore.outputs.cache-hit != 'true'
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -232,7 +230,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: Restore cached zlib
Expand All @@ -245,7 +242,6 @@ jobs:

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

- name: Install Python dependencies
shell: bash
run: |
python -m pip install -r requirements-dev.txt
Expand All @@ -304,13 +299,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: Restore cached DirectML
Expand All @@ -323,7 +316,6 @@ jobs:

- name: Download DirectML
if: steps.directml-cache-restore.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 @@ -343,7 +335,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: Restore cached ONNX Runtime
Expand All @@ -355,7 +346,6 @@ jobs:

- name: Download ONNX Runtime (Windows)
if: steps.onnxruntime-cache-restore.outputs.cache-hit != 'true' && startsWith(matrix.os, 'windows-')
shell: bash
run: |
curl -L "${{ matrix.onnxruntime_url }}" > download/onnxruntime.zip
Expand All @@ -374,7 +364,6 @@ jobs:
- name: Download ONNX Runtime (Mac/Linux)
if: steps.onnxruntime-cache-restore.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 Down Expand Up @@ -405,7 +394,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 @@ -420,7 +408,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 @@ -443,20 +430,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 @@ -482,7 +466,6 @@ jobs:
- name: Gather DLL dependencies to dist/run/ (Windows)
if: startsWith(matrix.os, 'windows-')
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -523,7 +506,6 @@ jobs:
- name: Gather DLL dependencies to dist/run/ (Linux CUDA)
if: startsWith(matrix.os, 'ubuntu-') && endsWith(matrix.target, 'nvidia')
shell: bash
run: |
set -eux
Expand Down Expand Up @@ -556,15 +538,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
4 changes: 4 additions & 0 deletions .github/workflows/coverage-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ on:
- completed
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
comment:
runs-on: ubuntu-latest
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Issue Labeler
on:
issues:
types: [opened]

defaults:
run:
shell: bash

jobs:
triage:
runs-on: ubuntu-latest
Expand Down
8 changes: 6 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,8 +79,9 @@ jobs:
# - ステータスコードが `200` の場合は正常終了します
# - ステータスコードが `200` 以外の場合は、5秒間スリープしてリトライします
- name: Wait for container to start
shell: bash -xv {0}
run: |
set +e # curlのエラーを無視する
url="http://127.0.0.1:50021/version"
max_attempts=10
sleep_interval=5
Expand All @@ -94,5 +99,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/
11 changes: 4 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,17 @@ on:
- "**"
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
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
4 changes: 4 additions & 0 deletions .github/workflows/typos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
- "**"
workflow_dispatch:

defaults:
run:
shell: bash

jobs:
typos:
runs-on: ubuntu-latest
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 88ceabf

Please sign in to comment.