Changes in / [82c6072:ad486c5b]


Ignore:
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r82c6072 rad486c5b  
    8787
    8888        if(result.result != 'SUCCESS') {
    89                 sh("wget -q -O - http://localhost:8084/job/Cforall/job/master/${result.number}/consoleText")
     89                sh("wget -q -O - ${result.absoluteUrl}/consoleText")
    9090                error(result.result)
    9191        }
  • Jenkinsfile

    r82c6072 rad486c5b  
    2222        do_sendemail    = true
    2323
    24         builddir = pwd tmp: true
    25         srcdir   = pwd tmp: false
    26 
    2724        currentBuild.result = "SUCCESS"
    2825
     
    3532                        prepare_build()
    3633
     34                        checkout()
     35
     36                        notify_server(0)
     37
     38                        build()
     39
     40                        test()
     41
     42                        benchmark()
     43
    3744                        clean()
    38 
    39                         checkout()
    40 
    41                         notify_server(0)
    42 
    43                         build()
    44 
    45                         test()
    46 
    47                         benchmark()
    4845
    4946                        build_doc()
     
    7067        finally {
    7168                //Send email with final results if this is not a full build
    72                 if( do_sendemail ) {
     69                if( do_sendemail && !bIsSandbox ) {
    7370                        echo 'Notifying users of result'
    74                         email(currentBuild.result, log_needed, bIsSandbox)
     71                        email(currentBuild.result, log_needed)
    7572                }
    7673
     
    158155        do_sendemail    = ! (pSilent == 'true')
    159156
    160         collect_git_info()
    161 
    162         def full = do_alltests ? " (Full)" : ""
    163         currentBuild.description = "Cforall ${gitRefName} ${compiler.cc_name}:${arch_name}${full}"
    164 
    165157        echo """Compiler              : ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc})
    166158Architecture            : ${arch_name}
     
    172164Silent                  : ${ pSilent.toString() }
    173165"""
     166
     167        collect_git_info()
    174168}
    175169
     
    247241// Main compilation routines
    248242//===========================================================================================================
    249 def clean() {
    250         build_stage('Cleanup') {
    251                 // clean the build by wipping the build directory
    252                 dir(builddir) {
    253                         deleteDir()
    254                 }
    255 
    256                 //Clean all temporary files to make sure no artifacts of the previous build remain
    257                 sh 'git clean -fdqx'
    258 
    259                 //Reset the git repo so no local changes persist
    260                 sh 'git reset --hard'
    261         }
    262 }
    263 
    264243//Compilation script is done here but environnement set-up and error handling is done in main loop
    265244def checkout() {
     
    267246                //checkout the source code and clean the repo
    268247                checkout scm
     248
     249                //Clean all temporary files to make sure no artifacts of the previous build remain
     250                sh 'git clean -fdqx'
     251
     252                //Reset the git repo so no local changes persist
     253                sh 'git reset --hard'
    269254        }
    270255}
     
    272257def build() {
    273258        build_stage('Build') {
     259
     260                def install_dir = pwd tmp: true
     261
    274262                // Build outside of the src tree to ease cleaning
    275                 dir (builddir) {
     263                sh "mkdir -p build"
     264                dir ('build') {
    276265                        //Configure the conpilation (Output is not relevant)
    277266                        //Use the current directory as the installation target so nothing escapes the sandbox
    278267                        //Also specify the compiler by hand
    279                         sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet"
     268                        sh "../configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet"
    280269
    281270                        //Compile the project
     
    288277        build_stage('Test') {
    289278
    290                 dir (builddir) {
    291                         //Run the tests from the tests directory
    292                         if ( do_alltests ) {
    293                                 sh 'make --no-print-directory -C src/tests all-tests debug=yes'
    294                                 sh 'make --no-print-directory -C src/tests all-tests debug=no '
    295                         }
    296                         else {
    297                                 sh 'make --no-print-directory -C src/tests'
    298                         }
     279                //Run the tests from the tests directory
     280                if ( do_alltests ) {
     281                        sh 'make -C build/src/tests all-tests debug=yes --no-print-directory'
     282                        sh 'make -C build/src/tests all-tests debug=no --no-print-directory'
     283                }
     284                else {
     285                        sh 'make -C build/src/tests --no-print-directory'
    299286                }
    300287        }
     
    306293                if( !do_benchmark ) return
    307294
    308                 dir (builddir) {
    309                         //Append bench results
    310                         sh "make --no-print-directory -C src/benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json"
    311                 }
     295                //Append bench results
     296                sh 'make -C build/src/benchmark --no-print-directory jenkins githash=' + gitRefNewValue + ' arch=' + arch_name + ' | tee bench.json'
     297        }
     298}
     299
     300def clean() {
     301        build_stage('Cleanup') {
     302                // clean the build by wipping the build directory
     303                sh 'rm -rf build'
    312304        }
    313305}
     
    342334//===========================================================================================================
    343335//Standard build email notification
    344 def email(String status, boolean log, boolean bIsSandbox) {
     336def email(String status, boolean log) {
    345337        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    346338        //Configurations for email format
     
    385377        def email_to = "cforall@lists.uwaterloo.ca"
    386378
    387         if( !bIsSandbox ) {
    388                 //send email notification
    389                 emailext body: email_body, subject: email_subject, to: email_to, attachLog: log
    390         } else {
    391                 echo "Would send email to: ${email_to}"
    392                 echo "With title: ${email_subject}"
    393                 echo "Content: \n${email_body}"
    394         }
    395 }
     379        //send email notification
     380        emailext body: email_body, subject: email_subject, to: email_to, attachLog: log
     381}
  • src/tests/pybin/tools.py

    r82c6072 rad486c5b  
    4848                return False
    4949
    50         return match.group(1).startswith("ASCII text")
     50        return match.group(1) == "ASCII text"
    5151
    5252# Remove 1 or more files silently
Note: See TracChangeset for help on using the changeset viewer.