Skip to content

Commit 60bd4a3

Browse files
committed
Simplify: build only for Apple Silicon, use master branch
1 parent ed11f23 commit 60bd4a3

File tree

1 file changed

+19
-110
lines changed

1 file changed

+19
-110
lines changed
Lines changed: 19 additions & 110 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
1-
# GitHub Actions workflow to build llama-finetune binary for all platforms
1+
# GitHub Actions workflow to build llama-finetune binary for macOS Apple Silicon
22
#
33
# Usage:
4-
# 1. Create a new repo (e.g., nitroinbox-binaries)
5-
# 2. Copy this file to .github/workflows/build-finetune.yml
6-
# 3. Go to Actions tab and manually trigger "Build llama-finetune"
7-
# 4. Download artifacts and create a release with them
4+
# 1. Go to Actions tab and manually trigger "Build llama-finetune"
5+
# 2. The workflow will build, package, and create a release
86
#
97
# This is a one-time build workflow (manual trigger only)
108

@@ -16,7 +14,7 @@ on:
1614
llama_cpp_ref:
1715
description: 'llama.cpp git ref (tag, branch, or commit)'
1816
required: true
19-
default: 'b4547'
17+
default: 'master'
2018
release_version:
2119
description: 'Release version tag (e.g., v1.0.0)'
2220
required: true
@@ -35,13 +33,24 @@ jobs:
3533
- name: Build llama-finetune
3634
run: |
3735
mkdir build && cd build
38-
cmake .. -DGGML_METAL=ON -DLLAMA_BUILD_EXAMPLES=ON
39-
cmake --build . --config Release --target llama-finetune -j$(sysctl -n hw.ncpu)
36+
cmake .. -DGGML_METAL=ON -DLLAMA_BUILD_EXAMPLES=ON -DLLAMA_BUILD_TOOLS=ON
37+
cmake --build . --config Release -j$(sysctl -n hw.ncpu)
38+
# List what was built
39+
ls -la bin/ || true
40+
find . -name "llama-finetune" -o -name "*finetune*" | head -20
4041
4142
- name: Package binary
4243
run: |
4344
mkdir -p dist
44-
cp build/bin/llama-finetune dist/
45+
# Find the finetune binary wherever it may be
46+
BINARY=$(find build -name "llama-finetune" -type f | head -1)
47+
if [ -z "$BINARY" ]; then
48+
echo "llama-finetune not found, listing all binaries:"
49+
find build -type f -perm +111 | head -30
50+
exit 1
51+
fi
52+
cp "$BINARY" dist/llama-finetune
53+
chmod +x dist/llama-finetune
4554
cd dist
4655
zip llama-finetune-macos-arm64.zip llama-finetune
4756
@@ -51,102 +60,8 @@ jobs:
5160
name: llama-finetune-macos-arm64
5261
path: dist/llama-finetune-macos-arm64.zip
5362

54-
build-macos-x64:
55-
runs-on: macos-13 # Intel runner
56-
steps:
57-
- name: Checkout llama.cpp
58-
uses: actions/checkout@v4
59-
with:
60-
repository: ggerganov/llama.cpp
61-
ref: ${{ github.event.inputs.llama_cpp_ref }}
62-
63-
- name: Build llama-finetune
64-
run: |
65-
mkdir build && cd build
66-
cmake .. -DGGML_METAL=ON -DLLAMA_BUILD_EXAMPLES=ON
67-
cmake --build . --config Release --target llama-finetune -j$(sysctl -n hw.ncpu)
68-
69-
- name: Package binary
70-
run: |
71-
mkdir -p dist
72-
cp build/bin/llama-finetune dist/
73-
cd dist
74-
zip llama-finetune-macos-x64.zip llama-finetune
75-
76-
- name: Upload artifact
77-
uses: actions/upload-artifact@v4
78-
with:
79-
name: llama-finetune-macos-x64
80-
path: dist/llama-finetune-macos-x64.zip
81-
82-
build-linux-x64:
83-
runs-on: ubuntu-22.04
84-
steps:
85-
- name: Checkout llama.cpp
86-
uses: actions/checkout@v4
87-
with:
88-
repository: ggerganov/llama.cpp
89-
ref: ${{ github.event.inputs.llama_cpp_ref }}
90-
91-
- name: Install dependencies
92-
run: |
93-
sudo apt-get update
94-
sudo apt-get install -y build-essential cmake
95-
96-
- name: Build llama-finetune
97-
run: |
98-
mkdir build && cd build
99-
cmake .. -DLLAMA_BUILD_EXAMPLES=ON
100-
cmake --build . --config Release --target llama-finetune -j$(nproc)
101-
102-
- name: Package binary
103-
run: |
104-
mkdir -p dist
105-
cp build/bin/llama-finetune dist/
106-
cd dist
107-
zip llama-finetune-linux-x64.zip llama-finetune
108-
109-
- name: Upload artifact
110-
uses: actions/upload-artifact@v4
111-
with:
112-
name: llama-finetune-linux-x64
113-
path: dist/llama-finetune-linux-x64.zip
114-
115-
build-linux-arm64:
116-
runs-on: ubuntu-22.04-arm # ARM runner
117-
steps:
118-
- name: Checkout llama.cpp
119-
uses: actions/checkout@v4
120-
with:
121-
repository: ggerganov/llama.cpp
122-
ref: ${{ github.event.inputs.llama_cpp_ref }}
123-
124-
- name: Install dependencies
125-
run: |
126-
sudo apt-get update
127-
sudo apt-get install -y build-essential cmake
128-
129-
- name: Build llama-finetune
130-
run: |
131-
mkdir build && cd build
132-
cmake .. -DLLAMA_BUILD_EXAMPLES=ON
133-
cmake --build . --config Release --target llama-finetune -j$(nproc)
134-
135-
- name: Package binary
136-
run: |
137-
mkdir -p dist
138-
cp build/bin/llama-finetune dist/
139-
cd dist
140-
zip llama-finetune-linux-arm64.zip llama-finetune
141-
142-
- name: Upload artifact
143-
uses: actions/upload-artifact@v4
144-
with:
145-
name: llama-finetune-linux-arm64
146-
path: dist/llama-finetune-linux-arm64.zip
147-
14863
create-release:
149-
needs: [build-macos-arm64, build-macos-x64, build-linux-x64, build-linux-arm64]
64+
needs: [build-macos-arm64]
15065
runs-on: ubuntu-latest
15166
permissions:
15267
contents: write
@@ -166,9 +81,6 @@ jobs:
16681
16782
## Platforms
16883
- `llama-finetune-macos-arm64.zip` - macOS Apple Silicon (M1/M2/M3)
169-
- `llama-finetune-macos-x64.zip` - macOS Intel
170-
- `llama-finetune-linux-x64.zip` - Linux x64
171-
- `llama-finetune-linux-arm64.zip` - Linux ARM64
17284
17385
## Usage
17486
Extract the zip and run:
@@ -178,6 +90,3 @@ jobs:
17890
```
17991
files: |
18092
artifacts/llama-finetune-macos-arm64/llama-finetune-macos-arm64.zip
181-
artifacts/llama-finetune-macos-x64/llama-finetune-macos-x64.zip
182-
artifacts/llama-finetune-linux-x64/llama-finetune-linux-x64.zip
183-
artifacts/llama-finetune-linux-arm64/llama-finetune-linux-arm64.zip

0 commit comments

Comments
 (0)