-
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
214 additions
and
187 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,7 +7,7 @@ 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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -126,11 +126,11 @@ jobs: | |
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,15 +151,41 @@ 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 | ||
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 | ||
with: | ||
|
@@ -168,12 +194,12 @@ jobs: | |
|
||
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
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.