Changeset a3dc4cc
- Timestamp:
- Apr 29, 2019, 9:21:58 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- c66254e
- Parents:
- b10c39a0 (diff), 986e260 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Files:
-
- 1 added
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
Jenkins/FullBuild
rb10c39a0 ra3dc4cc 25 25 ) 26 26 } 27 } 27 28 28 //Push latest changes to do-lang repo 29 push_build() 30 } 29 promote_email(true) 31 30 } 32 31 … … 43 42 44 43 //Send email to notify the failure 45 promote_ failure_email()44 promote_email(false) 46 45 } 47 46 … … 92 91 } 93 92 94 def push_build() {95 //Don't use the build_stage function which outputs the compiler96 stage('Push') {97 98 status_prefix = 'Push'99 100 def out_dir = pwd tmp: true101 sh "mkdir -p ${out_dir}"102 103 //checkout the code to make sure this is a valid git repo104 checkout scm105 106 collect_git_info()107 108 //parse git logs to find what changed109 sh "git remote > ${out_dir}/GIT_REMOTE"110 git_remote = readFile("${out_dir}/GIT_REMOTE")111 remoteDoLangExists = git_remote.contains("DoLang")112 113 if( !remoteDoLangExists ) {114 sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'115 }116 117 //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master"118 echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN')119 }120 }121 122 93 //Helper routine to collect information about the git history 123 94 def collect_git_info() { … … 141 112 142 113 //Email notification on a full build failure 143 def promote_ failure_email() {114 def promote_email(boolean success) { 144 115 echo('notifying users') 116 117 def result = success ? "PROMOTE - SUCCESS" : "PROMOTE - FAILURE" 145 118 146 119 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 147 120 //Configurations for email format 148 def email_subject = "[cforall git][PROMOTE - FAILURE]" 149 def email_body = """This is an automated email from the Jenkins build machine. It was 150 generated because of a git hooks/post-receive script following 151 a ref change was pushed to the repository containing 152 the project "UNNAMED PROJECT". 121 def email_subject = "[cforall git][${result}]" 122 def email_body = """<p>This is an automated email from the Jenkins build machine. It was 123 generated following the result of the C\u2200 nightly build.</p> 153 124 154 Check console output at ${env.BUILD_URL} to view the results. 125 <p>Check console output at ${env.BUILD_URL} to view the results.</p> 155 126 156 - Status -------------------------------------------------------------- 127 <p>- Status --------------------------------------------------------------</p> 157 128 158 PROMOTE FAILURE 129 <p>${result}</p> 130 131 <p>- Performance ---------------------------------------------------------</p> 132 133 <img src="https://cforall.uwaterloo.ca/jenkins/job/Cforall/job/master/plot/Compilation/getPlot?index=0" > 134 135 <p>- Logs ----------------------------------------------------------------</p> 159 136 """ 160 137 … … 162 139 163 140 //send email notification 164 emailext body: email_body, subject: email_subject, to: email_to, attachLog: true141 emailext body: email_body, subject: email_subject, to: email_to, attachLog: !success 165 142 } -
Jenkinsfile
rb10c39a0 ra3dc4cc 1 1 #!groovy 2 3 import groovy.transform.Field 2 4 3 5 //=========================================================================================================== … … 22 24 wrap([$class: 'TimestamperBuildWrapper']) { 23 25 24 notify_server(0)25 26 26 Settings = prepare_build() 27 27 … … 34 34 checkout() 35 35 36 notify_server(0)37 38 36 build() 39 37 … … 50 48 BuildDir = pwd tmp: true 51 49 SrcDir = pwd tmp: false 52 53 notify_server(45)54 50 } 55 51 } … … 72 68 finally { 73 69 //Send email with final results if this is not a full build 74 if( Settings && !Settings.Silent ) { 75 email(log_needed, Settings.IsSandbox) 76 } 70 email(log_needed) 77 71 78 72 echo 'Build Completed' … … 116 110 //Also specify the compiler by hand 117 111 targets="" 118 if( Settings.RunAllTests ) {112 if( Settings.RunAllTests || Settings.RunBenchmark ) { 119 113 targets="--with-target-hosts='host:debug,host:nodebug'" 120 114 } else { … … 153 147 dir (BuildDir) { 154 148 //Append bench results 155 sh " ${SrcDir}/benchmark/jenkins.sh ${Settings.GitNewRef} ${Settings.Architecture} ${BuildDir}/bench.json"149 sh "make --no-print-directory -C benchmark jenkins" 156 150 } 157 151 } … … 176 170 build_stage('Publish') { 177 171 178 if( !Settings.Publish ) return 172 if( !Settings.RunBenchmark ) { echo 'No results to publish!!!' } 173 174 def groupCompile = new PlotGroup('Compilation', 'seconds', true) 175 def groupConcurrency = new PlotGroup('Concurrency', 'nanoseconds', false) 179 176 180 177 //Then publish the results 181 sh 'curl --silent --show-error -H \'Content-Type: application/json\' --data @${BuildDir}/bench.json https://cforall.uwaterloo.ca:8082/jenkins/publish > /dev/null || true' 178 do_plot(Settings.RunBenchmark && Settings.Publish, 'compile' , groupCompile , 'Compilation') 179 do_plot(Settings.RunBenchmark && Settings.Publish, 'ctxswitch', groupConcurrency, 'Context Switching') 180 do_plot(Settings.RunBenchmark && Settings.Publish, 'mutex' , groupConcurrency, 'Mutual Exclusion') 181 do_plot(Settings.RunBenchmark && Settings.Publish, 'signal' , groupConcurrency, 'Internal and External Scheduling') 182 182 } 183 183 } … … 196 196 197 197 return """ 198 <pre> 198 199 The branch ${env.BRANCH_NAME} has been updated. 199 200 ${gitUpdate} 200 201 Check console output at ${env.BUILD_URL} to view the results. 202 203 - Status -------------------------------------------------------------- 204 205 BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result} 206 207 - Log ----------------------------------------------------------------- 201 </pre> 202 203 <p>Check console output at ${env.BUILD_URL} to view the results.</p> 204 205 <p>- Status --------------------------------------------------------------</p> 206 207 <p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p> 208 209 <p>- Log -----------------------------------------------------------------</p> 210 211 <pre> 208 212 ${gitLog} 209 ----------------------------------------------------------------------- 213 </pre> 214 215 <p>-----------------------------------------------------------------------</p> 216 <pre> 210 217 Summary of changes: 211 218 ${gitDiff} 219 </pre> 212 220 """ 213 221 } 214 222 215 223 //Standard build email notification 216 def email(boolean log , boolean bIsSandbox) {224 def email(boolean log) { 217 225 //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line 218 226 //Configurations for email format … … 221 229 def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase() 222 230 def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}] - branch ${env.BRANCH_NAME}" 223 def email_body = """ This is an automated email from the Jenkins build machine. It was231 def email_body = """<p>This is an automated email from the Jenkins build machine. It was 224 232 generated because of a git hooks/post-receive script following 225 a ref change which was pushed to the C forall repository.233 a ref change which was pushed to the C\u2200 repository.</p> 226 234 """ + GitLogMessage() 227 235 228 def email_to = "cforall@lists.uwaterloo.ca"229 230 if( Settings && !Settings. IsSandbox) {236 def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca" 237 238 if( Settings && !Settings.Silent ) { 231 239 //send email notification 232 240 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log … … 311 319 } 312 320 321 this.IsSandbox = (branch == "jenkins-sandbox") 313 322 this.RunAllTests = param.RunAllTests 314 323 this.RunBenchmark = param.RunBenchmark … … 316 325 this.Publish = param.Publish 317 326 this.Silent = param.Silent 318 this.IsSandbox = (branch == "jenkins-sandbox")319 327 320 328 def full = param.RunAllTests ? " (Full)" : "" … … 333 341 this.GitNewRef = '' 334 342 this.GitOldRef = '' 343 } 344 } 345 346 class PlotGroup implements Serializable { 347 public String name 348 public String unit 349 public boolean log 350 351 PlotGroup(String name, String unit, boolean log) { 352 this.name = name 353 this.unit = unit 354 this.log = log 335 355 } 336 356 } … … 398 418 } 399 419 400 def notify_server(int wait) {401 sh """curl --silent --show-error --data "wait=${wait}" -X POST https://cforall.uwaterloo.ca:8082/jenkins/notify > /dev/null || true"""402 return403 }404 405 420 def make_doc() { 406 421 def err = null … … 417 432 } 418 433 } 434 435 def do_plot(boolean silent, String file, PlotGroup group, String title) { 436 437 def series = silent ? [] : [[ 438 file: "${file}.csv", 439 exclusionValues: '', 440 displayTableFlag: false, 441 inclusionFlag: 'OFF', 442 url: '' 443 ]]; 444 445 echo "file is ${BuildDir}/benchmark/${file}.csv, group ${group}, title ${title}" 446 dir("${BuildDir}/benchmark/") { 447 plot csvFileName: "cforall-${env.BRANCH_NAME}-${file}.csv", 448 csvSeries: series, 449 group: "${group.name}", 450 title: "${title}", 451 style: 'lineSimple', 452 exclZero: false, 453 keepRecords: false, 454 logarithmic: group.log, 455 numBuilds: '120', 456 useDescr: true, 457 yaxis: group.unit, 458 yaxisMaximum: '', 459 yaxisMinimum: '' 460 } 461 } -
benchmark/Makefile.am
rb10c39a0 ra3dc4cc 67 67 68 68 .NOTPARALLEL: 69 .PHONY: compile.csv ctxswitch.csv mutex.csv signal.csv 69 70 70 71 ## ========================================================================================================= … … 94 95 ## ========================================================================================================= 95 96 97 FIX_NEW_LINES = cat $@ | tr "\n" "\t" | sed -r 's/\t,/,/' | tr "\t" "\n" > $@ 98 96 99 jenkins$(EXEEXT): 97 @echo "{"98 @echo -e '\t"githash": "'${githash}'",'99 @echo -e '\t"arch": "' ${arch} '",'100 100 @DOifskipcompile@ 101 @echo -e '\t"compile": {' 102 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :' 103 @echo -e '\t\t"dummy" : {}' 104 @echo -e '\t},' 101 @+make compile.csv 105 102 @DOendif@ 106 @echo -e '\t"ctxswitch": {' 107 @echo -en '\t\t"coroutine":' 108 @+make ctxswitch-cfa_coroutine.runquiet 109 @echo -en '\t\t,"thread":' 110 @+make ctxswitch-cfa_thread.runquiet 111 @echo -e '\t},' 112 @echo -e '\t"mutex": [' 113 @echo -en '\t\t' 114 @+make mutex-cfa1.runquiet 115 @echo -en '\t\t,' 116 @+make mutex-cfa2.runquiet 117 @echo -e '\t],' 118 @echo -e '\t"scheduling": [' 119 @echo -en '\t\t' 120 @+make signal-cfa1.runquiet 121 @echo -en '\t\t,' 122 @+make signal-cfa2.runquiet 123 @echo -en '\t\t,' 124 @+make waitfor-cfa1.runquiet 125 @echo -en '\t\t,' 126 @+make waitfor-cfa2.runquiet 127 @echo -e '\n\t],' 128 @echo -e '\t"epoch": ' $(shell date +%s) 129 @echo "}" 103 @+make ctxswitch.csv 104 @+make mutex.csv 105 @+make signal.csv 106 @DOifskipcompile@ 107 @cat compile.csv 108 @DOendif@ 109 @cat ctxswitch.csv 110 @cat mutex.csv 111 @cat signal.csv 112 113 compile.csv: 114 @echo "array,attributes,empty,expression,io,monitor,operators,typeof" > $@ 115 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-array.make >> $@ 116 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-attributes.make >> $@ 117 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-empty.make >> $@ 118 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-expression.make >> $@ 119 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-io.make >> $@ 120 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-monitor.make >> $@ 121 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-operators.make >> $@ 122 @+make TIME_FORMAT='%e' PRINT_FORMAT='' compile-typeof.make >> $@ 123 @$(srcdir)/fixcsv.sh $@ 124 125 ctxswitch.csv: 126 @echo "coroutine,thread" > $@ 127 @+make ctxswitch-cfa_coroutine.runquiet >> $@ && echo -n ',' >> $@ 128 @+make ctxswitch-cfa_thread.runquiet >> $@ 129 @$(srcdir)/fixcsv.sh $@ 130 131 mutex.csv: 132 @echo "1-monitor,2-monitor" > $@ 133 @+make mutex-cfa1.runquiet >> $@ && echo -n ',' >> $@ 134 @+make mutex-cfa2.runquiet >> $@ 135 @$(srcdir)/fixcsv.sh $@ 136 137 signal.csv: 138 @echo "signal-1,signal-2,waitfor-1,waitfor-2" > $@ 139 @+make signal-cfa1.runquiet >> $@ && echo -n ',' >> $@ 140 @+make signal-cfa2.runquiet >> $@ && echo -n ',' >> $@ 141 @+make waitfor-cfa1.runquiet >> $@ && echo -n ',' >> $@ 142 @+make waitfor-cfa2.runquiet >> $@ 143 @$(srcdir)/fixcsv.sh $@ 130 144 131 145 ## ========================================================================================================= -
benchmark/Makefile.in
rb10c39a0 ra3dc4cc 401 401 PRINT_FORMAT = %20s: #Comments needed for spacing 402 402 dummy_SOURCES = dummyC.c dummyCXX.cpp 403 FIX_NEW_LINES = cat $@ | tr "\n" "\t" | sed -r 's/\t,/,/' | tr "\t" "\n" > $@ 403 404 CTXSWITCH_DEPEND = loop.run function.run fetch_add.run \ 404 405 tls-fetch_add.run ctxswitch-pthread.run \ … … 731 732 732 733 .NOTPARALLEL: 734 .PHONY: compile.csv ctxswitch.csv mutex.csv signal.csv 733 735 734 736 all : ctxswitch$(EXEEXT) mutex$(EXEEXT) signal$(EXEEXT) waitfor$(EXEEXT) creation$(EXEEXT) … … 756 758 757 759 jenkins$(EXEEXT): 758 @echo "{"759 @echo -e '\t"githash": "'${githash}'",'760 @echo -e '\t"arch": "' ${arch} '",'761 760 @DOifskipcompile@ 762 @echo -e '\t"compile": {' 763 @+make compile TIME_FORMAT='%e,' PRINT_FORMAT='\t\t\"%s\" :' 764 @echo -e '\t\t"dummy" : {}' 765 @echo -e '\t},' 761 @+make compile.csv 766 762 @DOendif@ 767 @echo -e '\t"ctxswitch": {' 768 @echo -en '\t\t"coroutine":' 769 @+make ctxswitch-cfa_coroutine.runquiet 770 @echo -en '\t\t,"thread":' 771 @+make ctxswitch-cfa_thread.runquiet 772 @echo -e '\t},' 773 @echo -e '\t"mutex": [' 774 @echo -en '\t\t' 775 @+make mutex-cfa1.runquiet 776 @echo -en '\t\t,' 777 @+make mutex-cfa2.runquiet 778 @echo -e '\t],' 779 @echo -e '\t"scheduling": [' 780 @echo -en '\t\t' 781 @+make signal-cfa1.runquiet 782 @echo -en '\t\t,' 783 @+make signal-cfa2.runquiet 784 @echo -en '\t\t,' 785 @+make waitfor-cfa1.runquiet 786 @echo -en '\t\t,' 787 @+make waitfor-cfa2.runquiet 788 @echo -e '\n\t],' 789 @echo -e '\t"epoch": ' $(shell date +%s) 790 @echo "}" 763 @+make ctxswitch.csv 764 @+make mutex.csv 765 @+make signal.csv 766 @DOifskipcompile@ 767 @cat compile.csv 768 @DOendif@ 769 @cat ctxswitch.csv 770 @cat mutex.csv 771 @cat signal.csv 772 773 compile.csv: 774 @echo "array,attributes,empty,expression,io,monitor,operators,typeof" > $@ 775 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-array.make >> $@ 776 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-attributes.make >> $@ 777 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-empty.make >> $@ 778 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-expression.make >> $@ 779 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-io.make >> $@ 780 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-monitor.make >> $@ 781 @+make TIME_FORMAT='%e,' PRINT_FORMAT='' compile-operators.make >> $@ 782 @+make TIME_FORMAT='%e' PRINT_FORMAT='' compile-typeof.make >> $@ 783 @$(srcdir)/fixcsv.sh $@ 784 785 ctxswitch.csv: 786 @echo "coroutine,thread" > $@ 787 @+make ctxswitch-cfa_coroutine.runquiet >> $@ && echo -n ',' >> $@ 788 @+make ctxswitch-cfa_thread.runquiet >> $@ 789 @$(srcdir)/fixcsv.sh $@ 790 791 mutex.csv: 792 @echo "1-monitor,2-monitor" > $@ 793 @+make mutex-cfa1.runquiet >> $@ && echo -n ',' >> $@ 794 @+make mutex-cfa2.runquiet >> $@ 795 @$(srcdir)/fixcsv.sh $@ 796 797 signal.csv: 798 @echo "signal-1,signal-2,waitfor-1,waitfor-2" > $@ 799 @+make signal-cfa1.runquiet >> $@ && echo -n ',' >> $@ 800 @+make signal-cfa2.runquiet >> $@ && echo -n ',' >> $@ 801 @+make waitfor-cfa1.runquiet >> $@ && echo -n ',' >> $@ 802 @+make waitfor-cfa2.runquiet >> $@ 803 @$(srcdir)/fixcsv.sh $@ 791 804 792 805 loop$(EXEEXT): -
tools/PrettyGitLogs.sh
rb10c39a0 ra3dc4cc 27 27 git rev-list --format=short ${GitOldRef}...${GitNewRef} > ${GIT_LOG} 28 28 29 git diff --stat ${GitNewRef} ${GitOldRef}> ${GIT_DIFF}29 git diff --stat --color ${GitNewRef} ${GitOldRef} | sed -e 's/\[32m/<span style\=\"color\: \#00AA00\;\">/g' -e 's/\[31m/<span style\=\"color\: \#AA0000\;\">/g' -e 's/\[m/<\/span>/g' > ${GIT_DIFF}
Note: See TracChangeset
for help on using the changeset viewer.