waf

FORK: waf with some random patches
git clone https://git.neptards.moe/neptards/waf.git
Log | Files | Refs | README

Jenkinsfile (12285B)


      1 
      2 pipeline {
      3     agent none
      4     stages {
      5         stage('Build and Lint') {
      6             parallel {
      7                 stage('Python 2.7') {
      8                     agent {
      9                         label "ubuntu"
     10                     }
     11                     steps {
     12                         sh 'python2.7 ./waf-light'
     13                         stash includes: 'waf', name: 'waf'
     14                     }
     15                 }
     16                 stage('Python 3.6') {
     17                     agent {
     18                         label "freebsd"
     19                     }
     20                     steps {
     21                         sh 'python3.6 ./waf-light'
     22                     }
     23                 }
     24                 stage('Deprecation warnings') {
     25                     agent {
     26                         label "ubuntu"
     27                     }
     28                     steps {
     29                         sh '''
     30 cd waflib
     31 find . -iname "*.pyc" -exec rm -f {} \\; || true
     32 ! (((PYTHONWARNINGS=all python3.6 -m compileall . > /dev/null) 2>&1 ) 2>&1) | grep -i DeprecationWarning
     33 '''
     34                     }
     35                 }
     36                 stage('Pyflakes') {
     37                     agent {
     38                         label "freebsd"
     39                     }
     40                     steps {
     41                         sh '''
     42 cd waflib
     43 var=`(/usr/local/bin/pyflakes3.py *.py Tools/*.py extras/*.py 2>&1) | egrep "undefined name|invalid syntax|inconsistent use|unindent does not match any outer indentation level" | wc -l`
     44 if [ "0" -eq "$var" ]
     45 then
     46    /usr/local/bin/pyflakes3.py *.py Tools/*.py extras/*.py || true
     47 else
     48    # just do it again and fail
     49    /usr/local/bin/pyflakes3.py *.py Tools/*.py extras/*.py
     50    exit 1
     51 fi
     52 '''
     53                     }
     54                 }
     55                 stage('Unit tests') {
     56                     agent {
     57                         label "fedora"
     58                     }
     59                     steps {
     60                         sh '''
     61 ./waf-light
     62 cd tests/preproc/
     63 ../../waf distclean
     64 ../../waf configure build
     65 cd ../..'''
     66                         sh '''
     67 cd tests/install/
     68 ../../waf distclean
     69 ../../waf configure build
     70 cd ../..'''
     71                         sh '''
     72 cd tests/general/
     73 ../../waf distclean
     74 ../../waf configure build
     75 cd ../..'''
     76                         sh '''
     77 export PATH=$PATH:$PWD
     78 cd tests/init/
     79 ../../waf distclean
     80 ../../waf configure build
     81 cd ../..'''
     82                         sh '''
     83 export WAF_TEST_GROUP=waftest
     84 cd tests/install_group/
     85 ../../waf distclean
     86 ../../waf configure build
     87 '''
     88                     }
     89                 }
     90             }
     91         }
     92         stage('Integration') {
     93             parallel {
     94                 stage('Ubuntu') {
     95                     stages {
     96                         stage('py25') {
     97                             agent {
     98                                 label "ubuntu"
     99                             }
    100                             steps {
    101                                 dir('demos') {
    102                                         unstash 'waf'
    103                                 }
    104                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=c'''
    105                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=c++'''
    106                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=java'''
    107                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=perl'''
    108                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=python'''
    109                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=qt5'''
    110                                 sh '''cd demos; LD_LIBRARY_PATH=/opt/lib ./waf distclean configure clean build --top=subst'''
    111                             }
    112                         }
    113                         stage('py36') {
    114                             agent {
    115                                 label "ubuntu"
    116                             }
    117                             steps {
    118                                 dir('demos') {
    119                                     unstash 'waf'
    120                                 }
    121                                 sh '''cd demos; python3 ./waf configure clean build --top=c'''
    122                                 sh '''cd demos; python3 ./waf configure clean build --top=c++'''
    123                                 sh '''cd demos; python3 ./waf configure clean build --top=java'''
    124                                 sh '''cd demos; python3 ./waf configure clean build --top=perl'''
    125                                 sh '''cd demos; python3 ./waf configure clean build --top=python'''
    126                                 sh '''cd demos; python3 ./waf configure clean build --top=qt5'''
    127                                 sh '''cd demos; python3 ./waf configure clean build --top=subst'''
    128                             }
    129                         }
    130                         stage('py27') {
    131                             agent {
    132                                 label "ubuntu"
    133                             }
    134                             steps {
    135                                 dir('demos') {
    136                                     unstash 'waf'
    137                                 }
    138                                 sh '''cd demos; ./waf configure clean build --top=c'''
    139                                 sh '''cd demos; ./waf configure clean build --top=c++'''
    140                                 sh '''cd demos; ./waf configure clean build --top=java'''
    141                                 sh '''cd demos; ./waf configure clean build --top=perl'''
    142                                 sh '''cd demos; ./waf configure clean build --top=python'''
    143                                 sh '''cd demos; ./waf configure clean build --top=qt5'''
    144                                 sh '''cd demos; ./waf configure clean build --top=subst'''
    145                             }
    146                         }
    147                     }
    148                 }
    149                 stage('OpenBSD') {
    150                     stages {
    151                         stage('Jython') {
    152                             agent {
    153                                 label "openbsd"
    154                             }
    155                             steps {
    156                                 sh '''
    157         export WAF_NO_PREFORK=1
    158         /home/jenkins/jython/bin/jython ./waf-light
    159         cp waf demos/c
    160         cd demos/c
    161         /home/jenkins/jython/bin/jython ./waf distclean configure clean build
    162         '''
    163                             }
    164                         }
    165                         stage('py38') {
    166                             agent {
    167                                 label "openbsd"
    168                             }
    169                             steps {
    170                                 dir('demos') {
    171                                     unstash 'waf'
    172                                 }
    173                                 sh '''cd demos/asm; python3 ../waf configure clean build'''
    174                                 sh '''cd demos/c; python3 ../waf configure clean build'''
    175                                 sh '''cd demos/c++; python3 ../waf configure clean build'''
    176                                 sh '''cd demos/glib2; python3 ../waf configure clean build'''
    177                                 sh '''cd demos/perl; python3 ../waf configure clean build'''
    178                                 sh '''cd demos/python; python3 ../waf configure clean build'''
    179                                 sh '''cd demos/subst; python3 ../waf configure clean build'''
    180                             }
    181                         }
    182                     }
    183                 }
    184                 stage('Windows') {
    185                     stages {
    186                         stage('C/py34') {
    187                             agent {
    188                                 label "windows"
    189                             }
    190                             steps {
    191                                 bat ''' C:/Python34/python.exe waf-light --tools=msvs '''
    192                                 bat '''
    193         copy waf demos\\c /Y
    194         cd demos\\c
    195         C:/Python34/python.exe waf distclean
    196         C:/Python34/python.exe waf configure --no-msvc-lazy build -v
    197         '''
    198                                 bat '''
    199         copy waf demos\\qt5 /Y
    200         cd demos\\qt5
    201         C:/Python34/python.exe waf distclean
    202         C:/Python34/python.exe waf configure --no-msvc-lazy build -v
    203         '''
    204                                 bat '''
    205         copy waf playground\\msvs /Y
    206         cd playground\\msvs
    207         C:/Python34/python.exe waf distclean
    208         C:/Python34/python.exe waf configure
    209         C:/Python34/python.exe waf msvs
    210         '''
    211                             }
    212                         }
    213                         stage('C/Msys2/py27') {
    214                             agent {
    215                                 label "windows"
    216                             }
    217                             steps {
    218                                 unstash 'waf'
    219                                 bat '''
    220         copy waf demos\\c /Y
    221         cd demos\\c
    222         set MSYSTEM=MINGW64
    223         set WD=C:\\msys64\\usr\\bin
    224         set CHERE_INVOKING=1
    225         C:\\msys64\\usr\\bin\\sh --login -c 'exec /bin/bash -c "python waf configure clean build && python waf distclean"'
    226         '''
    227                             }
    228                         }
    229                         stage('C/Msys2/py35') {
    230                             agent {
    231                                 label "windows"
    232                             }
    233                             steps {
    234                                 unstash 'waf'
    235                                 bat '''
    236         copy waf demos\\c /Y
    237         cd demos\\c
    238         set MSYSTEM=MINGW64
    239         set WD=C:\\msys64\\usr\\bin
    240         set CHERE_INVOKING=1
    241         C:\\msys64\\usr\\bin\\sh --login -c 'exec /bin/bash -c "python3 waf configure clean build && python3 waf distclean"'
    242         '''
    243                             }
    244                         }
    245                     }
    246                 }
    247                 stage('FreeBSD') {
    248                     stages {
    249                         stage('py36') {
    250                             agent {
    251                                 label "freebsd"
    252                             }
    253                             steps {
    254                                 dir('demos') {
    255                                     unstash 'waf'
    256                                 }
    257                                 sh '''cd demos/c; python3.6 ../waf distclean configure clean build'''
    258                                 sh '''cd demos/c++; python3.6 ../waf distclean configure clean build'''
    259                                 sh '''cd demos/java; python3.6 ../waf distclean configure clean build'''
    260                                 sh '''cd demos/jni; python3.6 ../waf distclean configure clean build'''
    261                                 sh '''cd demos/perl; python3.6 ../waf distclean configure clean build'''
    262                                 sh '''cd demos/python; python3.6 ../waf distclean configure clean build'''
    263                                 sh '''cd demos/ruby; python3.6 ../waf distclean configure clean build'''
    264                                 sh '''cd demos/glib2; python3.6 ../waf distclean configure clean build'''
    265                                 sh '''cd demos/qt5; python3.6 ../waf distclean configure clean build'''
    266                                 sh '''cd demos/dbus; python3.6 ../waf distclean configure clean build'''
    267                             }
    268                         }
    269                     }
    270                 }
    271                 stage('MacOS') {
    272                     stages {
    273                         stage('py27') {
    274                             agent {
    275                                 label "macos"
    276                             }
    277                             steps {
    278                                 dir('demos') {
    279                                     unstash 'waf'
    280                                 }
    281                                 sh '''cd demos/c; ../waf distclean configure clean build'''
    282                                 sh '''cd demos/python; ../waf distclean configure clean build'''
    283                                 sh '''cd demos/mac_app; ../waf distclean configure clean build'''
    284                             }
    285                         }
    286                     }
    287                 }
    288             }
    289         }
    290     }
    291 }