Changeset 0dc3ac3


Ignore:
Timestamp:
Jul 30, 2018, 1:48:17 PM (6 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, no_list, persistent-indexer, pthread-emulation, qualifiedEnum
Children:
73787a9
Parents:
a4248de1
Message:

Modified jenkins to use the temporary workspace as the build directory

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Jenkinsfile

    ra4248de1 r0dc3ac3  
    3232                        prepare_build()
    3333
     34                        clean()
     35
    3436                        checkout()
    3537
     
    4143
    4244                        benchmark()
    43 
    44                         clean()
    4545
    4646                        build_doc()
     
    241241// Main compilation routines
    242242//===========================================================================================================
     243def clean() {
     244        build_stage('Cleanup') {
     245                // clean the build by wipping the build directory
     246                sh "rm -rf ${builddir}/*"
     247
     248                //Clean all temporary files to make sure no artifacts of the previous build remain
     249                sh 'git clean -fdqx'
     250
     251                //Reset the git repo so no local changes persist
     252                sh 'git reset --hard'
     253        }
     254}
     255
    243256//Compilation script is done here but environnement set-up and error handling is done in main loop
    244257def checkout() {
     
    246259                //checkout the source code and clean the repo
    247260                checkout scm
    248 
    249                 //Clean all temporary files to make sure no artifacts of the previous build remain
    250                 sh 'git clean -fdqx'
    251 
    252                 //Reset the git repo so no local changes persist
    253                 sh 'git reset --hard'
    254261        }
    255262}
     
    258265        build_stage('Build') {
    259266
    260                 def install_dir = pwd tmp: true
     267                builddir = pwd tmp: true
     268                srcdir   = pwd tmp: false
    261269
    262270                // Build outside of the src tree to ease cleaning
    263                 sh "mkdir -p build"
    264                 dir ('build') {
     271                dir (builddir) {
    265272                        //Configure the conpilation (Output is not relevant)
    266273                        //Use the current directory as the installation target so nothing escapes the sandbox
    267274                        //Also specify the compiler by hand
    268                         sh "../configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --prefix=${install_dir} --enable-silent-rules --quiet"
     275                        sh "${srcdir}/configure CXX=${compiler.cpp_cc} ${architecture} --with-backend-compiler=${compiler.cfa_cc} --enable-silent-rules --quiet"
    269276
    270277                        //Compile the project
     
    277284        build_stage('Test') {
    278285
    279                 //Run the tests from the tests directory
    280                 if ( do_alltests ) {
    281                         sh 'make -C build/src/tests all-tests debug=yes --no-print-directory'
    282                         sh 'make -C build/src/tests all-tests debug=no --no-print-directory'
    283                 }
    284                 else {
    285                         sh 'make -C build/src/tests --no-print-directory'
     286                dir (builddir) {
     287                        //Run the tests from the tests directory
     288                        if ( do_alltests ) {
     289                                sh 'make --no-print-directory -C src/tests all-tests debug=yes'
     290                                sh 'make --no-print-directory -C src/tests all-tests debug=no '
     291                        }
     292                        else {
     293                                sh 'make --no-print-directory -C src/tests'
     294                        }
    286295                }
    287296        }
     
    293302                if( !do_benchmark ) return
    294303
    295                 //Append bench results
    296                 sh 'make -C build/src/benchmark --no-print-directory jenkins githash=' + gitRefNewValue + ' arch=' + arch_name + ' | tee bench.json'
    297         }
    298 }
    299 
    300 def clean() {
    301         build_stage('Cleanup') {
    302                 // clean the build by wipping the build directory
    303                 sh 'rm -rf build'
     304                dir (builddir) {
     305                        //Append bench results
     306                        sh "make --no-print-directory -C src/benchmark jenkins githash=${gitRefNewValue} arch=${arch_name} | tee ${srcdir}/bench.json"
     307                }
    304308        }
    305309}
  • src/tests/Makefile.in

    ra4248de1 r0dc3ac3  
    311311
    312312# SKULLDUGGERY like libcfa/Makefile.am prevent extensionless headers from being generated
    313 # however, here it is more complicated because it must match the dependencies exactly
    314 # depencies seem to have the absolute path to the build directory and relative path
    315 # to the headers from there
     313# however, here it is more complicated because it must match the dependencies based on how
     314# they are generated by gcc
    316315headers = $(shell find $(top_srcdir)/src/libcfa -type f ! -name "*.*")
    317316headers_real = $(shell realpath --relative-to=$(top_srcdir)/src/libcfa $(headers))
Note: See TracChangeset for help on using the changeset viewer.