forked from w-okada/voice-changer
-
Notifications
You must be signed in to change notification settings - Fork 7
95 lines (92 loc) · 2.92 KB
/
build-executable.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
93
94
95
name: Package exe with PyInstaller
on:
pull_request:
branches: [ master-custom ]
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
build-all:
strategy:
matrix:
include:
- os: windows-latest
os_suffix: windows-amd64
reqs: cuda
backend: cuda
python-version: '3.11'
- os: windows-latest
os_suffix: windows-amd64
reqs: dml
backend: dml
python-version: '3.11'
- os: macos-13
os_suffix: macos-amd64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: macos-latest
os_suffix: macos-arm64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: cpu
backend: cpu
python-version: '3.11'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: cuda
backend: cuda
# Linux CUDA depends on faiss-gpu-cp310
python-version: '3.10'
- os: ubuntu-20.04
os_suffix: linux-amd64
reqs: rocm
backend: rocm
# onnxruntime-rocm supports only cp310
python-version: '3.10'
runs-on: ${{ matrix.os }}
env:
BACKEND: ${{ matrix.backend }}
steps:
- name: Maximize build space
if: matrix.os == 'ubuntu-20.04'
uses: AdityaGarg8/remove-unwanted-software@v3
with:
remove-swapfile: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
remove-android: 'true'
remove-dotnet: 'true'
# remove-large-packages: 'true'
remove-haskell: 'true'
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# architecture: x64
# cache: pip
- name: Installing build dependencies
run: python -m pip install --no-cache-dir --upgrade pip wheel setuptools pyinstaller
- name: Installing project dependencies
run: python -m pip install --no-cache-dir -r requirements-common.txt -r requirements-${{ matrix.reqs }}.txt
working-directory: ./server
- name: Building executable
run: pyinstaller --clean -y --dist ./dist --workpath /tmp MMVCServerSIO.spec
working-directory: ./server
- name: Pack artifact
shell: bash
run: |
if [ "$RUNNER_OS" != "Windows" ]; then
mkdir ./server/.tarballs
tar cf ./server/.tarballs/voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}.tar ./server/dist
rm -rf ./server/dist/*
mv ./server/.tarballs/voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}.tar ./server/dist/
fi
- name: Uploading artifact
uses: actions/upload-artifact@v4
with:
name: voice-changer-${{ matrix.os_suffix }}-${{ matrix.reqs }}
path: ./server/dist