Spaces:
Running
Running
name: Test Release Build | |
on: | |
workflow_call: | |
inputs: | |
version: | |
type: string | |
required: true | |
repo_url: | |
type: string | |
required: false | |
workflow_dispatch: | |
inputs: | |
version: | |
type: string | |
description: "テストしたいタグ名" | |
required: true | |
repo_url: | |
type: string | |
description: "リポジトリのURL(省略可能)" | |
required: false | |
env: | |
REPO_URL: | |
|- # repo_url指定時はrepo_urlを、それ以外はgithubのリポジトリURLを使用 | |
${{ (github.event.inputs || inputs).repo_url || format('{0}/{1}', github.server_url, github.repository) }} | |
VERSION: |- # version指定時はversionを、それ以外はタグ名を使用 | |
${{ (github.event.inputs || inputs).version }} | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
test: | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
target: linux-cpu | |
- os: ubuntu-20.04 | |
target: linux-nvidia | |
- os: macos-12 | |
target: macos-x64 | |
- os: macos-14 | |
target: macos-arm64 | |
- os: windows-2019 | |
target: windows-cpu | |
- os: windows-2019 | |
target: windows-nvidia | |
- os: windows-2019 | |
target: windows-directml | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: <Setup> Declare variables | |
id: vars | |
run: | | |
echo "release_url=${{ env.REPO_URL }}/releases/download/${{ env.VERSION }}" >> "$GITHUB_OUTPUT" | |
echo "package_name=voicevox_engine-${{ matrix.target }}-${{ env.VERSION }}" >> "$GITHUB_OUTPUT" | |
- name: <Setup> Check out the repository | |
uses: actions/checkout@v4 | |
- name: <Setup> Prepare Python Runtime / Python Dependencies | |
uses: ./.github/actions/prepare_python | |
with: | |
requirements-suffix: "-dev" | |
- name: <Setup> Download ENGINE package | |
run: | | |
mkdir -p download | |
curl -L -o "download/list.txt" "${{ steps.vars.outputs.release_url }}/${{ steps.vars.outputs.package_name }}.7z.txt" | |
<download/list.txt xargs -I '%' curl -L -o "download/%" "${{ steps.vars.outputs.release_url }}/%" | |
7z x "download/$(head -n1 download/list.txt)" | |
mv "${{ matrix.target }}" dist/ | |
- name: <Setup> Set up permission | |
if: startsWith(matrix.target, 'linux') || startsWith(matrix.target, 'macos') | |
run: chmod +x dist/run | |
- name: <Test> Test ENGINE package | |
run: python tools/check_release_build.py --dist_dir dist/ | |