blob: d96c4bdb463801a04c5e4c319e68294c0694fa9c [file] [log] [blame]
Junxiao Shi439d9722015-03-20 15:08:44 -07001#!/usr/bin/env bash
2set -x
3set -e
4
Davide Pesavento525c1072016-09-01 12:21:27 +02005JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
7
Junxiao Shi439d9722015-03-20 15:08:44 -07008# Cleanup
9sudo ./waf -j1 --color=yes distclean
10
Junxiao Shi6eff4e52015-06-28 12:57:29 -070011# Configure/build in release mode without tests
Junxiao Shi439d9722015-03-20 15:08:44 -070012./waf -j1 --color=yes configure
13./waf -j1 --color=yes build
14
15# Cleanup
16sudo ./waf -j1 --color=yes distclean
17
Junxiao Shi6eff4e52015-06-28 12:57:29 -070018# Configure/build in debug mode with tests
Davide Pesavento525c1072016-09-01 12:21:27 +020019if [[ "$JOB_NAME" == *"code-coverage" ]]; then
20 COVERAGE="" # TODO add code coverage support
21elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
22 ASAN="--with-sanitizer=address"
23fi
24./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN
Junxiao Shi439d9722015-03-20 15:08:44 -070025./waf -j1 --color=yes build
Davide Pesavento525c1072016-09-01 12:21:27 +020026
27# (tests will be run against debug version)