Skip to content

Commit 94d9ee0

Browse files
committed
refactor build workflow to download llama.cpp release binaries dynamically
1 parent 08d9cba commit 94d9ee0

1 file changed

Lines changed: 15 additions & 16 deletions

File tree

.github/workflows/build.yml

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -27,29 +27,28 @@ jobs:
2727
- name: Install dependencies
2828
run: yarn install --frozen-lockfile
2929

30-
- name: Get latest llama.cpp release tag
30+
- name: Download llama.cpp release binaries
3131
id: llama
3232
shell: bash
3333
run: |
34-
TAG=$(curl -s https://api.github.com/repos/ggml-org/llama.cpp/releases/latest | jq -r '.tag_name')
34+
# Fetch all asset download URLs from the latest release
35+
RELEASE=$(curl -s https://api.github.com/repos/ggml-org/llama.cpp/releases/latest)
36+
TAG=$(echo "$RELEASE" | jq -r '.tag_name')
3537
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
3638
echo "Latest llama.cpp release: $TAG"
3739
38-
- name: Download llama.cpp CUDA binaries
39-
shell: bash
40-
run: |
41-
TAG="${{ steps.llama.outputs.tag }}"
42-
URL="https://github.com/ggml-org/llama.cpp/releases/download/${TAG}/llama-${TAG}-bin-win-cuda-13.1-x64.zip"
43-
echo "Downloading $URL"
44-
curl -L -o llama-cuda.zip "$URL"
40+
# List all assets so we can see exact names
41+
echo "$RELEASE" | jq -r '.assets[].name' | head -30
4542
46-
- name: Download llama.cpp CUDA runtime
47-
shell: bash
48-
run: |
49-
TAG="${{ steps.llama.outputs.tag }}"
50-
URL="https://github.com/ggml-org/llama.cpp/releases/download/${TAG}/cudart-llama-bin-win-cuda-13.1-x64.zip"
51-
echo "Downloading $URL"
52-
curl -L -o llama-cudart.zip "$URL"
43+
# Find and download the CUDA binary
44+
CUDA_URL=$(echo "$RELEASE" | jq -r '.assets[] | select(.name | test("bin-win-cuda.*x64\\.zip$")) | select(.name | test("cudart") | not) | .browser_download_url')
45+
echo "CUDA binary URL: $CUDA_URL"
46+
curl -fL -o llama-cuda.zip "$CUDA_URL"
47+
48+
# Find and download the CUDA runtime
49+
CUDART_URL=$(echo "$RELEASE" | jq -r '.assets[] | select(.name | test("cudart.*cuda.*x64\\.zip$")) | .browser_download_url')
50+
echo "CUDART URL: $CUDART_URL"
51+
curl -fL -o llama-cudart.zip "$CUDART_URL"
5352
5453
- name: Extract and merge into assets/server
5554
shell: bash

0 commit comments

Comments
 (0)