Changeset 82c6072


Ignore:
Timestamp:
Jul 31, 2018, 3:46:27 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
5f08ac2f
Parents:
ad486c5b (diff), 843002c9 (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.
Message:

Merge branch 'jenkins-sandbox'

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

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

    rad486c5b r82c6072  
    2222        do_sendemail    = true
    2323
     24        builddir = pwd tmp: true
     25        srcdir   = pwd tmp: false
     26
    2427        currentBuild.result = "SUCCESS"
    2528
     
    3235                        prepare_build()
    3336
     37                        clean()
     38
    3439                        checkout()
    3540
     
    4146
    4247                        benchmark()
    43 
    44                         clean()
    4548
    4649                        build_doc()
     
    6770        finally {
    6871                //Send email with final results if this is not a full build
    69                 if( do_sendemail && !bIsSandbox ) {
     72                if( do_sendemail ) {
    7073                        echo 'Notifying users of result'
    71                         email(currentBuild.result, log_needed)
     74                        email(currentBuild.result, log_needed, bIsSandbox)
    7275                }
    7376
     
    155158        do_sendemail    = ! (pSilent == 'true')
    156159
     160        collect_git_info()
     161
     162        def full = do_alltests ? " (Full)" : ""
     163        currentBuild.description = "Cforall ${gitRefName} ${compiler.cc_name}:${arch_name}${full}"
     164
    157165        echo """Compiler              : ${compiler.cc_name} (${compiler.cpp_cc}/${compiler.cfa_cc})
    158166Architecture            : ${arch_name}
     
    164172Silent                  : ${ pSilent.toString() }
    165173"""
    166 
    167         collect_git_info()
    168174}
    169175
     
    241247// Main compilation routines
    242248//===========================================================================================================
     249def 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
    243264//Compilation script is done here but environnement set-up and error handling is done in main loop
    244265def checkout() {
     
    246267                //checkout the source code and clean the repo
    247268                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'
    254269        }
    255270}
     
    257272def build() {
    258273        build_stage('Build') {
    259 
    260                 def install_dir = pwd tmp: true
    261 
    262274                // Build outside of the src tree to ease cleaning
    263                 sh "mkdir -p build"
    264                 dir ('build') {
     275                dir (builddir) {
    265276                        //Configure the conpilation (Output is not relevant)
    266277                        //Use the current directory as the installation target so nothing escapes the sandbox
    267278                        //Also specify the compiler by hand
    268                         sh "../configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet"
     279                        sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet"
    269280
    270281                        //Compile the project
     
    277288        build_stage('Test') {
    278289
    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'
     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                        }
    286299                }
    287300        }
     
    293306                if( !do_benchmark ) return
    294307
    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 
    300 def clean() {
    301         build_stage('Cleanup') {
    302                 // clean the build by wipping the build directory
    303                 sh 'rm -rf build'
     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                }
    304312        }
    305313}
     
    334342//===========================================================================================================
    335343//Standard build email notification
    336 def email(String status, boolean log) {
     344def email(String status, boolean log, boolean bIsSandbox) {
    337345        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
    338346        //Configurations for email format
     
    377385        def email_to = "cforall@lists.uwaterloo.ca"
    378386
    379         //send email notification
    380         emailext body: email_body, subject: email_subject, to: email_to, attachLog: log
    381 }
     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}
  • src/tests/pybin/tools.py

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