Changeset 256728f for Jenkinsfile


Ignore:
Timestamp:
Jun 26, 2019, 5:32:42 PM (5 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
39156ed
Parents:
bd87a9ad (diff), b0ab7853 (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 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    rbd87a9ad r256728f  
    22
    33import groovy.transform.Field
     4
     5// For skipping stages
     6import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
    47
    58//===========================================================================================================
     
    8285//===========================================================================================================
    8386def clean() {
    84         build_stage('Cleanup') {
     87        build_stage('Cleanup', true) {
    8588                // clean the build by wipping the build directory
    8689                dir(BuildDir) {
     
    9295//Compilation script is done here but environnement set-up and error handling is done in main loop
    9396def checkout() {
    94         build_stage('Checkout') {
     97        build_stage('Checkout', true) {
    9598                //checkout the source code and clean the repo
    9699                final scmVars = checkout scm
     
    103106
    104107def build() {
    105         build_stage('Build') {
     108        build_stage('Build', true) {
    106109                // Build outside of the src tree to ease cleaning
    107110                dir (BuildDir) {
     
    125128
    126129def test() {
    127         build_stage('Test') {
    128 
     130        build_stage('Test: short', !Settings.RunAllTests) {
    129131                dir (BuildDir) {
    130132                        //Run the tests from the tests directory
    131                         if ( Settings.RunAllTests ) {
    132                                 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=yes'
    133                                 sh 'make --no-print-directory -C tests timeouts="--timeout=1200" all-tests debug=no '
    134                         }
    135                         else {
    136                                 sh 'make --no-print-directory -C tests'
    137                         }
     133                        sh 'make --no-print-directory -C tests'
     134                }
     135        }
     136
     137        build_stage('Test: full', Settings.RunAllTests) {
     138                dir (BuildDir) {
     139                        //Run the tests from the tests directory
     140                        sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=yes'
     141                        sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=no '
    138142                }
    139143        }
     
    141145
    142146def benchmark() {
    143         build_stage('Benchmark') {
    144 
    145                 if( !Settings.RunBenchmark ) return
    146 
     147        build_stage('Benchmark', Settings.RunBenchmark) {
    147148                dir (BuildDir) {
    148149                        //Append bench results
     
    153154
    154155def build_doc() {
    155         build_stage('Documentation') {
    156 
    157                 if( !Settings.BuildDocumentation ) return
    158 
     156        build_stage('Documentation', Settings.BuildDocumentation) {
    159157                dir ('doc/user') {
    160158                        make_doc()
     
    168166
    169167def publish() {
    170         build_stage('Publish') {
     168        build_stage('Publish', true) {
    171169
    172170                if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' }
     
    412410}
    413411
    414 def build_stage(String name, Closure block ) {
     412def build_stage(String name, boolean run, Closure block ) {
    415413        StageName = name
    416414        echo " -------- ${StageName} -------- "
    417         stage(name, block)
     415        if(run) {
     416                stage(name, block)
     417        } else {
     418                stage(name) { Utils.markStageSkippedForConditional(STAGE_NAME) }
     419        }
    418420}
    419421
Note: See TracChangeset for help on using the changeset viewer.