adds cmake_flow in Jenkinsfile

This commit is contained in:
2025-07-04 08:54:41 +02:00
parent a2cd38fbd5
commit d715d50dfb

43
Jenkinsfile vendored
View File

@ -2,7 +2,7 @@ void checkout_project() {
checkout([
$class: 'GitSCM',
branches: [
[name: '*/main']
[name: '*/develop']
],
extensions: [
[$class: 'CleanBeforeCheckout'],
@ -29,6 +29,15 @@ void make_hello(board) {
sh("make -C hello-world/ clean")
}
void cmake_hello(board,build_type,core_type) {
sh("cd hello-world/")
def flavor ="${board}_${build_type}_${core_type}"
if (core_type=="32")
flavor ="${board}_${build_type}"
sh("cmake -B ${flavor} --preset=${flavor}")
sh("cmake --build ${flavor}")
}
pipeline {
agent { docker {
image 'ubuntu-riscv'
@ -72,6 +81,38 @@ pipeline {
}
}
}
stage('CMAKE flow for hello-world') {
matrix {
axes {
axis{
name 'BOARD'
values 'ISS', 'Moonlight', 'TGC_VP'
}
axis{
name 'BUILD_TYPE'
values 'Debug', 'Release'
}
axis{
name 'CORE_TYPE'
values '32', '64'
}
}
stages {
stage('Force sequential') {
options {
lock("One Board at a time")
}
stages {
stage("CMAKE") {
steps {
cmake_hello("${BOARD}","${BUILD_TYPE}","${CORE_TYPE}")
}
}
}
}
}
}
}
}
post {
failure {