adds cmake_flow in Jenkinsfile
This commit is contained in:
		
							
								
								
									
										43
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										43
									
								
								Jenkinsfile
									
									
									
									
										vendored
									
									
								
							| @@ -2,7 +2,7 @@ void checkout_project() { | |||||||
|     checkout([ |     checkout([ | ||||||
|         $class: 'GitSCM', |         $class: 'GitSCM', | ||||||
|         branches: [ |         branches: [ | ||||||
|             [name: '*/main'] |             [name: '*/develop'] | ||||||
|         ], |         ], | ||||||
|         extensions: [ |         extensions: [ | ||||||
|             [$class: 'CleanBeforeCheckout'], |             [$class: 'CleanBeforeCheckout'], | ||||||
| @@ -29,6 +29,15 @@ void make_hello(board) { | |||||||
|     sh("make -C hello-world/ clean") |     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 { | pipeline { | ||||||
|     agent { docker {  |     agent { docker {  | ||||||
|         image 'ubuntu-riscv' |         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 { |     post { | ||||||
|         failure { |         failure { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user