Changeset ecb4955


Ignore:
Timestamp:
Jun 8, 2016, 5:15:41 PM (8 years ago)
Author:
Aaron Moss <a3moss@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
dd40c54
Parents:
03ccadd (diff), b8f8696 (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

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r03ccadd recb4955  
    3535}
    3636
     37def push_build() {
     38        build_stage 'Push'
     39
     40                def out_dir = pwd tmp: true
     41                sh "mkdir -p ${out_dir}"
     42
     43                //parse git logs to find what changed
     44                sh "git remote > ${out_dir}/GIT_REMOTE"
     45                git_remote = readFile("${out_dir}/GIT_REMOTE")
     46                remoteDoLangExists = git_remote.contains("DoLang")
     47
     48                if( !remoteDoLangExists ) {
     49                        sh 'git remote add DoLang git@gitlab.do-lang.org:internal/cfa-cc.git'
     50                }
     51
     52                sh 'git push DoLang master'
     53}
     54
    3755//===========================================================================================================
    3856// Helper classes/variables/routines to make the status and stage name easier to use
     
    6785def collect_git_info() {
    6886
     87        //create the temporary output directory in case it doesn't already exist
    6988        def out_dir = pwd tmp: true
     89        sh "mkdir -p ${out_dir}"
     90
     91        //parse git logs to find what changed
    7092        gitRefName = env.BRANCH_NAME
    7193        dir("../${gitRefName}@script") {
     
    82104node ('master'){
    83105
     106        boolean doPromoteBuild2DoLang
    84107        def err = null
    85108        def log_needed = false
     
    96119                                collect_git_info()
    97120
     121                                properties ([                                                                   \
     122                                        [$class: 'ParametersDefinitionProperty',                                \
     123                                                parameterDefinitions: [                                         \
     124                                                [$class: 'BooleanParameterDefinition',                          \
     125                                                  defaultValue: false,                                          \
     126                                                  description: 'If true, the build will be promoted to the do-lang git repository (on successful builds only)', \
     127                                                  name: 'promoteBuild2DoLang'                           \
     128                                                ]]                                                                      \
     129                                        ]])
     130
     131                                doPromoteBuild2DoLang = promoteBuild2DoLang == 'true'
     132
     133                                echo "FULL BUILD = ${doPromoteBuild2DoLang}"
     134
    98135                                //Compile using gcc-4.9
    99136                                currentCC = new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
     
    108145                                cfa_build()
    109146
     147                                if( doPromoteBuild2DoLang ) {
     148                                        push_build()
     149                                }
    110150                        }
    111151                }
     
    127167        finally {
    128168                //Send email with final results
    129                 email(currentBuild.result, log_needed)
     169                notify_result(doPromoteBuild2DoLang, err != null, currentBuild.result, log_needed)
    130170
    131171                /* Must re-throw exception to propagate error */
     
    139179//Routine responsible of sending the email notification once the build is completed
    140180//===========================================================================================================
     181def notify_result(boolean promote, boolean success, String status, boolean log) {
     182        if(promote)     {
     183                if( !success ) {
     184                        promote_email(status)
     185                }
     186        }
     187        else {
     188                email(status, log)
     189        }
     190}
     191
     192//Email notification on a full build failure
     193def promote_email(String status) {
     194        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
     195        //Configurations for email format
     196        def email_subject = "[cforall git][PROMOTE - FAILURE]"
     197        def email_body = """This is an automated email from the Jenkins build machine. It was
     198generated because of a git hooks/post-receive script following
     199a ref change was pushed to the repository containing
     200the project "UNNAMED PROJECT".
     201
     202Check console output at ${env.BUILD_URL} to view the results.
     203
     204- Status --------------------------------------------------------------
     205
     206PROMOTE FAILURE - ${status}
     207"""
     208
     209        def email_to = "pabuhr@uwaterloo.ca, rschlunt@uwaterloo.ca, a3moss@uwaterloo.ca, tdelisle@uwaterloo.ca, brice.dobry@huawei.com"
     210
     211        //send email notification
     212        emailext body: email_body, subject: email_subject, to: email_to, attachLog: true
     213}
     214
     215//Standard build email notification
    141216def email(String status, boolean log) {
    142217        //Since tokenizer doesn't work, figure stuff out from the environnement variables and command line
     
    157232
    158233The branch ${env.BRANCH_NAME} has been updated.
    159         via  ${gitRefOldValue} (commit)
    160         from  ${gitRefNewValue} (commit)
     234  via  ${gitRefOldValue} (commit)
     235  from  ${gitRefNewValue} (commit)
    161236
    162237Check console output at ${env.BUILD_URL} to view the results.
  • src/libcfa/Makefile.am

    r03ccadd recb4955  
    1111## Created On       : Sun May 31 08:54:01 2015
    1212## Last Modified By : Peter A. Buhr
    13 ## Last Modified On : Tue Jun  7 14:38:18 2016
    14 ## Update Count     : 142
     13## Last Modified On : Wed Jun  8 14:20:34 2016
     14## Update Count     : 165
    1515###############################################################################
    1616
     
    5454
    5555headers = limits stdlib math iostream fstream iterator rational
    56 .PRECIOUS : ${headers}                                          # stop implicit '.o' rules from removing extensionless headers
     56libobjs = ${headers:=.o}
    5757
    58 #.SECONDARY : ${headers}                                        # stop implicit '.o' rules from removing extensionless headers
     58# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
     59% : %.c
     60        @true
    5961
     62${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp       # add dependency to cfa-cpp so all libraries are rebuilt with new translator
    6063
    6164libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
  • src/libcfa/Makefile.in

    r03ccadd recb4955  
    215215        ${addprefix ${libdir}/,${lib_LIBRARIES}} ${includedir}/*
    216216headers = limits stdlib math iostream fstream iterator rational
     217libobjs = ${headers:=.o}
    217218libcfa_a_SOURCES = libcfa-prelude.c ${headers:=.c}
    218219include_HEADERS = ${headers}
     
    587588libcfa-prelude.o : libcfa-prelude.c
    588589        @BACKEND_CC@ -c -o $@ $<
    589 .SECONDARY : ${headers}                                 # stop implicit '.o' rules from removing extensionless headers
     590
     591# extensionless header files are overridden by -o flag in default makerule => explicitly override default rule to silently do nothing
     592% : %.c
     593        @true
     594
     595${libobjs} : ${abs_top_srcdir}/src/driver/cfa-cpp       # add dependency to cfa-cpp so all libraries are rebuilt with new translator
    590596
    591597# Tell versions [3.59,3.63) of GNU make to not export all variables.
Note: See TracChangeset for help on using the changeset viewer.