Skip to content

Commit cf51d65

Browse files
Test release builds
1 parent 5442560 commit cf51d65

File tree

6 files changed

+1076
-35
lines changed

6 files changed

+1076
-35
lines changed

.github/workflows/release.yml

Lines changed: 184 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,184 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
workflow_dispatch:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build-linux:
14+
name: Build Linux Binaries
15+
strategy:
16+
matrix:
17+
include:
18+
# x86_64 builds - CPU only
19+
- target: x86_64-unknown-linux-gnu
20+
features: ""
21+
suffix: cpu
22+
runner: ubuntu-latest
23+
cuda_cap: ""
24+
25+
# x86_64 CUDA builds with different compute capabilities
26+
- target: x86_64-unknown-linux-gnu
27+
features: "cuda"
28+
suffix: cuda-sm75
29+
runner: ubuntu-latest
30+
cuda_cap: "75" # RTX 2080, T4, Quadro RTX series
31+
- target: x86_64-unknown-linux-gnu
32+
features: "cuda"
33+
suffix: cuda-sm80
34+
runner: ubuntu-latest
35+
cuda_cap: "80" # A100, A30
36+
- target: x86_64-unknown-linux-gnu
37+
features: "cuda"
38+
suffix: cuda-sm86
39+
runner: ubuntu-latest
40+
cuda_cap: "86" # RTX 3060-3090, A40, RTX A2000-A6000
41+
- target: x86_64-unknown-linux-gnu
42+
features: "cuda"
43+
suffix: cuda-sm89
44+
runner: ubuntu-latest
45+
cuda_cap: "89" # RTX 4050-4090, RTX Ada series, L4, L40
46+
- target: x86_64-unknown-linux-gnu
47+
features: "cuda"
48+
suffix: cuda-sm90
49+
runner: ubuntu-latest
50+
cuda_cap: "90" # H100, H200, GH200
51+
- target: x86_64-unknown-linux-gnu
52+
features: "cuda"
53+
suffix: cuda-sm100
54+
runner: ubuntu-latest
55+
cuda_cap: "100" # B200, GB200
56+
- target: x86_64-unknown-linux-gnu
57+
features: "cuda"
58+
suffix: cuda-sm120
59+
runner: ubuntu-latest
60+
cuda_cap: "120" # RTX 5050-5090, RTX PRO Blackwell series
61+
62+
# x86_64 CUDA+cuDNN builds with different compute capabilities
63+
- target: x86_64-unknown-linux-gnu
64+
features: "cuda,cudnn"
65+
suffix: cuda-cudnn-sm75
66+
runner: ubuntu-latest
67+
cuda_cap: "75" # RTX 2080, T4, Quadro RTX series
68+
- target: x86_64-unknown-linux-gnu
69+
features: "cuda,cudnn"
70+
suffix: cuda-cudnn-sm80
71+
runner: ubuntu-latest
72+
cuda_cap: "80" # A100, A30
73+
- target: x86_64-unknown-linux-gnu
74+
features: "cuda,cudnn"
75+
suffix: cuda-cudnn-sm86
76+
runner: ubuntu-latest
77+
cuda_cap: "86" # RTX 3060-3090, A40, RTX A2000-A6000
78+
- target: x86_64-unknown-linux-gnu
79+
features: "cuda,cudnn"
80+
suffix: cuda-cudnn-sm89
81+
runner: ubuntu-latest
82+
cuda_cap: "89" # RTX 4050-4090, RTX Ada series, L4, L40
83+
- target: x86_64-unknown-linux-gnu
84+
features: "cuda,cudnn"
85+
suffix: cuda-cudnn-sm90
86+
runner: ubuntu-latest
87+
cuda_cap: "90" # H100, H200, GH200
88+
- target: x86_64-unknown-linux-gnu
89+
features: "cuda,cudnn"
90+
suffix: cuda-cudnn-sm100
91+
runner: ubuntu-latest
92+
cuda_cap: "100" # B200, GB200
93+
- target: x86_64-unknown-linux-gnu
94+
features: "cuda,cudnn"
95+
suffix: cuda-cudnn-sm120
96+
runner: ubuntu-latest
97+
cuda_cap: "120" # RTX 5050-5090, RTX PRO Blackwell series
98+
99+
# aarch64 builds - CPU only (CUDA not commonly used on ARM)
100+
- target: aarch64-unknown-linux-gnu
101+
features: ""
102+
suffix: cpu
103+
runner: ubuntu-latest
104+
cuda_cap: ""
105+
106+
runs-on: ${{ matrix.runner }}
107+
108+
steps:
109+
- uses: actions/checkout@v4
110+
111+
- name: Install Rust
112+
uses: dtolnay/rust-toolchain@stable
113+
with:
114+
targets: ${{ matrix.target }}
115+
116+
- name: Cache dependencies
117+
uses: actions/cache@v3
118+
with:
119+
path: |
120+
~/.cargo/registry
121+
~/.cargo/git
122+
target
123+
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
124+
125+
- name: Install cross (for cross-compilation)
126+
run: cargo install cross --git https://github.com/cross-rs/cross
127+
128+
- name: Build daemon binary
129+
run: |
130+
CUDA_COMPUTE_CAP=${{ matrix.cuda_cap }} cross build --release --target ${{ matrix.target }} --bin super-stt --features "${{ matrix.features }}"
131+
132+
- name: Build app binary
133+
run: |
134+
cross build --release --target ${{ matrix.target }} --bin super-stt-app
135+
136+
- name: Build applet binary
137+
run: |
138+
cross build --release --target ${{ matrix.target }} --bin super-stt-cosmic-applet
139+
140+
- name: Create tarball
141+
run: |
142+
mkdir -p dist
143+
cp target/${{ matrix.target }}/release/super-stt dist/
144+
cp target/${{ matrix.target }}/release/super-stt-app dist/
145+
cp target/${{ matrix.target }}/release/super-stt-cosmic-applet dist/
146+
147+
# Include systemd service files
148+
mkdir -p dist/systemd
149+
if [ -f super-stt/systemd/super-stt.service ]; then
150+
cp super-stt/systemd/super-stt.service dist/systemd/
151+
fi
152+
153+
# Create tarball with architecture and feature suffix
154+
tar -czf super-stt-${{ matrix.target }}-${{ matrix.suffix }}.tar.gz -C dist .
155+
156+
- name: Upload artifact
157+
uses: actions/upload-artifact@v4
158+
with:
159+
name: super-stt-${{ matrix.target }}-${{ matrix.suffix }}
160+
path: super-stt-${{ matrix.target }}-${{ matrix.suffix }}.tar.gz
161+
162+
create-release:
163+
name: Create Release
164+
needs: build-linux
165+
runs-on: ubuntu-latest
166+
if: startsWith(github.ref, 'refs/tags/')
167+
168+
steps:
169+
- uses: actions/checkout@v4
170+
171+
- name: Download all artifacts
172+
uses: actions/download-artifact@v5
173+
with:
174+
path: artifacts
175+
176+
- name: Create Release
177+
uses: softprops/action-gh-release@v2
178+
with:
179+
files: artifacts/**/*.tar.gz
180+
draft: false
181+
prerelease: false
182+
generate_release_notes: true
183+
env:
184+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Cargo.toml

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
candle-transformers = { git = "https://github.com/huggingface/candle.git", branch = "main" }
2424
candle-flash-attn = { git = "https://github.com/huggingface/candle.git", branch = "main" }
2525

