-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Upgrade whisper.cpp library to 1.7.1
- Loading branch information
Showing
14 changed files
with
221 additions
and
194 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,13 +7,13 @@ jobs: | |
download-model: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Download tiny ggml model | ||
run: | | ||
git submodule update --init | ||
./download-test-model.sh | ||
- name: Artifact debian x86_64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: tiny-ggml-model | ||
path: ggml-tiny.bin | ||
|
@@ -23,10 +23,10 @@ jobs: | |
needs: [download-model] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- name: Docker Setup Buildx | ||
uses: docker/setup-buildx-action@v1.6.0 | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
- name: Setup project dir | ||
|
@@ -38,7 +38,7 @@ jobs: | |
docker build --build-arg="RUN_TESTS=true" -f dockerfile . -t whisperjni_binary:x86_64 --load | ||
docker run --platform=amd64 -v $(pwd)/dist:/out whisperjni_binary:x86_64 bash -c "cp src/main/resources/debian-amd64/* /out/" | ||
- name: Artifact debian x86_64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debian-binary-amd64 | ||
path: dist/* | ||
|
@@ -47,12 +47,12 @@ jobs: | |
needs: [download-model] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Docker Setup Buildx | ||
uses: docker/setup-buildx-action@v1.6.0 | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
- name: Setup project dir | ||
|
@@ -64,7 +64,7 @@ jobs: | |
docker build -f dockerfile . -t whisperjni_binary:arm64 --platform arm64 --load | ||
DOCKER_BUILDKIT=1 docker run --platform=arm64 -v $(pwd)/dist:/out whisperjni_binary:arm64 bash -c "cp src/main/resources/debian-arm64/* /out/" | ||
- name: Artifact debian arm64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debian-binary-arm64 | ||
path: dist/* | ||
|
@@ -73,12 +73,12 @@ jobs: | |
needs: [download-model] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v1 | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Docker Setup Buildx | ||
uses: docker/setup-buildx-action@v1.6.0 | ||
uses: docker/setup-buildx-action@v3 | ||
with: | ||
install: true | ||
- name: Setup project dir | ||
|
@@ -90,7 +90,7 @@ jobs: | |
docker build -f dockerfile . -t whisperjni_binary:armv7l --platform arm --load | ||
DOCKER_BUILDKIT=1 docker run --platform=arm -v $(pwd)/dist:/out whisperjni_binary:armv7l bash -c "cp src/main/resources/debian-armv7l/* /out/" | ||
- name: Artifact debian armv7l | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: debian-binary-armv7l | ||
path: dist/* | ||
|
@@ -99,7 +99,7 @@ jobs: | |
needs: [download-model] | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -121,16 +121,16 @@ jobs: | |
# mvn test | ||
mv src\main\resources\win-amd64\*.dll .\dist\ | ||
- name: Artifact windows x86_64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: windows-binary-x86_64 | ||
path: dist/*.dll | ||
|
||
build-lib-macos: | ||
build-lib-macos-amd64: | ||
needs: [download-model] | ||
runs-on: macos-latest | ||
runs-on: macos-13 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
|
@@ -151,29 +151,55 @@ jobs: | |
run: | | ||
export DYLD_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ | ||
./build_macos.sh amd64 | ||
./build_macos.sh arm64 | ||
# mvn test | ||
mv src/main/resources/macos-amd64/*.dylib dist/ | ||
mv src/main/resources/macos-arm64/*.dylib dist_arm64/ | ||
- name: Artifact macos amd64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-binary-amd64 | ||
path: dist/*.dylib | ||
|
||
build-lib-macos-arm64: | ||
needs: [download-model] | ||
runs-on: macos-14 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '17' | ||
# - name: Set up Maven | ||
# uses: stCarolas/[email protected] | ||
# with: | ||
# maven-version: 3.9.2 | ||
- name: Setup project dir | ||
run: | | ||
export DYLD_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ | ||
mkdir -p dist | ||
mkdir -p dist_arm64 | ||
git submodule update --init | ||
mv ./tiny-ggml-model/ggml-tiny.bin ./ggml-tiny.bin | ||
- name: Build binary | ||
run: | | ||
export DYLD_LIBRARY_PATH=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/ | ||
./build_macos.sh arm64 | ||
# mvn test | ||
mv src/main/resources/macos-arm64/*.dylib dist_arm64/ | ||
- name: Artifact macos arm64 | ||
uses: actions/upload-artifact@v3 | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: macos-binary-arm64 | ||
path: dist_arm64/*.dylib | ||
|
||
deploy: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
needs: [build-lib-debian-x86_64,build-lib-debian-arm,build-lib-debian-arm64,build-lib-windows,build-lib-macos] | ||
needs: [build-lib-debian-x86_64,build-lib-debian-arm,build-lib-debian-arm64,build-lib-windows,build-lib-macos-amd64, build-lib-macos-arm64] | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: actions/download-artifact@v4 | ||
- name: check tree | ||
run: ls -R | ||
|
@@ -189,12 +215,13 @@ jobs: | |
mv ./macos-binary-amd64/*.dylib ./src/main/resources/macos-amd64/ | ||
mv ./macos-binary-arm64/*.dylib ./src/main/resources/macos-arm64/ | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v1 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: 17 | ||
distribution: 'zulu' | ||
server-id: sonatype-nexus-staging | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
server-password: MAVEN_CENTRAL_TOKEN | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
- name: Deploy with Maven | ||
|
@@ -207,7 +234,7 @@ jobs: | |
echo "WHISPER_VERSION=$WHISPER_VERSION" >> $GITHUB_OUTPUT | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.