Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
Davide Pesavento | 525c107 | 2016-09-01 12:21:27 +0200 | [diff] [blame^] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
| 7 | |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 8 | # Cleanup |
| 9 | sudo ./waf -j1 --color=yes distclean |
| 10 | |
Junxiao Shi | 6eff4e5 | 2015-06-28 12:57:29 -0700 | [diff] [blame] | 11 | # Configure/build in release mode without tests |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 12 | ./waf -j1 --color=yes configure |
| 13 | ./waf -j1 --color=yes build |
| 14 | |
| 15 | # Cleanup |
| 16 | sudo ./waf -j1 --color=yes distclean |
| 17 | |
Junxiao Shi | 6eff4e5 | 2015-06-28 12:57:29 -0700 | [diff] [blame] | 18 | # Configure/build in debug mode with tests |
Davide Pesavento | 525c107 | 2016-09-01 12:21:27 +0200 | [diff] [blame^] | 19 | if [[ "$JOB_NAME" == *"code-coverage" ]]; then |
| 20 | COVERAGE="" # TODO add code coverage support |
| 21 | elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then |
| 22 | ASAN="--with-sanitizer=address" |
| 23 | fi |
| 24 | ./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN |
Junxiao Shi | 439d972 | 2015-03-20 15:08:44 -0700 | [diff] [blame] | 25 | ./waf -j1 --color=yes build |
Davide Pesavento | 525c107 | 2016-09-01 12:21:27 +0200 | [diff] [blame^] | 26 | |
| 27 | # (tests will be run against debug version) |