Changeset bd34bcf5 for Jenkinsfile


Ignore:
Timestamp:
Feb 22, 2017, 2:47:09 PM (7 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
6802a5f
Parents:
95fdb0a
Message:

Added proper switches for architecture and compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    r95fdb0a rbd34bcf5  
    1010        def log_needed = false
    1111
    12         compiler                = compiler_from_params()
    13         architecture    = architecture_from_params()
     12        compiler                = null
     13        architecture    = ''
    1414       
    15         do_alltests             = param_allTests        .toBoolean()
    16         do_benchmark    = param_benchmark .toBoolean()
    17         do_doc          = param_doc     .toBoolean()
    18         do_publish
     15        do_alltests             = false
     16        do_benchmark    = false
     17        do_doc          = false
     18        do_publish              = false
    1919
    2020        currentBuild.result = "SUCCESS"
     
    8282// Helper classes/variables/routines
    8383//===========================================================================================================
    84 //Description of a compiler (Must be serializable since pipelines are persistent)
    85 class CC_Desc implements Serializable {
    86         public String cc_name
    87         public String cpp_cc
    88         public String cfa_backend_cc
    89 
    90         CC_Desc(String cc_name, String cpp_cc, String cfa_backend_cc) {
    91                 this.cc_name = cc_name
    92                 this.cpp_cc = cpp_cc
    93                 this.cfa_backend_cc = cfa_backend_cc
    94         }
    95 }
    96 
    9784//Helper routine to collect information about the git history
    9885def collect_git_info() {
     
    151138                ]])
    152139
    153         compiler                = compiler_from_params()
    154         architecture    = architecture_from_params()
     140        compiler                = compiler_from_params( param_compiler )
     141        architecture    = architecture_from_params( param_arch )
    155142
    156143        do_alltests             = param_allTests        .toBoolean()
     
    178165        finally {
    179166                if (err) throw err // Must re-throw exception to propagate error
     167        }
     168}
     169
     170//Description of a compiler (Must be serializable since pipelines are persistent)
     171class CC_Desc implements Serializable {
     172        public String cc_name
     173        public String cpp_cc
     174        public String cfa_backend_cc
     175
     176        CC_Desc(String cc_name, String cpp_cc, String cfa_backend_cc) {
     177                this.cc_name = cc_name
     178                this.cpp_cc = cpp_cc
     179                this.cfa_backend_cc = cfa_backend_cc
     180        }
     181}
     182
     183def compiler_from_params(cc) {
     184        switch( cc ) {
     185                case 'gcc-6':
     186                        return new CC_Desc('gcc-6', 'g++-6', 'gcc-6')
     187                break
     188                case 'gcc-5':
     189                        return new CC_Desc('gcc-5', 'g++-5', 'gcc-5')
     190                break
     191                case 'gcc-4.9':
     192                        return new CC_Desc('gcc-4.9', 'g++-4.9', 'gcc-4.9')
     193                break
     194                case 'clang':
     195                        return new CC_Desc('gcc-6', 'clang', 'gcc-6')
     196                break
     197                default
     198                        error 'Unhandled compiler'
     199        }
     200}
     201
     202def architecture_from_params( arch ) {
     203        switch( arch ) {
     204                case '64-bit':
     205                        return '--host=x86_64 CXXFLAGS="-m64" CFAFLAGS="-m64"'
     206                break
     207                case '32-bit':
     208                        return '--host=i386   CXXFLAGS="-m32" CFAFLAGS="-m32"'
     209                break
     210                default
     211                        error 'Unhandled architecture'
    180212        }
    181213}
Note: See TracChangeset for help on using the changeset viewer.