-
Notifications
You must be signed in to change notification settings - Fork 120
65 lines (54 loc) · 2.05 KB
/
build-windows-cpu.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
name: Build and Package (CPU)
on:
release:
types:
- published
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download and Install Miniconda
run: |
curl -o miniconda-installer.exe https://repo.anaconda.com/miniconda/Miniconda3-latest-Windows-x86_64.exe
start /wait "" miniconda-installer.exe /S /D=C:\programs\miniconda3
del miniconda-installer.exe
shell: cmd
- name: Set up Conda environment
run: |
C:\programs\miniconda3\Scripts\conda create -n py310 python=3.10.11 --yes
shell: cmd
- name: Activate Conda environment and Install Dependencies
run: |
call C:\programs\miniconda3\Scripts\activate C:\programs\miniconda3\envs\py310
pip install --no-cache-dir torch==2.2.1 --extra-index-url https://download.pytorch.org/whl/cpu
pip install --extra-index-url https://pypi.artrajz.cn/simple -r requirements.txt
shell: cmd
- name: Pre download nltk data
run: |
curl -L -o nltk_data.zip https://github.com/Artrajz/archived/raw/main/nltk/nltk_data.zip
7z x -oC:\Programs\Miniconda3\envs\py310 nltk_data.zip
del nltk_data.zip
shell: cmd
- name: Copy python environment
run: |
XCOPY C:\programs\miniconda3\envs\py310 py310\ /E /Y /F
shell: cmd
- name: Create 'start.bat'
run: |
echo @echo off >> start.bat
echo py310\python.exe app.py >> start.bat
echo pause >> start.bat
shell: cmd
- name: Create 7z Archive
run: |
7z a -t7z -m0=LZMA "vits-simple-api-windows-cpu-${{ github.event.release.tag_name }}.7z" .
shell: cmd
- name: Upload Release Artifacts
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
vits-simple-api-windows-cpu-${{ github.event.release.tag_name }}.7z
token: ${{ secrets.RELEASE_TOKEN }}