forked from VOICEVOX/voicevox_engine
-
Notifications
You must be signed in to change notification settings - Fork 2
85 lines (74 loc) · 2.6 KB
/
test-engine-package.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
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-13
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 --retry 3 --retry-delay 5 -o "download/list.txt" "${{ steps.vars.outputs.release_url }}/${{ steps.vars.outputs.package_name }}.7z.txt"
<download/list.txt xargs -I '%' curl -L --retry 3 --retry-delay 5 -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/