Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 4 | |
| 5 | git submodule init |
| 6 | git submodule sync |
| 7 | git submodule update |
| 8 | |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 9 | # Cleanup |
| 10 | sudo ./waf -j1 --color=yes distclean |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 11 | |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 12 | # Configure/build in debug mode |
| 13 | ./waf -j1 --color=yes configure --with-tests --debug |
| 14 | ./waf -j1 --color=yes build |
| 15 | |
| 16 | # Cleanup |
| 17 | sudo ./waf -j1 --color=yes distclean |
| 18 | |
| 19 | # Configure/build in optimized mode without tests |
| 20 | ./waf -j1 --color=yes configure |
| 21 | ./waf -j1 --color=yes build |
| 22 | |
| 23 | # Cleanup |
| 24 | sudo ./waf -j1 --color=yes distclean |
| 25 | |
Davide Pesavento | c58cc7f | 2017-08-08 16:51:28 -0500 | [diff] [blame^] | 26 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 27 | COVERAGE="--with-coverage" |
| 28 | elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then |
| 29 | ASAN="--with-sanitizer=address" |
| 30 | fi |
| 31 | |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 32 | # Configure/build in optimized mode with tests |
Davide Pesavento | c58cc7f | 2017-08-08 16:51:28 -0500 | [diff] [blame^] | 33 | ./waf -j1 --color=yes configure --with-tests $COVERAGE $ASAN |
Vince Lehman | 0a7da61 | 2014-10-29 14:39:29 -0500 | [diff] [blame] | 34 | ./waf -j1 --color=yes build |
| 35 | |
| 36 | # (tests will be run against optimized version) |
| 37 | |
Alexander Afanasyev | bc98fcf | 2014-08-16 23:18:50 -0700 | [diff] [blame] | 38 | sudo ./waf install --color=yes |