-
Notifications
You must be signed in to change notification settings - Fork 34
149 lines (133 loc) · 4.86 KB
/
Copy pathrelease.yml
File metadata and controls
149 lines (133 loc) · 4.86 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
# Tagged binaries and a container image. build.yml already compiles all of this
# on every push; this is the same work with the artifacts kept.
name: release
on:
push:
tags: ['v*']
workflow_dispatch:
inputs:
tag:
description: Tag to build (dry run, nothing is published)
required: true
permissions:
contents: write
packages: write
env:
BINARIES: vla-server vlm-server vla-cli vla-bench
jobs:
linux:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
include:
- name: linux-x86_64-cpu
cmake: -DGGML_CUDA=OFF
cuda: false
runner: ubuntu-24.04
- name: linux-x86_64-cuda
cmake: -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES="75;86;89;120"
cuda: true
runner: ubuntu-24.04
# Jetson and other aarch64 boards. Native arm64 runner, CPU only: the
# hosted images carry no CUDA for arm64, so a Jetson GPU build still
# has to happen on the device.
- name: linux-aarch64-cpu
cmake: -DGGML_CUDA=OFF
cuda: false
runner: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v7
- name: deps
run: |
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends \
build-essential cmake git ca-certificates pkg-config \
libzmq3-dev cppzmq-dev libprotobuf-dev protobuf-compiler
- name: cuda toolkit
if: matrix.cuda
run: |
wget -q https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2404/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update -qq
sudo apt-get install -y -qq --no-install-recommends cuda-toolkit-12-8
echo "/usr/local/cuda/bin" >> "$GITHUB_PATH"
- name: build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release ${{ matrix.cmake }}
cmake --build build -j"$(nproc)" --target $BINARIES vla
- name: package
run: |
out="vla.cpp-${{ github.ref_name }}-${{ matrix.name }}"
mkdir -p "$out"
for b in $BINARIES; do cp "build/$b" "$out/"; done
cp build/libvla.so "$out/"
cp include/vla.h LICENSE.md README.md "$out/"
# vla-cli --text runs this; VLA_TOKENIZE_SCRIPT points at it.
mkdir -p "$out/scripts" && cp scripts/tokenize_prompt.py "$out/scripts/"
tar -czf "$out.tar.gz" "$out"
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.name }}
path: '*.tar.gz'
macos:
runs-on: macos-14
steps:
- uses: actions/checkout@v7
- name: deps
run: brew install cmake zeromq cppzmq protobuf
- name: build
run: |
cmake -B build -DCMAKE_BUILD_TYPE=Release -DGGML_METAL=ON
cmake --build build -j"$(sysctl -n hw.ncpu)" --target $BINARIES vla
- name: package
run: |
out="vla.cpp-${{ github.ref_name }}-macos-arm64-metal"
mkdir -p "$out"
for b in $BINARIES; do cp "build/$b" "$out/"; done
cp build/libvla.dylib "$out/"
cp include/vla.h LICENSE.md README.md "$out/"
mkdir -p "$out/scripts" && cp scripts/tokenize_prompt.py "$out/scripts/"
# Metal needs the shader library next to the binary.
find build -name 'default.metallib' -exec cp {} "$out/" \;
tar -czf "$out.tar.gz" "$out"
- uses: actions/upload-artifact@v7
with:
name: macos-arm64-metal
path: '*.tar.gz'
docker:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- uses: docker/login-action@v4
if: startsWith(github.ref, 'refs/tags/')
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: image name
run: echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_ENV"
- uses: docker/build-push-action@v7
with:
context: .
push: ${{ startsWith(github.ref, 'refs/tags/') }}
tags: |
${{ env.IMAGE }}:${{ github.ref_name }}
${{ env.IMAGE }}:latest
cache-from: type=gha
cache-to: type=gha,mode=max
publish:
needs: [linux, macos, docker]
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-24.04
steps:
# Tarballs only. The docker job also leaves a .dockerbuild build record
# artifact behind, and pulling that one fails the whole download.
- uses: actions/download-artifact@v8
with: { path: dist, pattern: '{linux,macos}-*', merge-multiple: true }
- uses: softprops/action-gh-release@v3
with:
files: dist/*.tar.gz
fail_on_unmatched_files: true
generate_release_notes: true