Changeset 77f347d
- Timestamp:
- Jun 3, 2016, 10:53:27 AM (8 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- 848fb00
- Parents:
- 4df85197
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkinsfile
r4df85197 r77f347d 1 1 2 def build() { 3 build_stage 'Checkout' 4 5 //checkout the source code and clean the repo 6 sh 'rm -rf *' 7 checkout scm 8 9 build_stage 'Build' 10 11 //Configure the conpilation (Output is not relevant) 12 //Use the current directory as the installation target so nothing 13 //escapes the sandbox 14 //Also specify the compiler by hand 15 def install_dir = pwd tmp: true 16 sh "CC=gcc-4.9 CXX=g++-4.9 ./configure --prefix=${install_dir} > /dev/null" 17 18 //Compile the project 19 sh 'make -j 8 install' 20 21 build_stage 'Test' 22 23 status_prefix = 'Test' 24 25 dir ('src/examples') { 26 sh './runTests.sh' 27 } 28 29 build_stage 'Cleanup' 30 31 //install doesn't need to be cleaned since prefix uses temporary workspace 32 } 33 34 def Compiler 35 36 def build_stage(String name) { 37 def stage_name = "${Compiler} ${name}" 38 stage stage_name 39 40 status_prefix = stage_name 41 } 2 42 3 43 node ('master'){ 4 44 5 45 def err = null 6 def sta ge_name46 def status_prefix 7 47 def log_needed = false 8 48 currentBuild.result = "SUCCESS" 9 49 10 50 try { 51 Compiler = 'gcc-4.9' 52 build() 11 53 12 stage 'Checkout'13 14 //checkout the source code and clean the repo15 checkout scm16 sh 'git clean -dfq'17 18 stage 'Build'19 20 stage_name = 'Build'21 22 //Clean the directory (Output is not relevant)23 sh 'make clean > /dev/null'24 25 //Configure the conpilation (Output is not relevant)26 //Use the current directory as the installation target so nothing27 //escapes the sandbox28 //Also specify the compiler by hand29 def install_dir = pwd tmp: true30 sh "CC=gcc-4.9 CXX=g++-4.9 ./configure --prefix=${install_dir} > /dev/null"31 32 //Compile the project33 sh 'make -j 8 install'34 35 stage 'Test'36 37 stage_name = 'Test'38 39 dir ('src/examples') {40 sh './runTests.sh'41 }42 43 stage 'Cleanup'44 45 //install doesn't need to be cleaned since prefix uses temporary workspace46 54 } 47 55 … … 49 57 err = caughtError 50 58 log_needed = true 51 currentBuild.result = "FAILURE" 52 53 switch(stage_name) { 54 case 'Test' : 55 currentBuild.result = "TEST FAILURE" 56 break 57 default : 58 break 59 } 59 currentBuild.result = "${status_prefix} FAILURE" 60 60 } 61 61
Note: See TracChangeset
for help on using the changeset viewer.