ggerganov HF Staff commited on
Commit
75d5513
·
unverified ·
1 Parent(s): 45ef7b5

ci : enable java package publishing (#1228)

Browse files
Files changed (1) hide show
  1. .github/workflows/build.yml +26 -26
.github/workflows/build.yml CHANGED
@@ -7,7 +7,7 @@ env:
7
  jobs:
8
  ubuntu-latest:
9
  runs-on: ubuntu-latest
10
-
11
  strategy:
12
  fail-fast: false
13
  matrix:
@@ -16,7 +16,7 @@ jobs:
16
  steps:
17
  - name: Clone
18
  uses: actions/checkout@v3
19
-
20
  - name: Set up QEMU
21
  uses: docker/setup-qemu-action@v2
22
 
@@ -46,10 +46,10 @@ jobs:
46
  run: |
47
  make
48
  make stream
49
-
50
  freeBSD-latest:
51
  runs-on: macos-12
52
-
53
  steps:
54
  - name: Clone
55
  uses: actions/checkout@v3
@@ -131,10 +131,10 @@ jobs:
131
  steps:
132
  - name: Clone
133
  uses: actions/checkout@v3
134
-
135
  - name: Set up QEMU
136
  uses: docker/setup-qemu-action@v2
137
-
138
  - name: Build ${{ matrix.arch }}
139
  run: |
140
  docker run --platform ${{ matrix.arch }} --rm \
@@ -275,10 +275,10 @@ jobs:
275
  with:
276
  name: whisper-blas-bin-${{ matrix.arch }}
277
  path: build/bin/${{ matrix.build }}
278
-
279
  windows-cublas:
280
  runs-on: windows-latest
281
-
282
  strategy:
283
  matrix:
284
  build: [Release]
@@ -290,40 +290,40 @@ jobs:
290
  s2arc: x64
291
  - sdl2: ON
292
  s2ver: 2.26.0
293
-
294
  steps:
295
  - name: Clone
296
  uses: actions/checkout@v3
297
 
298
  - name: Add msbuild to PATH
299
  uses: microsoft/setup-msbuild@v1
300
-
301
  - name: Install CUDA Toolkit
302
  id: cuda-toolkit
303
  uses: Jimver/cuda-toolkit@v0.2.10
304
-
305
  - name: Fetch SDL2 and set SDL2_DIR
306
  if: matrix.sdl2 == 'ON'
307
  run: |
308
  C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
309
  7z x sdl2.zip
310
  echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
311
-
312
  - name: Configure
313
  run: >
314
  cmake -S . -B ./build -A ${{ matrix.arch }}
315
  -DCMAKE_BUILD_TYPE=${{ matrix.build }}
316
  -DWHISPER_CUBLAS=1
317
-
318
  - name: Build
319
  run: |
320
  cd ./build
321
  msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
322
-
323
  - name: Copy SDL2.dll
324
  if: matrix.sdl2 == 'ON'
325
  run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
326
-
327
  - name: Upload binaries
328
  if: matrix.sdl2 == 'ON'
329
  uses: actions/upload-artifact@v1
@@ -371,7 +371,7 @@ jobs:
371
 
372
  - name: Build objc example
373
  run: xcodebuild -project examples/whisper.objc/whisper.objc.xcodeproj -scheme whisper.objc -configuration ${{ matrix.build }} -sdk iphonesimulator build
374
-
375
  - name: Build swiftui example
376
  run: xcodebuild -project examples/whisper.swiftui/whisper.swiftui.xcodeproj -scheme WhisperCppDemo -configuration ${{ matrix.build }} -sdk iphonesimulator build
377
 
@@ -387,7 +387,7 @@ jobs:
387
  with:
388
  distribution: zulu
389
  java-version: 17
390
-
391
  - name: Setup Android SDK
392
  uses: android-actions/setup-android@v2
393
 
@@ -426,6 +426,15 @@ jobs:
426
  name: whispercpp.jar
427
  path: bindings/java/build/libs/whispercpp-*.jar
428
 
 
 
 
 
 
 
 
 
 
429
  quantize:
430
  runs-on: ubuntu-latest
431
 
@@ -438,12 +447,3 @@ jobs:
438
  ./models/download-ggml-model.sh tiny.en
439
  make quantize
440
  ./quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0
441
-
442
- # - name: Publish package
443
- # if: ${{ github.ref == 'refs/heads/master' }}
444
- # uses: gradle/gradle-build-action@v2
445
- # with:
446
- # arguments: publish
447
- # env:
448
- # MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
449
- # MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
 
7
  jobs:
8
  ubuntu-latest:
9
  runs-on: ubuntu-latest
10
+
11
  strategy:
12
  fail-fast: false
13
  matrix:
 
16
  steps:
17
  - name: Clone
18
  uses: actions/checkout@v3
19
+
20
  - name: Set up QEMU
21
  uses: docker/setup-qemu-action@v2
22
 
 
46
  run: |
47
  make
48
  make stream
49
+
50
  freeBSD-latest:
51
  runs-on: macos-12
52
+
53
  steps:
54
  - name: Clone
55
  uses: actions/checkout@v3
 
131
  steps:
132
  - name: Clone
133
  uses: actions/checkout@v3
134
+
135
  - name: Set up QEMU
136
  uses: docker/setup-qemu-action@v2
137
+
138
  - name: Build ${{ matrix.arch }}
139
  run: |
140
  docker run --platform ${{ matrix.arch }} --rm \
 
275
  with:
276
  name: whisper-blas-bin-${{ matrix.arch }}
277
  path: build/bin/${{ matrix.build }}
278
+
279
  windows-cublas:
280
  runs-on: windows-latest
281
+
282
  strategy:
283
  matrix:
284
  build: [Release]
 
290
  s2arc: x64
291
  - sdl2: ON
292
  s2ver: 2.26.0
293
+
294
  steps:
295
  - name: Clone
296
  uses: actions/checkout@v3
297
 
298
  - name: Add msbuild to PATH
299
  uses: microsoft/setup-msbuild@v1
300
+
301
  - name: Install CUDA Toolkit
302
  id: cuda-toolkit
303
  uses: Jimver/cuda-toolkit@v0.2.10
304
+
305
  - name: Fetch SDL2 and set SDL2_DIR
306
  if: matrix.sdl2 == 'ON'
307
  run: |
308
  C:/msys64/usr/bin/wget.exe -qO sdl2.zip https://github.com/libsdl-org/SDL/releases/download/release-${{ matrix.s2ver }}/SDL2-devel-${{ matrix.s2ver }}-VC.zip
309
  7z x sdl2.zip
310
  echo "SDL2_DIR=$env:GITHUB_WORKSPACE/SDL2-${{ matrix.s2ver }}/cmake" >> $env:GITHUB_ENV
311
+
312
  - name: Configure
313
  run: >
314
  cmake -S . -B ./build -A ${{ matrix.arch }}
315
  -DCMAKE_BUILD_TYPE=${{ matrix.build }}
316
  -DWHISPER_CUBLAS=1
317
+
318
  - name: Build
319
  run: |
320
  cd ./build
321
  msbuild ALL_BUILD.vcxproj -t:build -p:configuration=${{ matrix.build }} -p:platform=${{ matrix.arch }}
322
+
323
  - name: Copy SDL2.dll
324
  if: matrix.sdl2 == 'ON'
325
  run: copy "$env:SDL2_DIR/../lib/${{ matrix.s2arc }}/SDL2.dll" build/bin/${{ matrix.build }}
326
+
327
  - name: Upload binaries
328
  if: matrix.sdl2 == 'ON'
329
  uses: actions/upload-artifact@v1
 
371
 
372
  - name: Build objc example
373
  run: xcodebuild -project examples/whisper.objc/whisper.objc.xcodeproj -scheme whisper.objc -configuration ${{ matrix.build }} -sdk iphonesimulator build
374
+
375
  - name: Build swiftui example
376
  run: xcodebuild -project examples/whisper.swiftui/whisper.swiftui.xcodeproj -scheme WhisperCppDemo -configuration ${{ matrix.build }} -sdk iphonesimulator build
377
 
 
387
  with:
388
  distribution: zulu
389
  java-version: 17
390
+
391
  - name: Setup Android SDK
392
  uses: android-actions/setup-android@v2
393
 
 
426
  name: whispercpp.jar
427
  path: bindings/java/build/libs/whispercpp-*.jar
428
 
429
+ - name: Publish package
430
+ if: ${{ github.ref == 'refs/heads/master' }}
431
+ uses: gradle/gradle-build-action@v2
432
+ with:
433
+ arguments: publish
434
+ env:
435
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
436
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
437
+
438
  quantize:
439
  runs-on: ubuntu-latest
440
 
 
447
  ./models/download-ggml-model.sh tiny.en
448
  make quantize
449
  ./quantize models/ggml-tiny.en.bin models/ggml-tiny.en-q4_0.bin q4_0