forked from ServeurpersoCom/acestep.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
152 lines (135 loc) · 4.63 KB
/
release.yml
File metadata and controls
152 lines (135 loc) · 4.63 KB
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
name: Build & Release Binaries
on:
release:
types: [published]
workflow_dispatch:
inputs:
release_tag:
description: 'Release tag to attach binaries to (e.g. v0.1.0)'
required: true
type: string
permissions:
contents: write
jobs:
build:
name: Build · ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x64
os: ubuntu-22.04
cmake_flags: -DGGML_BLAS=ON
apt_extra: pkg-config libopenblas-dev
install_cuda: true
install_vulkan: true
- name: macos-arm64-metal
os: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install build tools (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq cmake build-essential ${{ matrix.apt_extra || '' }}
- name: Install CUDA toolkit (Linux)
uses: Jimver/cuda-toolkit@v0.2.30
if: matrix.install_cuda == true
with:
log-file-suffix: '${{matrix.os}}.txt'
- name: Install Vulkan SDK (Windows)
if: matrix.install_vulkan == true
uses: humbletim/install-vulkan-sdk@v1.2
with:
version: 1.4.309.0
cache: true
- name: Configure & Build (Linux / macOS)
if: runner.os == 'Linux'
run: |
./buildall.sh
- name: Configure & Build (Linux / macOS)
if: runner.os == 'macOS'
run: |
mkdir build
cd build
cmake ..
cmake --build . --config Release -j "$(nproc)"
- name: Configure & Build (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Path build | Out-Null
Set-Location build
cmake -B build-msvc -DGGML_CPU_ALL_VARIANTS=ON -DGGML_CUDA=ON -DGGML_VULKAN=ON -DGGML_BACKEND_DL=ON
cmake --build build-msvc --config Release -j $env:NUMBER_OF_PROCESSORS
- name: Smoke test
continue-on-error: true
shell: bash
run: |
if [ "$RUNNER_OS" = "Windows" ]; then
BIN="build/Release"
EXT=".exe"
else
BIN="build"
EXT=""
fi
"$BIN/ace-qwen3$EXT" 2>&1 | head -5
"$BIN/dit-vae$EXT" 2>&1 | head -5
"$BIN/ace-understand$EXT" 2>&1 | head -5
"$BIN/neural-codec$EXT" 2>&1 | head -5
"$BIN/quantize$EXT" 2>&1 | head -3
"$BIN/mp3-codec$EXT" 2>&1 | head -3
- name: Resolve release tag
id: tag
shell: bash
run: |
if [ "${{ github.event_name }}" = "release" ]; then
echo "value=${{ github.event.release.tag_name }}" >> $GITHUB_OUTPUT
else
echo "value=${{ inputs.release_tag }}" >> $GITHUB_OUTPUT
fi
- name: Package binaries (Linux)
if: runner.os == 'Linux'
run: |
mkdir -p dist
cp build/ace-qwen3 build/dit-vae build/ace-understand \
build/quantize build/neural-codec build/mp3-codec build/*.so dist/
tar -C dist -czf "acestep-${{ matrix.name }}.tar.gz" .
- name: Package binaries (macOS)
if: runner.os == 'macOS'
run: |
mkdir -p dist
cp build/ace-qwen3 build/dit-vae build/ace-understand \
build/quantize build/neural-codec build/mp3-codec dist/
tar -C dist -czf "acestep-${{ matrix.name }}.tar.gz" .
- name: Package binaries (Windows)
if: runner.os == 'Windows'
shell: pwsh
run: |
New-Item -ItemType Directory -Path dist | Out-Null
$bins = @('ace-qwen3','dit-vae','ace-understand','quantize','neural-codec','mp3-codec')
foreach ($b in $bins) {
Copy-Item "build\Release\$b.exe" dist\
}
Compress-Archive -Path dist\* -DestinationPath "acestep-${{ matrix.name }}.zip"
- name: Upload to release (Linux / macOS)
if: runner.os != 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload "${{ steps.tag.outputs.value }}" \
"acestep-${{ matrix.name }}.tar.gz" \
--clobber
- name: Upload to release (Windows)
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: pwsh
run: |
gh release upload "${{ steps.tag.outputs.value }}" `
"acestep-${{ matrix.name }}.zip" `
--clobber