Skip to content

クレートのversionはworkspace設定に、featureはpackage設定に #908

クレートのversionはworkspace設定に、featureはpackage設定に

クレートのversionはworkspace設定に、featureはpackage設定に #908

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/downloader/**"
- ".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 downloader -- # バージョン指定のために -- が必要
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/README.*
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 downloader -- --cpu-arch x86
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/README.*
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 downloader -- -o other_output
download_dir: other_output
check_items: |
voicevox_core.dll
model/README.*
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 downloader -- --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
README.txt
check_not_exists_items: |
*directml*
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
model/README.*
open_jtalk_dic_utf_8-1.11
- name: DirectML option確認
os: windows-latest
download_command: cargo run -vv -p downloader -- --device directml
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/README.*
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 downloader -- --device directml --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
README.txt
check_not_exists_items: |
*cuda*
*cudnn*
*eula*
*nvidia*
*cufft*
*curand*
Directml.dll
DirectML_LICENSE.txt
model/README.*
open_jtalk_dic_utf_8-1.11
- name: cuda option確認
os: windows-latest
download_command: cargo run -vv -p downloader -- --device cuda
download_dir: voicevox_core
check_items: |
voicevox_core.dll
model/README.*
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 downloader -- --device cuda --min
download_dir: voicevox_core
check_items: |
voicevox_core.dll
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
model/README.*
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 -sSf 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 }} --core-repo ${{ github.repository }}
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