Changes in / [298581c:c10ee66]


Ignore:
Files:
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • Jenkins/FullBuild

    r298581c rc10ee66  
    99
    1010        try {
    11                 //Wrap build to add timestamp to command line
    12                 wrap([$class: 'TimestamperBuildWrapper']) {
     11                //Prevent the build from exceeding 30 minutes
     12                timeout(60) {
    1313
    14                         stage('Build') {
     14                        //Wrap build to add timestamp to command line
     15                        wrap([$class: 'TimestamperBuildWrapper']) {
    1516
    16                                 results = [null, null]
     17                                stage 'Build'
    1718
    18                                 parallel (
    19                                         gcc_6_x64: { trigger_build( 'gcc-6',   'x64', true  ) },
    20                                         gcc_6_x86: { trigger_build( 'gcc-6',   'x86', true  ) },
    21                                         gcc_5_x64: { trigger_build( 'gcc-5',   'x64', false ) },
    22                                         gcc_5_x86: { trigger_build( 'gcc-5',   'x86', false ) },
    23                                         gcc_4_x64: { trigger_build( 'gcc-4.9', 'x64', false ) },
    24                                         gcc_4_x86: { trigger_build( 'gcc-4.9', 'x86', false ) },
    25                                         clang_x64: { trigger_build( 'clang',   'x64', false ) },
    26                                         clang_x86: { trigger_build( 'clang',   'x86', false ) },
    27                                 )
     19                                        results = [null, null]
     20
     21                                        parallel (
     22                                                gcc_6_x64: { trigger_build( 'gcc-6',   'x64', true  ) },
     23                                                gcc_6_x86: { trigger_build( 'gcc-6',   'x86', true  ) },
     24                                                gcc_5_x64: { trigger_build( 'gcc-5',   'x64', false ) },
     25                                                gcc_5_x86: { trigger_build( 'gcc-5',   'x86', false ) },
     26                                                gcc_4_x64: { trigger_build( 'gcc-4.9', 'x64', false ) },
     27                                                gcc_4_x86: { trigger_build( 'gcc-4.9', 'x86', false ) },
     28                                                clang_x64: { trigger_build( 'clang',   'x64', false ) },
     29                                                clang_x86: { trigger_build( 'clang',   'x86', false ) },
     30                                        )
     31
     32                                //Push latest changes to do-lang repo
     33                                push_build()
    2834                        }
    29 
    30                         //Push latest changes to do-lang repo
    31                         push_build()
    3235                }
    3336        }
     
    9699def push_build() {
    97100        //Don't use the build_stage function which outputs the compiler
    98         stage('Push') {
     101        stage 'Push'
    99102
    100103                status_prefix = 'Push'
     
    119122                //sh "GIT_SSH_COMMAND=\"ssh -v\" git push DoLang ${gitRefNewValue}:master"
    120123                echo('BUILD NOT PUSH SINCE DO-LANG SERVER WAS DOWN')
    121         }
    122124}
    123125
  • Jenkinsfile

    r298581c rc10ee66  
    2828                wrap([$class: 'TimestamperBuildWrapper']) {
    2929
    30                         notify_server()
    31 
    32                         prepare_build()
    33 
    34                         checkout()
    35 
    36                         build()
    37 
    38                         test()
    39 
    40                         benchmark()
    41 
    42                         clean()
    43 
    44                         build_doc()
    45 
    46                         publish()
    47 
    48                         notify_server()
     30                        //Prevent the build from exceeding 60 minutes
     31                        timeout(60) {
     32
     33                                notify_server()
     34
     35                                prepare_build()
     36
     37                                checkout()
     38
     39                                build()
     40
     41                                test()
     42
     43                                benchmark()
     44
     45                                clean()
     46
     47                                build_doc()
     48
     49                                publish()
     50
     51                                notify_server()
     52                        }
    4953                }
    5054        }
     
    8589def collect_git_info() {
    8690
    87         checkout scm
    88 
    8991        //create the temporary output directory in case it doesn't already exist
    9092        def out_dir = pwd tmp: true
     
    9395        //parse git logs to find what changed
    9496        gitRefName = env.BRANCH_NAME
    95         sh "git reflog > ${out_dir}/GIT_COMMIT"
     97        dir("../${gitRefName}@script") {
     98                sh "git reflog > ${out_dir}/GIT_COMMIT"
     99        }
    96100        git_reflog = readFile("${out_dir}/GIT_COMMIT")
    97101        gitRefOldValue = (git_reflog =~ /moving from (.+) to (.+)/)[0][1]
     
    166170}
    167171
    168 def build_stage(String name, Closure block ) {
     172def build_stage(String name) {
    169173        stage_name = name
    170         stage(name, block)
     174        stage name
    171175}
    172176
     
    241245//Compilation script is done here but environnement set-up and error handling is done in main loop
    242246def checkout() {
    243         build_stage('Checkout') {
     247        build_stage'Checkout'
    244248                //checkout the source code and clean the repo
    245249                checkout scm
     
    250254                //Reset the git repo so no local changes persist
    251255                sh 'git reset --hard'
    252         }
    253256}
    254257
    255258def build() {
    256         build_stage('Build') {
     259        build_stage'Build'
    257260       
    258261                def install_dir = pwd tmp: true
     
    266269                //Compile the project
    267270                sh 'make -j 8 --no-print-directory V=0 install'
    268         }
    269271}
    270272
    271273def test() {
    272         build_stage('Test') {
     274        build_stage'Test'
    273275
    274276                //Run the tests from the tests directory
     
    280282                        sh 'make -C src/tests'
    281283                }
    282         }
    283284}
    284285
    285286def benchmark() {
    286         build_stage('Benchmark') {
     287        build_stage'Benchmark'
    287288
    288289                if( !do_benchmark ) return
     
    293294                //Append bench results
    294295                sh 'make -C src/benchmark --no-print-directory csv-data >> bench.csv'
    295         }
    296296}
    297297
    298298def clean() {
    299         build_stage('Cleanup') {
     299        build_stage'Cleanup'
    300300
    301301                //do a maintainer-clean to make sure we need to remake from scratch
    302302                sh 'make maintainer-clean > /dev/null'
    303         }
    304303}
    305304
    306305def build_doc() {
    307         build_stage('Documentation') {
     306        build_stage'Documentation'
    308307
    309308                if( !do_doc ) return
     
    316315                        make_doc()
    317316                }
    318         }
    319317}
    320318
    321319def publish() {
    322         build_stage('Publish') {
     320        build_stage'Publish'
    323321
    324322                if( !do_publish ) return
     
    326324                //Then publish the results
    327325                sh 'curl --silent --data @bench.csv http://plg2:8082/jenkins/publish > /dev/null || true'
    328         }
    329326}
    330327
  • src/Common/utility.h

    r298581c rc10ee66  
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    11 // Last Modified By : Andrew Beach
    12 // Last Modified On : Fri May 5 11:03:00 2017
    13 // Update Count     : 32
     11// Last Modified By : Peter A. Buhr
     12// Last Modified On : Wed Dec 14 21:25:25 2016
     13// Update Count     : 31
    1414//
    1515
     
    322322        std::string filename;
    323323
    324     /// Create a new unset CodeLocation.
    325         CodeLocation()
     324        CodeLocation()
    326325                : linenumber( -1 )
    327326                , filename("")
    328327        {}
    329328
    330     /// Create a new CodeLocation with the given values.
    331329        CodeLocation( const char* filename, int lineno )
    332330                : linenumber( lineno )
    333331                , filename(filename ? filename : "")
    334332        {}
    335 
    336     bool isSet () const {
    337         return -1 != linenumber;
    338     }
    339 
    340     bool isUnset () const {
    341         return !isSet();
    342     }
    343 
    344         void unset () {
    345                 linenumber = -1;
    346                 filename = "";
    347         }
    348 
    349         // Use field access for set.
    350333};
    351334
    352335inline std::string to_string( const CodeLocation& location ) {
    353         return location.isSet() ? location.filename + ":" + std::to_string(location.linenumber) + " " : "";
     336        return location.linenumber >= 0 ? location.filename + ":" + std::to_string(location.linenumber) + " " : "";
    354337}
    355338#endif // _UTILITY_H
  • src/benchmark/csv-data.c

    r298581c rc10ee66  
    100100}
    101101
    102 //-----------------------------------------------------------------------------
    103 // single internal sched entry
    104 mon_t mon1;
    105 
    106 condition cond1a;
    107 condition cond1b;
    108 
    109 thread thrd1a { long long int * out; };
    110 thread thrd1b {};
    111 
    112 void ?{}( thrd1a * this, long long int * out ) {
    113         this->out = out;
    114 }
    115 
    116 void side1A( mon_t * mutex a, long long int * out ) {
    117         long long int StartTime, EndTime;
    118 
    119         StartTime = Time();
    120         for( int i = 0;; i++ ) {
    121                 signal(&cond1a);
    122                 if( i > N ) break;
    123                 wait(&cond1b);
    124         }
    125         EndTime = Time();
    126 
    127         *out = ( EndTime - StartTime ) / N;
    128 }
    129 
    130 void side1B( mon_t * mutex a ) {
    131         for( int i = 0;; i++ ) {
    132                 signal(&cond1b);
    133                 if( i > N ) break;
    134                 wait(&cond1a);
    135         }
    136 }
    137 
    138 void main( thrd1a * this ) { side1A( &mon1, this->out ); }
    139 void main( thrd1b * this ) { side1B( &mon1 ); }
    140 
    141 long long int measure_1_sched_int() {
    142         long long int t;
    143         {
    144                 thrd1a a = { &t };
    145                 thrd1b b;
    146         }
    147         return t;
    148 }
    149 
    150 //-----------------------------------------------------------------------------
    151 // multi internal sched entry
    152 mon_t mon2;
    153 
    154 condition cond2a;
    155 condition cond2b;
    156 
    157 thread thrd2a { long long int * out; };
    158 thread thrd2b {};
    159 
    160 void ?{}( thrd2a * this, long long int * out ) {
    161         this->out = out;
    162 }
    163 
    164 void side2A( mon_t * mutex a, mon_t * mutex b, long long int * out ) {
    165         long long int StartTime, EndTime;
    166 
    167         StartTime = Time();
    168         for( int i = 0;; i++ ) {
    169                 signal(&cond2a);
    170                 if( i > N ) break;
    171                 wait(&cond2b);
    172         }
    173         EndTime = Time();
    174 
    175         *out = ( EndTime - StartTime ) / N;
    176 }
    177 
    178 void side2B( mon_t * mutex a, mon_t * mutex b ) {
    179         for( int i = 0;; i++ ) {
    180                 signal(&cond2b);
    181                 if( i > N ) break;
    182                 wait(&cond2a);
    183         }
    184 }
    185 
    186 void main( thrd2a * this ) { side2A( &mon1, &mon2, this->out ); }
    187 void main( thrd2b * this ) { side2B( &mon1, &mon2 ); }
    188 
    189 long long int measure_2_sched_int() {
    190         long long int t;
    191         {
    192                 thrd2a a = { &t };
    193                 thrd2b b;
    194         }
    195         return t;
    196 }
    197 
    198 //-----------------------------------------------------------------------------
    199 // main loop
    200102int main()
    201103{
     
    204106        sout | measure_thread() | ',';
    205107        sout | measure_1_monitor_entry() | ',';
    206         sout | measure_2_monitor_entry() | ',';
    207         sout | measure_1_sched_int() | ',';
    208         sout | measure_2_sched_int() | endl;
     108        sout | measure_2_monitor_entry() | endl;
    209109}
Note: See TracChangeset for help on using the changeset viewer.