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,14 +108,17 @@ allprojects { Project proj ->
}
plugins.withType(MavenPublishPlugin) {
publishing {
publications {
mavenJava(MavenPublication) {
/* Need to verify the property exists, as some
if(! proj.name.contains("cavis-full")) {
mavenJava(MavenPublication) {
/* Need to verify the property exists, as some
modules may not declare it (i.e. the java-platform plugin)
*/
if (components.hasProperty("java") ) {
from components.java
if (components.hasProperty("java")) {
from components.java
}
}
}
}

View File

@ -28,16 +28,22 @@ dependencies {
api sproj
}
}
if(withCpu) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportRuntimeElements")
if(withCuda) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportRuntimeElements")
/*
// if(withCpu) api project(path: ":cavis-native:cavis-native-lib", configuration: "cpuSupportApiElements")
// if(withCuda) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportApiElements")
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(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)
}
}
*/
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(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportImplementation")
//if(withCuda()) api project(path: ":cavis-native:cavis-native-lib", configuration: "cudaSupportCompileClasspath")
@ -87,12 +93,13 @@ artifacts {
shadowJar {
enabled true;
zip64 true //need this to support jars with more than 65535 entries
archiveClassifier.set('')
}
publishing {
publications {
mavenJava(MavenPublication) {
// artifact customFatJar
//artifact customFatJar
// from components.java
/* pom.withXml {
def dependenciesNode = asNode().dependencies
@ -106,6 +113,9 @@ publishing {
}
*/
}
shadow(MavenPublication) { publication ->
project.shadow.component(publication)
}
}
}

View File

@ -21,7 +21,7 @@
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}")
logger.debug("Building for chips ${chip} and running tests with backends for ${testChip}")
chipList = chip.split(",")
testChipList = testChip.split(",")