-
Notifications
You must be signed in to change notification settings - Fork 205
92 lines (79 loc) · 2.59 KB
/
release-test.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
86
87
88
89
90
91
92
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-11
target: macos-x64
- os: windows-2019
target: windows-cpu
- os: windows-2019
target: windows-nvidia
- os: windows-2019
target: windows-directml
runs-on: ${{ matrix.os }}
steps:
- name: 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
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: "3.11.3"
cache: pip
- name: Download
run: |
mkdir -p download
curl -L -o "download/list.txt" "${{ steps.vars.outputs.release_url }}/${{ steps.vars.outputs.package_name }}.7z.txt"
cat "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: chmod +x
if: startsWith(matrix.target, 'linux') || startsWith(matrix.target, 'macos')
run: chmod +x dist/run
- name: Install libsndfile1
if: startsWith(matrix.target, 'linux')
run: |
sudo apt-get update
sudo apt-get install libsndfile1
- name: Install requirements
run: |
pip install -r requirements-test.txt
- name: Test
run: python build_util/check_release_build.py --dist_dir dist/