Changeset 7e288c4
- Timestamp:
- Aug 17, 2018, 1:05:44 PM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
- Children:
- eb0938ca
- Parents:
- 47b3235
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r47b3235 r7e288c4 4 4 // Main loop of the compilation 5 5 //=========================================================================================================== 6 set -x7 8 6 node ('master'){ 9 7 … … 13 11 14 12 stage_name = '' 15 16 compiler = null17 arch_name = ''18 architecture = ''19 20 do_alltests = false21 do_benchmark = false22 do_doc = false23 do_publish = false24 do_sendemail = true25 13 26 14 builddir = pwd tmp: true … … 72 60 finally { 73 61 //Send email with final results if this is not a full build 74 if( do_sendemail) {62 if( !params.Silent ) { 75 63 echo 'Notifying users of result' 76 64 email(currentBuild.result, log_needed, bIsSandbox) … … 150 138 ]]) 151 139 152 compiler = compiler_from_params( params.Compiler ) 153 arch_name = params.Architecture 154 architecture = architecture_from_params( arch_name ) 155 156 do_alltests = (params.RunAllTests == 'true') 157 do_benchmark = (params.RunBenchmark == 'true') 158 do_doc = (params.BuildDocumentation == 'true') 159 do_publish = (params.Publish == 'true') 160 do_sendemail = ! (params.Silent == 'true') 161 162 echo params.RunAllTests.getClass().toString(); 140 params.Compiler = compiler_from_params( params.Compiler ) 141 params.Architecture = architecture_from_params( params.Architecture ) 163 142 164 143 collect_git_info() 165 144 166 def full = do_alltests ? " (Full)" : ""167 currentBuild.description = "${ compiler.cc_name}:${arch_name}${full}"168 169 echo """Compiler : ${ compiler.cc_name } (${ compiler.cpp_cc }/${ compiler.cfa_cc })170 Architecture : ${ arch_name }171 Arc Flags : ${ architecture}145 def full = params.RunAllTests ? " (Full)" : "" 146 currentBuild.description = "${ params.Compiler.cc_name }:${ params.Architecture.name }${full}" 147 148 echo """Compiler : ${ params.Compiler.cc_name } (${ params.Compiler.cpp_cc }/${ params.Compiler.cfa_cc }) 149 Architecture : ${ params.Architecture.name } 150 Arc Flags : ${ params.Architecture.flags } 172 151 Run All Tests : ${ params.RunAllTests.toString() } 173 152 Run Benchmark : ${ params.RunBenchmark.toString() } … … 235 214 } 236 215 216 //Description of an architecture (Must be serializable since pipelines are persistent) 217 class CC_Desc implements Serializable { 218 public String name 219 public String flags 220 221 CC_Desc(String name, String flags) { 222 this.name = name 223 this.flags = flags 224 } 225 } 226 237 227 def architecture_from_params( arch ) { 238 228 switch( arch ) { 239 229 case 'x64': 240 return '--host=x86_64'230 return new CC_Desc('x64', '--host=x86_64') 241 231 break 242 232 case 'x86': 243 return '--host=i386'233 return new CC_Desc('x86', '--host=i386') 244 234 break 245 235 default : … … 282 272 //Also specify the compiler by hand 283 273 targets="" 284 if( do_alltests) {274 if( params.RunAllTests ) { 285 275 targets="--with-target-hosts='host:debug,host:nodebug'" 286 276 } else { … … 288 278 } 289 279 290 sh "${srcdir}/configure CXX=${ compiler.cpp_cc} ${architecture} ${targets} --with-backend-compiler=${compiler.cfa_cc} --quiet"280 sh "${srcdir}/configure CXX=${params.Compiler.cpp_cc} ${params.Architecture.flags} ${targets} --with-backend-compiler=${params.Compiler.cfa_cc} --quiet" 291 281 292 282 //Compile the project … … 301 291 dir (builddir) { 302 292 //Run the tests from the tests directory 303 if ( do_alltests ) {293 if ( params.RunAllTests ) { 304 294 sh 'make --no-print-directory -C tests all-tests debug=yes' 305 295 sh 'make --no-print-directory -C tests all-tests debug=no ' … … 315 305 build_stage('Benchmark') { 316 306 317 if( ! do_benchmark ) return307 if( !params.RunBenchmark ) return 318 308 319 309 dir (builddir) { 320 310 //Append bench results 321 sh "make --no-print-directory -C benchmark jenkins githash=${gitRefNewValue} arch=${ arch_name} | tee ${srcdir}/bench.json"311 sh "make --no-print-directory -C benchmark jenkins githash=${gitRefNewValue} arch=${params.Architecture} | tee ${srcdir}/bench.json" 322 312 } 323 313 } … … 327 317 build_stage('Documentation') { 328 318 329 if( ! do_doc) return319 if( !params.BuildDocumentation ) return 330 320 331 321 dir ('doc/user') { … … 342 332 build_stage('Publish') { 343 333 344 if( ! do_publish ) return334 if( !params.Publish ) return 345 335 346 336 //Then publish the results
Note: See TracChangeset
for help on using the changeset viewer.