From d715d50dfb883dea3fa95e72cfc3207e6e8930ba Mon Sep 17 00:00:00 2001 From: Hongyu Liu Date: Fri, 4 Jul 2025 08:54:41 +0200 Subject: [PATCH] adds cmake_flow in Jenkinsfile --- Jenkinsfile | 43 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index e72d321..998f2fb 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -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 {