Changes in / [ec5d599:7c1144b]


Ignore:
Files:
4 added
8 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/Distribute

    rec5d599 r7c1144b  
    2626                wrap([$class: 'TimestamperBuildWrapper']) {
    2727
    28                         final commit, build
    29                         (commit, build) = prepare_build()
     28                        final commit = prepare_build()
    3029
    3130                        node('x64') {
     
    3635
    3736                                Tools.Checkout( commit )
    38 
    39                                 final version = GetVersion( build )
    4037                        }
    4138
     
    7774// Main compilation routines
    7875//===========================================================================================================
    79 def GetVersion(build) {
    80         final pver = sh(
    81                 returnStdout: true,
    82                 script: "sed 's/AC_INIT(\\[cfa-cc\\],\\[\\(.*\\)\\],\\[cforall@plg.uwaterloo.ca\\])/\\1/;t;d' ${SrcDir}/configure.ac"
    83         ).trim()
    8476
    85         final version = "${pver}.${build}"
    8677
    87         echo "Package Version: ${pver}"
    88         echo "Build   Version: ${build}"
    89         echo "Long    Version: ${version}"
     78//Compilation script is done here but environnement set-up and error handling is done in main loop
     79// def checkout() {
     80//      build_stage('Checkout', true) {
     81//              //checkout the source code and clean the repo
     82//              final scmVars = checkout scm
     83//              Settings.GitNewRef = scmVars.GIT_COMMIT
     84//              Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
    9085
    91         return version
    92 }
    93 
     86//              echo GitLogMessage()
     87//      }
     88// }
    9489
    9590//===========================================================================================================
     
    112107                                        defaultValue: '',                                                               \
    113108                                ],                                                                                              \
    114                                 [$class: 'StringParameterDefinition',                                           \
    115                                         description: 'Build Number to put into the version',                    \
    116                                         name: 'Build',                                                                  \
    117                                         defaultValue: '0',                                                              \
    118                                 ],                                                                                              \
    119109                        ],
    120110                ]])
     
    131121        echo "Distributing git commit ${ref}"
    132122
    133         return [params.GitRef, params.Build]
     123        return params.GitRef
    134124}
    135125
  • Jenkins/tools.groovy

    rec5d599 r7c1144b  
    3737                //checkout the source code and clean the repo
    3838                if(commitHash) {
    39                         echo "Checking out commit <${commitHash}>"
    40                         final scmVars = checkout([$class: 'GitSCM', branches: [[name: commitHash ]],
    41                                 userRemoteConfigs: [[
    42                                         url: 'cforall@plg.uwaterloo.ca:software/cfa/cfa-cc',
    43                                         credentialsId: 'git_key_aug20']]
    44                         ])
     39                        final scmVars = checkout([$class: 'GitSCM', branches: [[name: commitHash ]]])
    4540                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
    4641                } else {
     42
    4743                        final scmVars = checkout scm
    4844                        echo GitLogMessage(scmVars.GIT_COMMIT, scmVars.GIT_PREVIOUS_COMMIT)
     
    6561}
    6662
    67 PrevGitOldRef = ''
    68 PrevGitNewRef = ''
    69 def GitLogMessage(String oldRef = '', String newRef = '') {
    70         if (!oldRef) { if(!PrevGitOldRef) { return "\nERROR retrieveing current git information!\n"  } else { oldRef = PrevGitOldRef } }
    71         if (!newRef) { if(!PrevGitNewRef) { return "\nERROR retrieveing previous git information!\n" } else { newRef = PrevGitNewRef } }
    72 
     63def GitLogMessage(String oldRef, String newRef) {
    7364        def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
    7465        def revList = SplitLines( revText )
     
    9081        gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
    9182        gitDiff = gitDiff.replace('[m', '</span>')
    92 
    93         PrevGitOldRef = oldRef
    94         PrevGitNewRef = newRef
    9583
    9684        return """
  • Jenkinsfile

    rec5d599 r7c1144b  
    3030                                SrcDir    = pwd tmp: false
    3131
    32                                 Tools.Clean()
    33 
    34                                 Tools.Checkout()
     32                                clean()
     33
     34                                checkout()
    3535
    3636                                build()
     
    8181// Main compilation routines
    8282//===========================================================================================================
     83def clean() {
     84        Tools.BuildStage('Cleanup', true) {
     85                // clean the build by wipping the build directory
     86                dir(BuildDir) {
     87                        deleteDir()
     88                }
     89        }
     90}
     91
     92//Compilation script is done here but environnement set-up and error handling is done in main loop
     93def checkout() {
     94        Tools.BuildStage('Checkout', true) {
     95                //checkout the source code and clean the repo
     96                final scmVars = checkout scm
     97                Settings.GitNewRef = scmVars.GIT_COMMIT
     98                Settings.GitOldRef = scmVars.GIT_PREVIOUS_COMMIT
     99
     100                echo GitLogMessage()
     101        }
     102}
     103
    83104def build() {
    84105        debug = true
     
    215236//Routine responsible of sending the email notification once the build is completed
    216237//===========================================================================================================
     238@NonCPS
     239def SplitLines(String text) {
     240        def list = []
     241
     242        text.eachLine {
     243                list += it
     244        }
     245
     246        return list
     247}
     248
     249def GitLogMessage() {
     250        if (!Settings || !Settings.GitOldRef || !Settings.GitNewRef) return "\nERROR retrieveing git information!\n"
     251
     252        def oldRef = Settings.GitOldRef
     253        def newRef = Settings.GitNewRef
     254
     255        def revText = sh(returnStdout: true, script: "git rev-list ${oldRef}..${newRef}").trim()
     256        def revList = SplitLines( revText )
     257
     258        def gitUpdate = ""
     259        revList.each { rev ->
     260                def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
     261                gitUpdate = gitUpdate + "       via  ${rev} (${type})"
     262        }
     263
     264        def rev = oldRef
     265        def type = sh(returnStdout: true, script: "git cat-file -t ${rev}").trim()
     266        gitUpdate = gitUpdate + "      from  ${rev} (${type})"
     267
     268        def gitLog    = sh(returnStdout: true, script: "git rev-list --format=short ${oldRef}...${newRef}").trim()
     269
     270        def gitDiff   = sh(returnStdout: true, script: "git diff --stat --color ${newRef} ${oldRef}").trim()
     271        gitDiff = gitDiff.replace('[32m', '<span style="color: #00AA00;">')
     272        gitDiff = gitDiff.replace('[31m', '<span style="color: #AA0000;">')
     273        gitDiff = gitDiff.replace('[m', '</span>')
     274
     275        return """
     276<pre>
     277The branch ${env.BRANCH_NAME} has been updated.
     278${gitUpdate}
     279</pre>
     280
     281<p>Check console output at ${env.BUILD_URL} to view the results.</p>
     282
     283<p>- Status --------------------------------------------------------------</p>
     284
     285<p>BUILD# ${env.BUILD_NUMBER} - ${currentBuild.result}</p>
     286
     287<p>- Log -----------------------------------------------------------------</p>
     288
     289<pre>
     290${gitLog}
     291</pre>
     292
     293<p>-----------------------------------------------------------------------</p>
     294<pre>
     295Summary of changes:
     296${gitDiff}
     297</pre>
     298"""
     299}
     300
    217301//Standard build email notification
    218302def email(boolean log) {
     
    226310generated because of a git hooks/post-receive script following
    227311a ref change which was pushed to the C\u2200 repository.</p>
    228 """ + Tools.GitLogMessage()
     312""" + GitLogMessage()
    229313
    230314        def email_to = !Settings.IsSandbox ? "cforall@lists.uwaterloo.ca" : "tdelisle@uwaterloo.ca"
     
    336420                this.DescShort = "${ this.Compiler.name }:${ this.Architecture.name }${full}"
    337421
    338                 final ast = this.NewAST ? "New AST" : "Old AST"
    339422                this.DescLong = """Compiler              : ${ this.Compiler.name } (${ this.Compiler.CXX }/${ this.Compiler.CC })
    340 AST Version             : ${ ast.toString() }
    341423Architecture            : ${ this.Architecture.name }
    342424Arc Flags               : ${ this.Architecture.flags }
     
    391473                                        description: 'If true, build compiler using new AST',           \
    392474                                        name: 'NewAST',                                                                         \
    393                                         defaultValue: true,                                                             \
     475                                        defaultValue: false,                                                            \
    394476                                ],                                                                                              \
    395477                                [$class: 'BooleanParameterDefinition',                                                  \
     
    397479                                        name: 'RunAllTests',                                                            \
    398480                                        defaultValue: false,                                                            \
    399                                 ],                                                                                              \
     481                                ],
    400482                                [$class: 'BooleanParameterDefinition',                                                  \
    401483                                        description: 'If true, jenkins also runs benchmarks',           \
  • tests/.expect/manipulatorsOutput2.arm64.txt

    rec5d599 r7c1144b  
    11
    220b0 0b11011 0b11011 0b11011 0b11011
    3 0b11100101 0b1111111111100101 0b11111111111111111111111111100101 0b1111111111111111111111111111111111111111111111111111111111100101
     30b11100101 0b1111111111100101 0b11111111111111111111111111100101 0b11111111111111111111111111100101
    440 033 033 033 033
    5 0345 0177745 037777777745 01777777777777777777745
     50345 0177745 037777777745 037777777745
    660 0x1b 0x1b 0x1b 0x1b
    7 0xe5 0xffe5 0xffffffe5 0xffffffffffffffe5
    8 0x0p+0. 0x1.b8p+4 0x1.b8p+4 0x1.b8p+4
    9 -0x1.b8p+4 -0x1.b8p+4 -0x1.b8p+4
     70xe5 0xffe5 0xffffffe5 0xffffffe5
     80x0p+0. 0x1.b8p+4 0x1.b8p+4 0xd.cp+1
     9-0x1.b8p+4 -0x1.b8p+4 -0xd.cp+1
    10100.000000e+00 2.750000e+01 -2.750000e+01
    11110B11011 0X1B 2.75E-09 0X1.B8P+4
  • tests/meta/.expect/archVast.nast.x86.txt

    rec5d599 r7c1144b  
    77  char Alternatives are:
    88Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    9       Variable Expression: FX86: double
     9      Variable Expression: FX86: signed int
    1010      ... with resolved type:
    11         double
     11        signed int
    1212    ... to:
    1313      char
     
    3939
    4040Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    41       Variable Expression: FX86: signed int
     41      Variable Expression: FX86: double
    4242      ... with resolved type:
    43         signed int
     43        double
    4444    ... to:
    4545      char
  • tests/meta/.expect/archVast.oast.x86.txt

    rec5d599 r7c1144b  
    77  char Alternatives are:
    88Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    9       Variable Expression: FX86: double
     9      Variable Expression: FX86: function
     10        accepting unspecified arguments
     11      ... returning nothing
     12
    1013      with resolved type:
    11         double
     14        pointer to function
     15          accepting unspecified arguments
     16        ... returning nothing
     17
    1218    ... to:
    1319      char
     
    2026
    2127Cost ( 1, 0, 0, 0, 0, 0, 0 ): Explicit Cast of:
    22       Variable Expression: FX86: function
    23         accepting unspecified arguments
    24       ... returning nothing
    25 
     28      Variable Expression: FX86: double
    2629      with resolved type:
    27         pointer to function
    28           accepting unspecified arguments
    29         ... returning nothing
    30 
     30        double
    3131    ... to:
    3232      char
Note: See TracChangeset for help on using the changeset viewer.