Davide Pesavento | 7ef57e2 | 2017-10-28 16:58:43 -0400 | [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 env "PATH=$PATH" ./waf --color=yes distclean |
| 11 | |
| 12 | if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then |
| 13 | # Configure/build in optimized mode with tests |
| 14 | ./waf --color=yes configure --with-tests |
| 15 | ./waf --color=yes build -j${WAF_JOBS:-1} |
| 16 | |
| 17 | # Cleanup |
| 18 | sudo env "PATH=$PATH" ./waf --color=yes distclean |
| 19 | |
| 20 | # Configure/build in optimized mode without tests |
| 21 | ./waf --color=yes configure |
| 22 | ./waf --color=yes build -j${WAF_JOBS:-1} |
| 23 | |
| 24 | # Cleanup |
| 25 | sudo env "PATH=$PATH" ./waf --color=yes distclean |
| 26 | fi |
| 27 | |
Alexander Afanasyev | 40491df | 2018-03-09 16:29:52 -0500 | [diff] [blame^] | 28 | # Configure/build in debug mode with tests |
Davide Pesavento | 7ef57e2 | 2017-10-28 16:58:43 -0400 | [diff] [blame] | 29 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 30 | COVERAGE="--with-coverage" |
| 31 | elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then |
| 32 | ASAN="--with-sanitizer=address" |
| 33 | fi |
Alexander Afanasyev | 40491df | 2018-03-09 16:29:52 -0500 | [diff] [blame^] | 34 | ./waf --color=yes configure --debug --with-tests $COVERAGE $ASAN |
Davide Pesavento | 7ef57e2 | 2017-10-28 16:58:43 -0400 | [diff] [blame] | 35 | ./waf --color=yes build -j${WAF_JOBS:-1} |
| 36 | |
| 37 | # (tests will be run against debug version) |
| 38 | |
| 39 | # Install |
| 40 | sudo env "PATH=$PATH" ./waf --color=yes install |
| 41 | |
| 42 | if has Linux $NODE_LABELS; then |
| 43 | sudo ldconfig |
| 44 | elif has FreeBSD $NODE_LABELS; then |
| 45 | sudo ldconfig -a |
| 46 | fi |