Changeset 8e58264
- Timestamp:
- Dec 8, 2020, 1:22:47 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- dde7d6d
- Parents:
- 3f91792
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/Distribute
r3f91792 r8e58264 15 15 SrcDir = pwd tmp: false 16 16 Settings = null 17 final Version 17 18 18 19 // Local variables … … 22 23 currentBuild.result = "SUCCESS" 23 24 24 try { 25 //Wrap build to add timestamp to command line 26 wrap([$class: 'TimestamperBuildWrapper']) { 25 //Wrap build to add timestamp to command line 26 wrap([$class: 'TimestamperBuildWrapper']) { 27 27 28 29 28 final commit, build 29 (commit, build) = prepare_build() 30 30 31 node('x64') { 32 BuildDir = pwd tmp: true 33 SrcDir = pwd tmp: false 34 35 Tools.Clean() 36 37 Tools.Checkout( commit ) 38 39 final version = GetVersion( build ) 40 } 41 42 // Update the build directories when exiting the node 31 node('x64') { 43 32 BuildDir = pwd tmp: true 44 33 SrcDir = pwd tmp: false 34 35 Tools.Clean() 36 37 Tools.Checkout( commit ) 38 39 Version = GetVersion( build ) 40 41 Configure() 42 43 Package() 44 45 Test() 46 47 Archive() 45 48 } 49 50 // Update the build directories when exiting the node 51 BuildDir = pwd tmp: true 52 SrcDir = pwd tmp: false 46 53 } 47 54 48 //If an exception is caught we need to change the status and remember to49 //attach the build log to the email50 // catch (Exception caughtError) {51 // //rethrow error later52 // err = caughtError53 54 // echo err.toString()55 56 // //An error has occured, the build log is relevent57 // log_needed = true58 59 // //Store the result of the build log60 // currentBuild.result = "${StageName} FAILURE".trim()61 // }62 63 finally {64 // //Send email with final results if this is not a full build65 // email(log_needed)66 67 // echo 'Distribution Completed'68 69 // /* Must re-throw exception to propagate error */70 // if (err) {71 // throw err72 // }73 }74 55 } 75 56 … … 90 71 91 72 return version 73 } 74 75 def Configure() { 76 Tools.BuildStage('Configure', true) { 77 // Configure must be run inside the tree 78 dir (SrcDir) { 79 // Generate the necessary build files 80 sh './autogen.sh' 81 } 82 83 // Build outside of the src tree to ease cleaning 84 dir (BuildDir) { 85 // Configure the compilation (Output is not relevant) 86 // Use the current directory as the installation target so nothing escapes the sandbox 87 // Also specify the compiler by hand 88 sh "${SrcDir}/configure CXX=g++-9 CC=gcc-9 AR=gcc-ar RANLIB=gcc-ranlib --quiet" 89 90 // Configure libcfa 91 sh 'make -j 8 --no-print-directory configure-libcfa' 92 } 93 } 94 } 95 96 def Package() { 97 Tools.BuildStage('Package', true) { 98 dir (BuildDir) { 99 sh "make VERSION=${Version} dist" 100 } 101 } 102 } 103 104 def Test() { 105 Tools.BuildStage('Package', true) { 106 dir (BuildDir) { 107 sh "make VERSION=${Version} distcheck -j 8" 108 } 109 } 110 } 111 112 def Archive() { 113 dir (BuildDir) { 114 archiveArtifacts artifacts: "cfa-cc-*.tar.gz", fingerprint: true 115 } 92 116 } 93 117 -
Jenkinsfile
r3f91792 r8e58264 93 93 // Build outside of the src tree to ease cleaning 94 94 dir (BuildDir) { 95 //Configure the co npilation (Output is not relevant)95 //Configure the compilation (Output is not relevant) 96 96 //Use the current directory as the installation target so nothing escapes the sandbox 97 97 //Also specify the compiler by hand
Note: See TracChangeset
for help on using the changeset viewer.