Changeset 8e58264 for Jenkins/Distribute


Ignore:
Timestamp:
Dec 8, 2020, 1:22:47 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
dde7d6d
Parents:
3f91792
Message:

First attempt at full distribute.
Fixed some typos.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/Distribute

    r3f91792 r8e58264  
    1515        SrcDir    = pwd tmp: false
    1616        Settings  = null
     17        final Version
    1718
    1819        // Local variables
     
    2223        currentBuild.result = "SUCCESS"
    2324
    24         try {
    25                 //Wrap build to add timestamp to command line
    26                 wrap([$class: 'TimestamperBuildWrapper']) {
     25        //Wrap build to add timestamp to command line
     26        wrap([$class: 'TimestamperBuildWrapper']) {
    2727
    28                         final commit, build
    29                         (commit, build) = prepare_build()
     28                final commit, build
     29                (commit, build) = prepare_build()
    3030
    31                         node('x64') {
    32                                 BuildDir  = pwd tmp: true
    33                                 SrcDir    = pwd tmp: false
    34 
    35                                 Tools.Clean()
    36 
    37                                 Tools.Checkout( commit )
    38 
    39                                 final version = GetVersion( build )
    40                         }
    41 
    42                         // Update the build directories when exiting the node
     31                node('x64') {
    4332                        BuildDir  = pwd tmp: true
    4433                        SrcDir    = pwd tmp: false
     34
     35                        Tools.Clean()
     36
     37                        Tools.Checkout( commit )
     38
     39                        Version = GetVersion( build )
     40
     41                        Configure()
     42
     43                        Package()
     44
     45                        Test()
     46
     47                        Archive()
    4548                }
     49
     50                // Update the build directories when exiting the node
     51                BuildDir  = pwd tmp: true
     52                SrcDir    = pwd tmp: false
    4653        }
    4754
    48         //If an exception is caught we need to change the status and remember to
    49         //attach the build log to the email
    50         // catch (Exception caughtError) {
    51                 // //rethrow error later
    52                 // err = caughtError
    53 
    54                 // echo err.toString()
    55 
    56                 // //An error has occured, the build log is relevent
    57                 // log_needed = true
    58 
    59                 // //Store the result of the build log
    60                 // currentBuild.result = "${StageName} FAILURE".trim()
    61         // }
    62 
    63         finally {
    64                 // //Send email with final results if this is not a full build
    65                 // email(log_needed)
    66 
    67                 // echo 'Distribution Completed'
    68 
    69                 // /* Must re-throw exception to propagate error */
    70                 // if (err) {
    71                 //      throw err
    72                 // }
    73         }
    7455}
    7556
     
    9071
    9172        return version
     73}
     74
     75def Configure() {
     76        Tools.BuildStage('Configure', true) {
     77                // Configure must be run inside the tree
     78                dir (SrcDir) {
     79                        // Generate the necessary build files
     80                        sh './autogen.sh'
     81                }
     82
     83                // Build outside of the src tree to ease cleaning
     84                dir (BuildDir) {
     85                        // Configure the compilation (Output is not relevant)
     86                        // Use the current directory as the installation target so nothing escapes the sandbox
     87                        // Also specify the compiler by hand
     88                        sh "${SrcDir}/configure CXX=g++-9 CC=gcc-9 AR=gcc-ar RANLIB=gcc-ranlib --quiet"
     89
     90                        // Configure libcfa
     91                        sh 'make -j 8 --no-print-directory configure-libcfa'
     92                }
     93        }
     94}
     95
     96def Package() {
     97        Tools.BuildStage('Package', true) {
     98                dir (BuildDir) {
     99                        sh "make VERSION=${Version} dist"
     100                }
     101        }
     102}
     103
     104def Test() {
     105        Tools.BuildStage('Package', true) {
     106                dir (BuildDir) {
     107                        sh "make VERSION=${Version} distcheck -j 8"
     108                }
     109        }
     110}
     111
     112def Archive() {
     113        dir (BuildDir) {
     114                archiveArtifacts artifacts: "cfa-cc-*.tar.gz", fingerprint: true
     115        }
    92116}
    93117
Note: See TracChangeset for help on using the changeset viewer.