mirror of
https://github.com/rakuri255/UltraSinger.git
synced 2026-11-20 13:07:52 +09:00
58 lines
1.8 KiB
YAML
58 lines
1.8 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- CI
|
|
pull_request:
|
|
branches:
|
|
- CI
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
#- os: ubuntu-latest
|
|
# TARGET: Linux
|
|
#- os: macos-latest
|
|
# TARGET: macOS
|
|
- os: windows-latest
|
|
TARGET: Windows
|
|
PYINSTALLER_ARGS: "--onefile"
|
|
python-version: [ "3.10" ]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set up Python 3.10
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m site
|
|
python -m pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Install gpu dependencies
|
|
if: matrix.TARGET != 'macOS'
|
|
run: pip3 install torch==2.0.1+cu117 torchvision==0.15.2+cu117 torchaudio==2.0.2+cu117 --index-url https://download.pytorch.org/whl/cu117
|
|
|
|
- name: Get site-packages path
|
|
run: |
|
|
python -c "import site, os; print(os.path.join(site.getsitepackages()[0], 'lib', 'site-packages', 'librosa', 'util', 'example_data'))" > registry_path.txt
|
|
|
|
- name: Build with pyinstaller for ${{matrix.os}}
|
|
run: |
|
|
pip install pyinstaller
|
|
pyinstaller -n 'UltraSinger-0.0.1-${{matrix.TARGET}}' ${{matrix.PYINSTALLER_ARGS}} --path=src src/UltraSinger.py --add-data "$(cat registry_path.txt);librosa/util/example_data" --copy-metadata tqdm --copy-metadata regex --copy-metadata requests --copy-metadata packaging --copy-metadata filelock --copy-metadata numpy --copy-metadata tokenizers
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: artifacts
|
|
path: |
|
|
dist/*
|
|
!dist/*.app |