Skip to content

Commit 8d5e63a

Browse files
Release actions
1 parent 5442560 commit 8d5e63a

File tree

6 files changed

+1079
-35
lines changed

6 files changed

+1079
-35
lines changed

.github/workflows/release.yml

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