From b2acaf80620940cb64d6254002437e8f4b2c96ba Mon Sep 17 00:00:00 2001 From: brian Date: Wed, 26 Oct 2022 19:22:58 +0200 Subject: [PATCH] Add jenkinsfile for pipeline build and dockerfile for build Signed-off-by: brian --- build.gradle | 2 +- cavis-full/build.gradle | 29 +++++++--------------- cavis-native/cavis-native-lib/build.gradle | 9 ++++--- chooseBackend.gradle | 2 ++ 4 files changed, 17 insertions(+), 25 deletions(-) diff --git a/build.gradle b/build.gradle index fc9167f30..479821e9d 100644 --- a/build.gradle +++ b/build.gradle @@ -114,7 +114,7 @@ allprojects { Project proj -> /* Need to verify the property exists, as some modules may not declare it (i.e. the java-platform plugin) */ - if (components.hasProperty("java") && !proj.name.equals("cavis-native-lib")) { + if (components.hasProperty("java") ) { from components.java } } diff --git a/cavis-full/build.gradle b/cavis-full/build.gradle index 8b4d96604..c124dbac8 100644 --- a/cavis-full/build.gradle +++ b/cavis-full/build.gradle @@ -21,14 +21,14 @@ dependencies { && !sproj.name.equals("Cavis") && !sproj.name.equals("cavis-datavec") && !sproj.name.equals("cavis-dnn") - && !sproj.name.equals("cavis-native") + && !sproj.name.equals("cavis-native") && !sproj.name.equals("cavis-native-lib") && !sproj.name.equals("cavis-nd4j") && !sproj.name.equals("cavis-ui") && !sproj.name.equals("cavis-zoo")) { api sproj } } - api project(path: ":cavis-native:cavis-native-lib", configuration: "runtimeElements") + api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportRuntimeElements") /* api(projects.cavisNative.cavisNativeLib) { capabilities { @@ -76,17 +76,17 @@ tasks.getByName("jar") { } } -/* - -/* -artifacts { - archives customFatJar -} */ + +artifacts { + archives shadowJar +} + shadowJar { - enabled false; + enabled true; zip64 true //need this to support jars with more than 65535 entries + classifier null } publishing { @@ -107,17 +107,6 @@ publishing { */ } } - - task printDeps { - doLast { - configurations.api.dependencies.each { dep -> - println "${dep.group} - ${dep.name} - ${dep.version}" - dep.artifacts.each { art -> - println " ${art.extension} - ${art.classifier}" - } - } - } - } } diff --git a/cavis-native/cavis-native-lib/build.gradle b/cavis-native/cavis-native-lib/build.gradle index 0439110ce..8ecbeafc1 100644 --- a/cavis-native/cavis-native-lib/build.gradle +++ b/cavis-native/cavis-native-lib/build.gradle @@ -459,6 +459,7 @@ javadoc { } artifacts { + //implementation(jar) chipList.each { thisChip -> implementation(tasks.getByName("${thisChip}SupportJar")) } @@ -473,7 +474,7 @@ artifacts { } */ - +/* publishing { publications { mavenJava(MavenPublication) { @@ -484,8 +485,8 @@ publishing { } } } - - +*/ +/* if( osdetector.os.startsWith("windows")) { @@ -508,7 +509,7 @@ if( osdetector.os.startsWith("windows")) { } } } - +*/ task printDeps { doLast { diff --git a/chooseBackend.gradle b/chooseBackend.gradle index 9e34b7552..9a25c6caf 100644 --- a/chooseBackend.gradle +++ b/chooseBackend.gradle @@ -21,6 +21,8 @@ ext { chip = (properties.CAVIS_CHIP ?: "cuda,cpu").toLowerCase() //the default is to build for CPU and CUDA testChip = (properties.CAVIS_TEST_CHIP ?: " ").toLowerCase() //the default is without specific backend + logger.quiet("Building for chips ${chip} and running tests with backends for ${testChip}") + chipList = chip.split(",") testChipList = testChip.split(",")