Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame^] | 1 | #!/usr/bin/env bash |
| 2 | set -e |
| 3 | |
| 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
| 7 | set -x |
| 8 | |
| 9 | # Cleanup |
| 10 | sudo ./waf -j1 --color=yes distclean |
| 11 | |
| 12 | if [[ "$JOB_NAME" != *"limited-build" ]]; then |
| 13 | # Configure/build in optimized mode with tests |
| 14 | ./waf -j1 --color=yes configure --with-tests |
| 15 | ./waf -j1 --color=yes build |
| 16 | |
| 17 | # Cleanup |
| 18 | sudo ./waf -j1 --color=yes distclean |
| 19 | |
| 20 | # Configure/build in optimized mode without tests |
| 21 | ./waf -j1 --color=yes configure |
| 22 | ./waf -j1 --color=yes build |
| 23 | |
| 24 | # Cleanup |
| 25 | sudo ./waf -j1 --color=yes distclean |
| 26 | fi |
| 27 | |
| 28 | # Configure/build in debug mode with tests |
| 29 | if [[ "$JOB_NAME" == *"code-coverage" ]]; then |
| 30 | COVERAGE="" # TODO add code coverage support |
| 31 | elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then |
| 32 | ASAN="--with-sanitizer=address" |
| 33 | fi |
| 34 | ./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN |
| 35 | ./waf -j1 --color=yes build |
| 36 | |
| 37 | # (tests will be run against debug version) |
| 38 | |
| 39 | # Install |
| 40 | sudo ./waf -j1 --color=yes install |