Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 2 | set -e |
| 3 | |
Davide Pesavento | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 4 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 5 | source "$JDIR"/util.sh |
| 6 | |
| 7 | set -x |
| 8 | |
Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 9 | git submodule init |
| 10 | git submodule sync |
| 11 | git submodule update |
| 12 | |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 13 | # Cleanup |
| 14 | sudo ./waf -j1 --color=yes distclean |
Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 15 | |
Eric Newberry | 81a9a86 | 2016-12-27 22:59:27 -0700 | [diff] [blame] | 16 | if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then |
Davide Pesavento | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 17 | # Configure/build in optimized mode with tests |
Alexander Afanasyev | 6602b3b | 2016-03-15 14:14:11 -0700 | [diff] [blame] | 18 | ./waf -j1 --color=yes configure --with-tests |
| 19 | ./waf -j1 --color=yes build |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 20 | |
Alexander Afanasyev | 6602b3b | 2016-03-15 14:14:11 -0700 | [diff] [blame] | 21 | # Cleanup |
| 22 | sudo ./waf -j1 --color=yes distclean |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 23 | |
Davide Pesavento | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 24 | # Configure/build in optimized mode without tests |
Alexander Afanasyev | 6602b3b | 2016-03-15 14:14:11 -0700 | [diff] [blame] | 25 | ./waf -j1 --color=yes configure |
| 26 | ./waf -j1 --color=yes build |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 27 | |
Alexander Afanasyev | 6602b3b | 2016-03-15 14:14:11 -0700 | [diff] [blame] | 28 | # Cleanup |
| 29 | sudo ./waf -j1 --color=yes distclean |
| 30 | fi |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 31 | |
Davide Pesavento | e0edc4c | 2016-09-13 18:29:52 +0000 | [diff] [blame] | 32 | # Configure/build in debug mode with tests and without precompiled headers |
Eric Newberry | 81a9a86 | 2016-12-27 22:59:27 -0700 | [diff] [blame] | 33 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
Alexander Afanasyev | f22ebaf | 2015-12-17 21:23:05 -0800 | [diff] [blame] | 34 | COVERAGE="--with-coverage" |
Davide Pesavento | 043c501 | 2016-09-19 17:23:32 +0000 | [diff] [blame] | 35 | elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then |
| 36 | ASAN="--with-sanitizer=address" |
Alexander Afanasyev | f22ebaf | 2015-12-17 21:23:05 -0800 | [diff] [blame] | 37 | fi |
Davide Pesavento | 043c501 | 2016-09-19 17:23:32 +0000 | [diff] [blame] | 38 | ./waf -j1 --color=yes configure --debug --with-tests --without-pch $COVERAGE $ASAN |
Davide Pesavento | ab1e8f2 | 2014-10-21 22:45:33 +0200 | [diff] [blame] | 39 | ./waf -j1 --color=yes build |
| 40 | |
Alexander Afanasyev | f22ebaf | 2015-12-17 21:23:05 -0800 | [diff] [blame] | 41 | # (tests will be run against debug version) |
Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 42 | |
| 43 | # Install |
| 44 | sudo ./waf -j1 --color=yes install |