Skip to content

build_and_deployの最後にdownload_testを実行 #738

build_and_deployの最後にdownload_testを実行

build_and_deployの最後にdownload_testを実行 #738

Workflow file for this run

name: Download test workflow
on:
workflow_call:
inputs:
version:
description: "テスト対象のコアのバージョン。無指定時はprerelease込みの最新release。"
type: string
required: false
push:
branches:
- main
pull_request:
paths:
- "Cargo.*"
- "crates/download/**"
- ".github/workflows/download_test.yml"
env:
VERSION: ${{ inputs.version || 'prerelease-latest' }}
defaults:
run:
shell: bash
jobs:
download-releases:
strategy:
fail-fast: false
matrix:
include:
- name: 通常ダウンロード
os: windows-latest
download_command: cargo run -vv -p download -- # バージョン指定のために -- が必要
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
open_jtalk_dic_utf_8-1.11
README.txt
# https://github.com/VOICEVOX/voicevox_core/pull/411#issuecomment-1412457592
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
- name: CpuArch指定
os: windows-latest
download_command: cargo run -vv -p download -- --cpu-arch x86
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
open_jtalk_dic_utf_8-1.11
README.txt
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
- name: output先指定ダウンロード
os: windows-latest
download_command: cargo run -vv -p download -- -o other_output
download_dir: other_output
check_items: |
voicevox_core.dll
model/metas.json
open_jtalk_dic_utf_8-1.11
README.txt
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
- name: Min option確認
os: windows-latest
download_command: cargo run -vv -p download -- --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
README.txt
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
open_jtalk_dic_utf_8-1.11
- name: DirectML option確認
os: windows-latest
download_command: cargo run -vv -p download -- --device directml
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
open_jtalk_dic_utf_8-1.11
README.txt
DirectML.dll
DirectML_LICENSE.txt
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
- name: DirectMLかつMin option確認
os: windows-latest
download_command: cargo run -vv -p download -- --device directml --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
README.txt
check_not_exists_items: |
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
Directml.dll
DirectML_LICENSE.txt
open_jtalk_dic_utf_8-1.11
- name: cuda option確認
os: windows-latest
download_command: cargo run -vv -p download -- --device cuda
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
open_jtalk_dic_utf_8-1.11
README.txt
EULA.txt
NVIDIA_SLA_cuDNN_Support.txt
cublas64_*.dll
cublasLt64_*.dll
cudart64_*.dll
cudnn64_*.dll
cudnn_adv_infer64_*.dll
cudnn_cnn_infer64_*.dll
cudnn_ops_infer64_*.dll
cufft64_*.dll
curand64_*.dll
check_not_exists_items: |
*directml*
- name: cudaかつmin option確認
os: windows-latest
download_command: cargo run -vv -p download -- --device cuda --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/metas.json
README.txt
check_not_exists_items: |
*directml*
EULA.txt
NVIDIA_SLA_cuDNN_Support.txt
cublas64_*.dll
cublasLt64_*.dll
cudart64_*.dll
cudnn64_*.dll
cudnn_adv_infer64_*.dll
cudnn_cnn_infer64_*.dll
cudnn_ops_infer64_*.dll
cufft64_*.dll
curand64_*.dll
open_jtalk_dic_utf_8-1.11
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}-${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: ./.github/actions/rust-toolchain-from-file
- name: Get prerelease latest version
if: ${{ env.VERSION == 'prerelease-latest' }}
run: |
VERSION=$(
curl -s https://api.github.com/repos/VOICEVOX/voicevox_core/releases \
-H 'authorization: Bearer ${{ github.token }}' \
-H 'content-type: application/json' |
jq -er '.[0].tag_name'
)
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
- name: Execute download command
run: ${{ matrix.download_command }} --version ${{ env.VERSION }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check downloaded version
run: |
[ -e "${{ matrix.download_dir }}/VERSION" ]
[ "$(cat "${{ matrix.download_dir }}/VERSION")" = "${{ env.VERSION }}" ]
- name: Check downloaded files
run: |
mapfile -t items < <(echo -n '${{ matrix.check_items }}')
for item in "${items[@]}"
do
echo "check exists ${{ matrix.download_dir }}/${item}..."
# shellcheck disable=SC2086
[ -e "${{ matrix.download_dir }}"/${item} ]
done
- name: Check should not exists files
run: |
mapfile -t items < <(echo -n '${{ matrix.check_not_exists_items }}')
for item in "${items[@]}"
do
echo "check should not exists ${{ matrix.download_dir }}/${item}..."
# shellcheck disable=SC2086
[ ! -e "${{ matrix.download_dir }}"/${item} ]
done