-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
145 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
release_name: | ||
description: "release page name" | ||
required: true | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
jobs: | ||
build_ubuntu_2004_cuda12: | ||
name: Build Ubuntu 20.04 cuda12 | ||
runs-on: ubuntu-latest | ||
container: wasmedge/wasmedge:ubuntu-20.04-build-gcc-cuda12 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install WasmEdge | ||
run: | | ||
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install pkg-config llvm clang | ||
- name: Install Torch | ||
run: | | ||
wget https://download.pytorch.org/libtorch/cu124/libtorch-win-shared-with-deps-2.4.0%2Bcu124.zip | ||
unzip libtorch-win-shared-with-deps-2.4.0+cu124.zip | ||
- name: Build | ||
run: | | ||
export LIBTORCH=$(pwd)/libtorch | ||
cargo build --release | ||
mv ./target/release/libgpt_sovits_plugin.so ./libgpt_sovits_plugin.ubuntu-latest.cpu.so | ||
- name: Create release page | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
./target/release/libgpt_sovits_plugin.so | ||
token: ${{ secrets.UPLOAD_TOKEN }} | ||
|
||
- name: Upload to release page | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
gh release upload ${{ github.event.inputs.release_name }} ./target/release/libgpt_sovits_plugin.so --clobber | ||
env: | ||
GH_TOKEN: ${{ secrets.UPDATE_TOKEN }} | ||
|
||
build_ubuntu_latest_cpu: | ||
name: Build Ubuntu Latest CPU | ||
runs-on: ubuntu-latest | ||
container: wasmedge/wasmedge:ubuntu-20.04-build-gcc-cuda12 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install WasmEdge | ||
run: | | ||
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install pkg-config llvm clang | ||
- name: Install Torch | ||
run: | | ||
wget https://download.pytorch.org/libtorch/cpu/libtorch-cxx11-abi-shared-with-deps-2.4.0%2Bcpu.zip | ||
unzip libtorch-cxx11-abi-shared-with-deps-2.4.0+cpu.zip | ||
- name: Build | ||
run: | | ||
export LIBTORCH=$(pwd)/libtorch | ||
cargo build --release | ||
mv ./target/release/libgpt_sovits_plugin.so ./libgpt_sovits_plugin.ubuntu-latest.cpu.so | ||
- name: Create release page | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
./target/release/libgpt_sovits_plugin.so | ||
token: ${{ secrets.UPLOAD_TOKEN }} | ||
|
||
- name: Upload to release page | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
gh release upload ${{ github.event.inputs.release_name }} ./target/release/libgpt_sovits_plugin.so --clobber | ||
env: | ||
GH_TOKEN: ${{ secrets.UPDATE_TOKEN }} | ||
|
||
build_macos_cpu: | ||
name : Build for MacOS | ||
runs-on: macos-14 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Rust-stable | ||
uses: dtolnay/rust-toolchain@stable | ||
|
||
- name: Install WasmEdge | ||
run: | | ||
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install_v2.sh | bash -s -- --version=0.14.1 | ||
source $HOME/.wasmedge/env | ||
- name: Install Torch | ||
run: | | ||
wget https://download.pytorch.org/libtorch/cpu/libtorch-macos-arm64-2.4.0.zip | ||
unzip libtorch-macos-arm64-2.4.0.zip | ||
- name: Build | ||
run: | | ||
export LIBTORCH=$(pwd)/libtorch | ||
cargo build --release | ||
mv ./target/release/libgpt_sovits_plugin.dylib ./libgpt_sovits_plugin.macos.cpu.dylib | ||
- name: Create release page | ||
uses: softprops/action-gh-release@v2 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: | | ||
./target/release/libgpt_sovits_plugin.so | ||
token: ${{ secrets.UPLOAD_TOKEN }} | ||
|
||
- name: Upload to release page | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
run: | | ||
gh release upload ${{ github.event.inputs.release_name }} ./target/release/libgpt_sovits_plugin.so --clobber | ||
env: | ||
GH_TOKEN: ${{ secrets.UPDATE_TOKEN }} |