Changeset 992c26d


Ignore:
Timestamp:
Jun 3, 2016, 11:07:36 AM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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:
29f4fe62
Parents:
a3e7d34
Message:

added support for specifiying compilers to use in jenkins file

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    ra3e7d34 r992c26d  
    22def build() {
    33        build_stage 'Checkout'
    4 
     4                def install_dir = pwd tmp: true
    55                //checkout the source code and clean the repo
    6                 sh 'rm -rf *'
     6                sh "rm -rf * ${install_dir}/*"
    77                checkout scm
    88
     
    1313                //escapes the sandbox
    1414                //Also specify the compiler by hand
    15                 def install_dir = pwd tmp: true
    16                 sh "CC=gcc-4.9 CXX=g++-4.9 ./configure --prefix=${install_dir} > /dev/null"
     15                sh "./configure CXX=${currentCC.cpp-cc} --with-backend-compiler=${currentCC.cfa-backend-cc} --prefix=${install_dir} > /dev/null"
    1716
    1817                //Compile the project
     
    3231}
    3332
    34 def Compiler
     33class CC_Desc {
     34        String name
     35        String cpp-cc
     36        String cfa-backend-cc
     37}
     38
     39def currentCC
    3540
    3641def build_stage(String name) {
    37         def stage_name = "${Compiler} ${name}"
     42        def stage_name = "${currentCC.name} ${name}".trim()
    3843        stage stage_name
    3944
     
    4954
    5055        try {
    51                 Compiler = 'gcc-4.9'
     56                currentCC = ['gcc-4.9', 'g++-4.9', 'gcc-4.9'] as CC_Desc
    5257                build()
    5358
     
    5762                err = caughtError
    5863                log_needed = true
    59                 currentBuild.result = "${status_prefix} FAILURE"
     64                currentBuild.result = "${status_prefix} FAILURE".trim()
    6065        }
    6166
     
    7681        def project_name = (env.JOB_NAME =~ /(.+)\/.+/)[0][1].toLowerCase()
    7782
    78         def email_subject = "[${project_name} git][BUILD - ${status}!]Build # ${env.BUILD_NUMBER} - ${env.BRANCH_NAME}"
     83        def email_subject = "[${project_name} git][BUILD# ${env.BUILD_NUMBER} - ${status}] - branch ${env.BRANCH_NAME}"
    7984        def email_body = """This is an automated email from the Jenkins build machine. It was
    8085generated because of a git hooks/post-receive script following
Note: See TracChangeset for help on using the changeset viewer.