mirror of
https://github.com/ggerganov/whisper.cpp.git
synced 2025-04-26 22:09:44 +00:00
Some checks failed
Bindings Tests (Ruby) / ubuntu-22 (push) Has been cancelled
CI / determine-tag (push) Has been cancelled
CI / ubuntu-22 (linux/amd64) (push) Has been cancelled
CI / ubuntu-22 (linux/ppc64le) (push) Has been cancelled
CI / ubuntu-22-arm64 (linux/arm64) (push) Has been cancelled
CI / ubuntu-22-arm-v7 (linux/arm/v7) (push) Has been cancelled
CI / macOS-latest (generic/platform=iOS) (push) Has been cancelled
CI / macOS-latest (generic/platform=macOS) (push) Has been cancelled
CI / macOS-latest (generic/platform=tvOS) (push) Has been cancelled
CI / ubuntu-22-gcc (linux/amd64, Debug) (push) Has been cancelled
CI / ubuntu-22-gcc (linux/amd64, Release) (push) Has been cancelled
CI / ubuntu-22-gcc (linux/ppc64le, Debug) (push) Has been cancelled
CI / ubuntu-22-gcc (linux/ppc64le, Release) (push) Has been cancelled
CI / ubuntu-22-gcc-arm64 (linux/arm64, Debug) (push) Has been cancelled
CI / ubuntu-22-gcc-arm64 (linux/arm64, Release) (push) Has been cancelled
CI / ubuntu-22-gcc-arm-v7 (linux/arm/v7, Debug) (push) Has been cancelled
CI / ubuntu-22-gcc-arm-v7 (linux/arm/v7, Release) (push) Has been cancelled
CI / ubuntu-22-clang (linux/amd64, Debug) (push) Has been cancelled
CI / ubuntu-22-clang (linux/amd64, Release) (push) Has been cancelled
CI / ubuntu-22-clang (linux/arm64, Debug) (push) Has been cancelled
CI / ubuntu-22-clang (linux/arm64, Release) (push) Has been cancelled
CI / ubuntu-22-clang (linux/ppc64le, Debug) (push) Has been cancelled
CI / ubuntu-22-clang (linux/ppc64le, Release) (push) Has been cancelled
CI / ubuntu-22-gcc-sanitized (linux/amd64, ADDRESS) (push) Has been cancelled
CI / ubuntu-22-gcc-sanitized (linux/amd64, THREAD) (push) Has been cancelled
CI / ubuntu-22-gcc-sanitized (linux/amd64, UNDEFINED) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl (linux/amd64, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl (linux/arm/v7, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl (linux/arm64, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl (linux/ppc64le, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl-fp16 (linux/amd64, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl-fp16 (linux/arm/v7, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl-fp16 (linux/arm64, icx, icpx, ON) (push) Has been cancelled
CI / ubuntu-22-cmake-sycl-fp16 (linux/ppc64le, icx, icpx, ON) (push) Has been cancelled
CI / windows-msys2 (Release, clang-x86_64, CLANG64) (push) Has been cancelled
CI / windows-msys2 (Release, ucrt-x86_64, UCRT64) (push) Has been cancelled
CI / windows (Win32, Release, win32-x86, x86, 2.28.5, ON) (push) Has been cancelled
CI / windows (x64, Release, win32-x86-64, x64, 2.28.5, ON) (push) Has been cancelled
CI / windows-blas (Win32, ON, Release, x86, 2.28.5, ON) (push) Has been cancelled
CI / windows-blas (x64, ON, Release, x64, 2.28.5, ON) (push) Has been cancelled
CI / windows-cublas (x64, Release, ON, 11.8.0, ON, 2.28.5) (push) Has been cancelled
CI / windows-cublas (x64, Release, ON, 12.2.0, ON, 2.28.5) (push) Has been cancelled
CI / emscripten (Release) (push) Has been cancelled
CI / ios-xcode-build (Release) (push) Has been cancelled
CI / android (push) Has been cancelled
CI / android_java (push) Has been cancelled
CI / bindings-java (push) Has been cancelled
CI / quantize (push) Has been cancelled
CI / release (push) Has been cancelled
CI / coreml-base-en (push) Has been cancelled
Publish Docker image / Push Docker image to Docker Hub (map[dockerfile:.devops/main.Dockerfile platform:linux/amd64 tag:main]) (push) Has been cancelled
Examples WASM / deploy-wasm-github-pages (push) Has been cancelled
* ci : re-enable bindings-java (java) job This commit re-enables the job previously name `java` which was disabled in the build.yml file. The motivation for this is that we recently fixed a few issue in the java bindings and it should be possible to build them on windows. Refs: https://github.com/ggerganov/whisper.cpp/pull/2949 Resolves: https://github.com/ggerganov/whisper.cpp/issues/2781
160 lines
4.2 KiB
Groovy
160 lines
4.2 KiB
Groovy
plugins {
|
|
id 'java'
|
|
id 'java-library'
|
|
id 'maven-publish'
|
|
id 'signing'
|
|
}
|
|
|
|
archivesBaseName = 'whispercpp'
|
|
group = 'io.github.ggerganov'
|
|
version = '1.4.0'
|
|
|
|
|
|
sourceCompatibility = 1.8
|
|
targetCompatibility = 1.8
|
|
|
|
sourceSets {
|
|
main {
|
|
resources {
|
|
srcDirs = ['src/main/resources', 'build/generated/resources/main']
|
|
}
|
|
}
|
|
test {
|
|
runtimeClasspath += files('build/generated/resources/main')
|
|
}
|
|
}
|
|
|
|
tasks.register('copyLibwhisperDynlib', Copy) {
|
|
from '../../build/src'
|
|
include 'libwhisper.dylib'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyLibwhisperSo', Copy) {
|
|
from '../../build/src'
|
|
include 'libwhisper.so'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyWhisperDLL', Copy) {
|
|
from '../../build/bin/Release'
|
|
include 'whisper.dll'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyGGML_BASE_DLL', Copy) {
|
|
from '../../build/bin/Release'
|
|
include 'ggml-base.dll'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyGGML_DLL', Copy) {
|
|
from '../../build/bin/Release'
|
|
include 'ggml.dll'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyGGML_CPU_DLL', Copy) {
|
|
from '../../build/bin/Release'
|
|
include 'ggml-cpu.dll'
|
|
into 'build/generated/resources/main'
|
|
}
|
|
|
|
tasks.register('copyLibs') {
|
|
dependsOn copyLibwhisperDynlib, copyLibwhisperSo, copyWhisperDLL, copyGGML_BASE_DLL, copyGGML_DLL, copyGGML_CPU_DLL
|
|
}
|
|
|
|
test {
|
|
systemProperty 'jna.library.path', project.file('build/generated/resources/main').absolutePath
|
|
}
|
|
|
|
java {
|
|
withSourcesJar()
|
|
withJavadocJar()
|
|
}
|
|
|
|
sourcesJar() {
|
|
dependsOn copyLibs
|
|
}
|
|
|
|
jar {
|
|
dependsOn copyLibs
|
|
exclude '**/whisper_java.exp', '**/whisper_java.lib'
|
|
}
|
|
|
|
javadoc {
|
|
options.addStringOption('Xdoclint:none', '-quiet')
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
test.dependsOn copyLibs
|
|
processResources.dependsOn copyLibs
|
|
|
|
dependencies {
|
|
implementation "net.java.dev.jna:jna:5.13.0"
|
|
testImplementation "org.junit.jupiter:junit-jupiter:5.9.2"
|
|
testImplementation "org.assertj:assertj-core:3.24.2"
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
publishing {
|
|
publications {
|
|
mavenJava(MavenPublication) {
|
|
artifactId = 'whispercpp'
|
|
from components.java
|
|
pom {
|
|
name = 'whispercpp'
|
|
description = "Java JNA bindings for OpenAI's Whisper model, implemented in C/C++"
|
|
url = 'https://github.com/ggerganov/whisper.cpp'
|
|
licenses {
|
|
license {
|
|
name = 'MIT licence'
|
|
url = 'https://raw.githubusercontent.com/ggerganov/whisper.cpp/master/LICENSE'
|
|
}
|
|
}
|
|
developers {
|
|
developer {
|
|
id = 'ggerganov'
|
|
name = 'Georgi Gerganov'
|
|
email = 'ggerganov@gmail.com'
|
|
}
|
|
developer {
|
|
id = 'nalbion'
|
|
name = 'Nicholas Albion'
|
|
email = 'nalbion@yahoo.com'
|
|
}
|
|
}
|
|
scm {
|
|
connection = 'scm:git:git://github.com/ggerganov/whisper.cpp.git'
|
|
url = 'https://github.com/ggerganov/whisper.cpp'
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
repositories {
|
|
maven {
|
|
def releasesRepoUrl = 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
|
|
def snapshotsRepoUrl = 'https://s01.oss.sonatype.org/content/repositories/snapshots/'
|
|
url = version.endsWith('-SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
|
credentials {
|
|
username = System.getenv("MAVEN_USERNAME")
|
|
password = System.getenv("MAVEN_PASSWORD")
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
signing {
|
|
def signingKey = System.getenv("PGP_SECRET")
|
|
def signingPassword = System.getenv("PGP_PASSPHRASE")
|
|
useInMemoryPgpKeys(signingKey, signingPassword)
|
|
sign publishing.publications.mavenJava
|
|
}
|