GitHub actions (#2)
* Updated readme, enabled automatc testing * Snapshot support * Release CI support Co-authored-by: Salomon BRYS <salomon@kodein.net>
This commit is contained in:
@@ -49,12 +49,15 @@ sealed class Cross {
|
||||
val buildNativeJni by tasks.creating {
|
||||
group = "build"
|
||||
}
|
||||
val noCrossCompile: String? by project
|
||||
fun creatingBuildNativeJni(target: String, cross: Cross?) = tasks.creating(Exec::class) {
|
||||
group = "build"
|
||||
dependsOn(generateJniHeaders)
|
||||
dependsOn(":native:buildSecp256k1${target.capitalize()}")
|
||||
buildNativeJni.dependsOn(this)
|
||||
|
||||
if (noCrossCompile == "true") onlyIf { cross == null }
|
||||
|
||||
inputs.files(projectDir.resolve("build.sh"))
|
||||
outputs.dir(buildDir.resolve("build/cmake/$target"))
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ JNI_HEADERS=$TARGET
|
||||
if [ "$TARGET" == "linux" ]; then
|
||||
OUTFILE=libsecp256k1-jni.so
|
||||
ADD_LIB=-lgmp
|
||||
CC_OPTS="-fPIC"
|
||||
elif [ "$TARGET" == "darwin" ]; then
|
||||
OUTFILE=libsecp256k1-jni.dylib
|
||||
if [ -z "$CROSS_TRIPLE" ]; then
|
||||
@@ -24,7 +25,7 @@ elif [ "$TARGET" == "mingw" ]; then
|
||||
OUTFILE=secp256k1-jni.dll
|
||||
CC=/usr/src/mxe/usr/bin/x86_64-w64-mingw32.static-gcc
|
||||
JNI_HEADERS=linux
|
||||
CC_OPTS="-fpic"
|
||||
CC_OPTS="-fPIC"
|
||||
fi
|
||||
|
||||
mkdir -p build/jni/$TARGET
|
||||
|
||||
Reference in New Issue
Block a user