forked from badlogic/qwen3_tts_rs
-
Notifications
You must be signed in to change notification settings - Fork 0
97 lines (85 loc) · 3.2 KB
/
Copy pathrelease.yml
File metadata and controls
97 lines (85 loc) · 3.2 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
# Bespoke release workflow (spqx doesn't fit byt's standard build step).
#
# byt's `release build` runs plain `cargo build --release --target <triple>`
# with no per-target feature flags and no support for staging non-binary
# artifacts. spqx's backends (mlx / tch-backend) are mutually exclusive Cargo
# features that produce different binaries per platform, so this workflow
# owns compiling + staging the tarball itself and only hands off to byt at
# the checksums/GitHub-release boundary — the same "bespoke-but-conformant"
# pattern oqto uses. See wiki/projects/byteowlz-release-pipeline.md.
#
# MLX only for now: the tch/CUDA backend needs a bundled libtorch runtime and
# per-arch CUDA toolkit install (see the retired ci.yml/release.yml for how
# painful that got). Add a build-linux job here once the candle backend
# (spqx-srtg) removes that dependency.
name: release
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: Release tag (defaults to the triggering git tag)
required: false
type: string
permissions:
contents: write
jobs:
build-macos:
name: build (aarch64-apple-darwin, mlx)
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: dtolnay/rust-toolchain@stable
- name: Install build dependencies (autotools for audiopus_sys)
run: brew install automake autoconf libtool
- name: Resolve version
id: ver
run: |
TAG="${{ inputs.tag || github.ref_name }}"
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
- name: Build (mlx)
run: |
cargo build --release --no-default-features --features mlx --bin spqx
cargo build --release --no-default-features --features mlx --bin spqx-tts-worker
- name: Stage artifact
env:
VERSION: ${{ steps.ver.outputs.version }}
run: |
set -euo pipefail
TRIPLE=aarch64-apple-darwin
STAGE="dist/release/spqx-v${VERSION}-${TRIPLE}"
mkdir -p "$STAGE/bin"
# Statically linked (mlx-c/MLX + Metal JIT baked in) — no sidecar
# files needed alongside the binaries.
cp target/release/spqx target/release/spqx-tts-worker "$STAGE/bin/"
[ -f README.md ] && cp README.md "$STAGE/"
[ -f LICENSE ] && cp LICENSE "$STAGE/"
tar -czf "dist/release/spqx-v${VERSION}-${TRIPLE}.tar.gz" -C dist/release "spqx-v${VERSION}-${TRIPLE}"
rm -rf "$STAGE"
- uses: actions/upload-artifact@v4
with:
name: dist-macos
path: dist/release/*.tar.gz
if-no-files-found: error
publish:
needs: build-macos
runs-on: ubuntu-latest
container:
image: ghcr.io/byteowlz/byt:latest
steps:
- uses: actions/checkout@v4
- name: Collect build artifacts
uses: actions/download-artifact@v4
with:
path: dist/release
pattern: dist-*
merge-multiple: true
- name: Checksums + GitHub release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
byt release checksums
byt release publish --tag "${{ inputs.tag || github.ref_name }}"