Add jenkinsfile for pipeline build and dockerfile for build

Signed-off-by: brian <brian@brutex.de>
master
Brian Rosenberger 2022-10-27 18:34:57 +02:00
parent fa3c9a3a4f
commit 80aad3087a
3 changed files with 24 additions and 11 deletions

View File

@ -108,8 +108,10 @@ allprojects { Project proj ->
} }
plugins.withType(MavenPublishPlugin) { plugins.withType(MavenPublishPlugin) {
publishing { publishing {
publications { publications {
if(! proj.name.contains("cavis-full")) {
mavenJava(MavenPublication) { mavenJava(MavenPublication) {
/* Need to verify the property exists, as some /* Need to verify the property exists, as some
modules may not declare it (i.e. the java-platform plugin) modules may not declare it (i.e. the java-platform plugin)
@ -119,6 +121,7 @@ allprojects { Project proj ->
} }
} }
} }
}
repositories { repositories {
maven { maven {

View File

@ -28,16 +28,22 @@ dependencies {
api sproj api sproj
} }
} }
if(withCpu) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportRuntimeElements") // if(withCpu) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportApiElements")
if(withCuda) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportRuntimeElements") // if(withCuda) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportApiElements")
/*
api(projects.cavisNative.cavisNativeLib) { api(projects.cavisNative.cavisNativeLib) {
capabilities { capabilities {
if(withCuda()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cuda-support", version: project.version) //if(withCuda()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cuda-support", version: project.version)
if(withCpu()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cpu-support", version: project.version) if(withCpu()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cpu-support", version: project.version)
} }
} }
*/ api(projects.cavisNative.cavisNativeLib) {
capabilities {
if(withCuda()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cuda-support", version: project.version)
//if(withCpu()) it.requireCapability(group: "net.brutex.cavis.cavis-native", name: "cavis-native-lib-cpu-support", version: project.version)
}
}
//if(withCpu()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportImplementation") //if(withCpu()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportImplementation")
//if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportImplementation") //if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportImplementation")
//if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportCompileClasspath") //if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportCompileClasspath")
@ -87,6 +93,7 @@ artifacts {
shadowJar { shadowJar {
enabled true; enabled true;
zip64 true //need this to support jars with more than 65535 entries zip64 true //need this to support jars with more than 65535 entries
archiveClassifier.set('')
} }
publishing { publishing {
@ -106,6 +113,9 @@ publishing {
} }
*/ */
} }
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
} }
} }

View File

@ -21,7 +21,7 @@
ext { ext {
chip = (properties.CAVIS_CHIP ?: "cuda,cpu").toLowerCase() //the default is to build for CPU and CUDA 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 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}") logger.debug("Building for chips ${chip} and running tests with backends for ${testChip}")
chipList = chip.split(",") chipList = chip.split(",")
testChipList = testChip.split(",") testChipList = testChip.split(",")