Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Shock Jiang | 2d8483c | 2014-10-30 10:15:37 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 4 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame^] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 7 | |
| 8 | # Cleanup |
| 9 | sudo ./waf -j1 --color=yes distclean |
| 10 | |
| 11 | # Configure/build in debug mode |
| 12 | ./waf -j1 --color=yes configure --with-tests --debug |
| 13 | ./waf -j1 --color=yes build |
| 14 | |
| 15 | # Cleanup |
| 16 | sudo ./waf -j1 --color=yes distclean |
| 17 | |
| 18 | # Configure/build in optimized mode without tests |
| 19 | ./waf -j1 --color=yes configure |
| 20 | ./waf -j1 --color=yes build |
| 21 | |
| 22 | # Cleanup |
| 23 | sudo ./waf -j1 --color=yes distclean |
| 24 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame^] | 25 | # Configure/build in debug mode |
| 26 | if [[ "$JOB_NAME" == *"code-coverage" ]]; then |
| 27 | COVERAGE="--with-coverage" |
| 28 | fi |
| 29 | ./waf -j1 --color=yes configure --debug --with-tests $COVERAGE |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 30 | ./waf -j1 --color=yes build |
| 31 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame^] | 32 | # (tests will be run against debug version) |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 33 | |
| 34 | # Install |
| 35 | sudo ./waf -j1 --color=yes install |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame^] | 36 | |
| 37 | if has Linux $NODE_LABELS; then |
| 38 | sudo ldconfig |
| 39 | elif has FreeBSD $NODE_LABELS; then |
| 40 | sudo ldconfig -a |
| 41 | fi |