26-
# HuggingFace Hub and tokenizers (for daemon)
26+
# Tokenizers (for daemon)
2727
tokenizers = "0.21.4"
2828
tekken-rs = "0.1.1"
2929

@@ -104,6 +104,19 @@
104104
# D-Bus integration
105105
zbus = "5.9.0"
106106

107+
[workspace.metadata.cross.build]
108+
pre-build = [
109+
"dpkg --add-architecture arm64",
110+
"apt-get update && apt-get --assume-yes install libxkbcommon-dev:$CROSS_DEB_ARCH libwayland-dev:$CROSS_DEB_ARCH libxkbcommon-x11-dev:$CROSS_DEB_ARCH libegl1-mesa-dev:$CROSS_DEB_ARCH libfontconfig1-dev:$CROSS_DEB_ARCH libfreetype6-dev:$CROSS_DEB_ARCH libglib2.0-dev:$CROSS_DEB_ARCH libspeechd-dev:$CROSS_DEB_ARCH libxrandr-dev:$CROSS_DEB_ARCH libxinerama-dev:$CROSS_DEB_ARCH libxcursor-dev:$CROSS_DEB_ARCH libxi-dev:$CROSS_DEB_ARCH libxss-dev:$CROSS_DEB_ARCH libasound2-dev:$CROSS_DEB_ARCH pkg-config libssl-dev:$CROSS_DEB_ARCH",
111+
]
112+
113+
114+
[workspace.metadata.cross.build.env]
115+
passthrough = ["CUDA_COMPUTE_CAP"]
116+
117+
[workspace.metadata.cross.target.x86_64-unknown-linux-gnu]
118+
image = "nvidia/cuda:12.9.0-cudnn-devel-ubuntu24.04"
119+
107120
[profile.release]
108121
lto = true
109122
codegen-units = 1

0 commit comments

Comments
 (0)