16
16
LLAMA-TAG : " b1768"
17
17
18
18
jobs :
19
- build-cmake-ubuntu :
19
+ build-cmake-linux :
20
20
runs-on : ubuntu-latest
21
21
22
22
steps :
@@ -46,11 +46,11 @@ jobs:
46
46
- name : Upload Artifact
47
47
uses : actions/upload-artifact@v4
48
48
with :
49
- name : build-cmake-ubuntu -${{env.LLAMA-TAG}}-${{ github.sha }}
49
+ name : build-cmake-linux -${{env.LLAMA-TAG}}-${{ github.sha }}
50
50
path : build/bin/server
51
51
retention-days : 1
52
52
53
- build-cmake-ubuntu -cublas :
53
+ build-cmake-linux -cublas :
54
54
runs-on : ubuntu-latest
55
55
56
56
steps :
80
80
- name : Upload Artifact
81
81
uses : actions/upload-artifact@v4
82
82
with :
83
- name : build-cmake-ubuntu -cublas-${{env.LLAMA-TAG}}-${{ github.sha }}
83
+ name : build-cmake-linux -cublas-${{env.LLAMA-TAG}}-${{ github.sha }}
84
84
path : build/bin/server
85
85
retention-days : 1
86
86
@@ -211,8 +211,8 @@ jobs:
211
211
upload-server :
212
212
runs-on : ubuntu-latest
213
213
needs :
214
- - build-cmake-ubuntu
215
- - build-cmake-ubuntu -cublas
214
+ - build-cmake-linux
215
+ - build-cmake-linux -cublas
216
216
- build-cmake-windows
217
217
- build-cmake-windows-cublas
218
218
- build-cmake-macOS
@@ -227,12 +227,12 @@ jobs:
227
227
228
228
- uses : actions/download-artifact@v4
229
229
with :
230
- name : build-cmake-ubuntu -${{env.LLAMA-TAG}}-${{ github.sha }}
231
- path : ./build-cmake-ubuntu
230
+ name : build-cmake-linux -${{env.LLAMA-TAG}}-${{ github.sha }}
231
+ path : ./build-cmake-linux
232
232
- uses : actions/download-artifact@v4
233
233
with :
234
- name : build-cmake-ubuntu -cublas-${{env.LLAMA-TAG}}-${{ github.sha }}
235
- path : ./build-cmake-ubuntu -cublas
234
+ name : build-cmake-linux -cublas-${{env.LLAMA-TAG}}-${{ github.sha }}
235
+ path : ./build-cmake-linux -cublas
236
236
- uses : actions/download-artifact@v4
237
237
with :
238
238
name : build-cmake-windows-${{env.LLAMA-TAG}}-${{ github.sha }}
@@ -252,9 +252,70 @@ jobs:
252
252
253
253
- name : Upload
254
254
run : |
255
- ./mc cp ./build-cmake-ubuntu /server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/linux-x86-64
256
- ./mc cp ./build-cmake-ubuntu -cublas/server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/linux-x86-64-cublas
255
+ ./mc cp ./build-cmake-linux /server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/linux-x86-64
256
+ ./mc cp ./build-cmake-linux -cublas/server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/linux-x86-64-cublas
257
257
./mc cp ./build-cmake-windows/server.exe r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/windows-x86-64
258
258
./mc cp ./build-cmake-windows-cublas/server.exe r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/windows-x86-64-cublas
259
259
./mc cp ./build-cmake-macOS/server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/macOS-x86-64
260
260
./mc cp ./build-cmake-macOS-metal/server r2/${{secrets.AWS_BUCKET}}/${{ github.sha }}/${{env.LLAMA-TAG}}/macOS-x86-64-metal
261
+ - name : Create version spec
262
+ uses : actions/github-script@v7
263
+ with :
264
+ script : |
265
+ const fs = require('fs');
266
+ const crypto = require("crypto");
267
+
268
+ const s3Path = 'https://pub-ad9e0b7360bc4259878d0f81b89c5405.r2.dev/${{ github.sha }}/${{env.LLAMA-TAG}}';
269
+
270
+ const getCheckSum = (path) => {
271
+ const file = fs.readFileSync(path);
272
+
273
+ const hash = crypto.createHash("sha256").update(file).digest("hex");
274
+
275
+ return hash;
276
+ };
277
+
278
+ const spec = {
279
+ linux: {
280
+ "x86-64": {
281
+ cpu: {
282
+ checksum: getCheckSum("./build-cmake-linux/server"),
283
+ url: s3Path + 'linux-x86-64',
284
+ },
285
+ cublas: {
286
+ checksum: getCheckSum("./build-cmake-linux-cublas/server"),
287
+ url: s3Path + 'linux-x86-64-cublas'
288
+ },
289
+ }
290
+ },
291
+ win32: {
292
+ "x86-64": {
293
+ cpu: {
294
+ checksum: getCheckSum("./build-cmake-windows/server.exe"),
295
+ url: s3Path + 'windows-x86-64',
296
+ },
297
+ cublas: {
298
+ checksum: getCheckSum("./build-cmake-windows-cublas/server.exe"),
299
+ url: s3Path + 'windows-x86-64-cublas'
300
+ },
301
+ }
302
+ },
303
+ darwin: {
304
+ "x86-64": {
305
+ cpu: {
306
+ checksum: getCheckSum("./build-cmake-macOS/server"),
307
+ url: s3Path + 'macOS-x86-64',
308
+ },
309
+ cublas: {
310
+ checksum: getCheckSum("./build-cmake-macOS-metal/server"),
311
+ url: s3Path + 'macOS-x86-64-metal'
312
+ },
313
+ }
314
+ }
315
+ };
316
+
317
+ fs.writeFileSync('spec.json', JSON.stringify(spec));
318
+
319
+ - name : Upload spec
320
+ run : |
321
+ ./mc cp ./spec.json r2/${{secrets.AWS_BUCKET}}/spec.json
0 commit comments