Repository navigation
150 lines (125 loc) · 4.77 KB
/
Copy pathrelease.yml
File metadata and controls
150 lines (125 loc) · 4.77 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
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: aarch64-unknown-linux-gnu
os: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
if: matrix.target == 'aarch64-unknown-linux-gnu'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu
echo "CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER=aarch64-linux-gnu-gcc" >> $GITHUB_ENV
- name: Build
run: cargo build --release --target ${{ matrix.target }} --bin lux --bin luxd
- name: Package
run: |
cd target/${{ matrix.target }}/release
tar czf ../../../lux-${{ matrix.target }}.tar.gz lux luxd
cd ../../..
- name: Upload artifact
uses: actions/upload-artifact@v7
with:
name: lux-${{ matrix.target }}
path: lux-${{ matrix.target }}.tar.gz
bundle-x86_64:
name: Bundle portable x86_64
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download x86_64 build
uses: actions/download-artifact@v8
with:
name: lux-x86_64-unknown-linux-gnu
path: build
- name: Extract lux + luxd
run: tar xzf build/lux-x86_64-unknown-linux-gnu.tar.gz -C build/
- name: Download llama.cpp (llama-server)
env:
LLAMA_CPP_TAG: b9066
run: |
curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors \
"https://github.com/ggml-org/llama.cpp/releases/download/${LLAMA_CPP_TAG}/llama-${LLAMA_CPP_TAG}-bin-ubuntu-x64.tar.gz" \
-o llama-cpp.tgz
mkdir llama-cpp-unpack
tar xzf llama-cpp.tgz -C llama-cpp-unpack
- name: Download GGUF weights
run: |
mkdir -p bundle/models
curl -fsSL --retry 5 --retry-delay 5 --retry-all-errors \
"https://huggingface.co/henrywangxf/lux/resolve/main/qwen3-1.7b.Q4_K_M.gguf" \
-o bundle/models/lux.gguf
ls -lh bundle/models/lux.gguf
- name: Assemble tarball
run: |
mkdir -p bundle/systemd
cp build/lux build/luxd bundle/
# llama.cpp's Ubuntu release ships as build/bin/{llama-server,*.so}.
# Flatten into bundle/ so the portable-mode probe finds llama-server
# next to lux, and its rpath ($ORIGIN) finds the sibling .so files.
LLAMA_BIN_DIR="$(dirname "$(find llama-cpp-unpack -name llama-server -type f | head -n1)")"
cp "$LLAMA_BIN_DIR/llama-server" bundle/
cp "$LLAMA_BIN_DIR"/*.so* bundle/
chmod +x bundle/llama-server
cp systemd/luxd.service bundle/systemd/
cp docs/portable-readme.md bundle/README.md
mv bundle lux-portable-linux-x86_64
tar czf lux-portable-linux-x86_64.tar.gz lux-portable-linux-x86_64/
ls -lh lux-portable-linux-x86_64.tar.gz
- name: Upload to Hugging Face Hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
run: |
pip install --quiet huggingface_hub
hf upload \
henrywangxf/lux-portable \
lux-portable-linux-x86_64.tar.gz \
"lux-portable-linux-x86_64-${GITHUB_REF_NAME}.tar.gz" \
--repo-type model \
--token "$HF_TOKEN"
release:
name: Create Release
needs: [build, bundle-x86_64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Download artifacts
uses: actions/download-artifact@v8
with:
path: artifacts
- name: Create release
uses: softprops/action-gh-release@v3
with:
files: artifacts/**/*
generate_release_notes: true
body: |
## Portable bundle (standalone, ~1 GB)
Lux + luxd + llama-server + pre-downloaded `henrywangxf/lux` weights (Q4_K_M GGUF) — extract and run, no system install or network required.
**Download:** https://huggingface.co/henrywangxf/lux-portable/resolve/main/lux-portable-linux-x86_64-${{ github.ref_name }}.tar.gz
```
tar xzf lux-portable-linux-x86_64-${{ github.ref_name }}.tar.gz
cd lux-portable-linux-x86_64/
./lux
```
## Raw binaries
Attached below. Requires an existing OpenAI-compatible LLM server (Ollama or llama-server); see the repo README for install steps.