Ignore:
Timestamp:
Jul 19, 2019, 2:16:01 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
4eb43fa
Parents:
1f1c102 (diff), 8ac3b0e (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' into new-ast

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile_disabled

    r1f1c102 rf53acdf8  
    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) {
     109        //      // Build outside of the src tree to ease cleaning
     110        //      dir (BuildDir) {
     111        //              //Configure the conpilation (Output is not relevant)
     112        //              //Use the current directory as the installation target so nothing escapes the sandbox
     113        //              //Also specify the compiler by hand
     114        //              targets=""
     115        //              if( Settings.RunAllTests || Settings.RunBenchmark ) {
     116        //                      targets="--with-target-hosts='host:debug,host:nodebug'"
     117        //              } else {
     118        //                      targets="--with-target-hosts='host:debug'"
     119        //              }
     120
     121        //              sh "${SrcDir}/configure CXX=${Settings.Compiler.CXX} CC=${Settings.Compiler.CC} ${Settings.Architecture.flags} ${targets} --quiet"
     122
     123        //              //Compile the project
     124        //              sh 'make -j 8 --no-print-directory'
     125        //      }
     126        // }
     127
     128        debug = true
     129        release = Settings.RunAllTests || Settings.RunBenchmark
     130        build_stage('Build : configure', true) {
    106131                // Build outside of the src tree to ease cleaning
    107132                dir (BuildDir) {
     
    118143                        sh "${SrcDir}/configure CXX=${Settings.Compiler.CXX} CC=${Settings.Compiler.CC} ${Settings.Architecture.flags} ${targets} --quiet"
    119144
    120                         //Compile the project
    121                         sh 'make -j 8 --no-print-directory'
     145                        // Configure libcfa
     146                        sh 'make -j 8 --no-print-directory configure-libcfa'
     147                }
     148        }
     149
     150        build_stage('Build : cfa-cpp', true) {
     151                // Build outside of the src tree to ease cleaning
     152                dir (BuildDir) {
     153                        // Build driver
     154                        sh 'make -j 8 --no-print-directory -C driver'
     155
     156                        // Build translator
     157                        sh 'make -j 8 --no-print-directory -C src'
     158                }
     159        }
     160
     161        build_stage('Build : libcfa(debug)', debug) {
     162                // Build outside of the src tree to ease cleaning
     163                dir (BuildDir) {
     164                        sh "make -j 8 --no-print-directory -C libcfa/${Settings.Architecture.name}-debug"
     165                }
     166        }
     167
     168        build_stage('Build : libcfa(nodebug)', release) {
     169                // Build outside of the src tree to ease cleaning
     170                dir (BuildDir) {
     171                        sh "make -j 8 --no-print-directory -C libcfa/${Settings.Architecture.name}-nodebug"
    122172                }
    123173        }
     
    125175
    126176def test() {
    127         build_stage('Test') {
    128 
     177        build_stage('Test: short', !Settings.RunAllTests) {
    129178                dir (BuildDir) {
    130179                        //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                         }
     180                        sh 'make --no-print-directory -C tests'
     181                }
     182        }
     183
     184        build_stage('Test: full', Settings.RunAllTests) {
     185                dir (BuildDir) {
     186                        //Run the tests from the tests directory
     187                        sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=yes'
     188                        sh 'make --no-print-directory -C tests timeouts="--timeout=600 --global-timeout=14400" all-tests debug=no '
    138189                }
    139190        }
     
    141192
    142193def benchmark() {
    143         build_stage('Benchmark') {
    144 
    145                 if( !Settings.RunBenchmark ) return
    146 
     194        build_stage('Benchmark', Settings.RunBenchmark) {
    147195                dir (BuildDir) {
    148196                        //Append bench results
     
    153201
    154202def build_doc() {
    155         build_stage('Documentation') {
    156 
    157                 if( !Settings.BuildDocumentation ) return
    158 
     203        build_stage('Documentation', Settings.BuildDocumentation) {
    159204                dir ('doc/user') {
    160205                        make_doc()
     
    168213
    169214def publish() {
    170         build_stage('Publish') {
     215        build_stage('Publish', true) {
    171216
    172217                if( Settings.Publish && !Settings.RunBenchmark ) { echo 'No results to publish!!!' }
     
    412457}
    413458
    414 def build_stage(String name, Closure block ) {
     459def build_stage(String name, boolean run, Closure block ) {
    415460        StageName = name
    416461        echo " -------- ${StageName} -------- "
    417         stage(name, block)
     462        if(run) {
     463                stage(name, block)
     464        } else {
     465                stage(name) { Utils.markStageSkippedForConditional(STAGE_NAME) }
     466        }
    418467}
    419468
Note: See TracChangeset for help on using the changeset viewer.