blob: 6306a52f4e8dbf98e236022f2a450ab55f5af635 [file] [log] [blame]
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07001#!/usr/bin/env bash
2set -x
Vince Lehman0a7da612014-10-29 14:39:29 -05003set -e
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -07004
5git submodule init
6git submodule sync
7git submodule update
8
Vince Lehman0a7da612014-10-29 14:39:29 -05009# Cleanup
10sudo ./waf -j1 --color=yes distclean
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -070011
Vince Lehman0a7da612014-10-29 14:39:29 -050012# Configure/build in debug mode
13./waf -j1 --color=yes configure --with-tests --debug
14./waf -j1 --color=yes build
15
16# Cleanup
17sudo ./waf -j1 --color=yes distclean
18
19# Configure/build in optimized mode without tests
20./waf -j1 --color=yes configure
21./waf -j1 --color=yes build
22
23# Cleanup
24sudo ./waf -j1 --color=yes distclean
25
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -050026if [[ $JOB_NAME == *"code-coverage" ]]; then
27 COVERAGE="--with-coverage"
28elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then
29 ASAN="--with-sanitizer=address"
30fi
31
Vince Lehman0a7da612014-10-29 14:39:29 -050032# Configure/build in optimized mode with tests
Davide Pesaventoc58cc7f2017-08-08 16:51:28 -050033./waf -j1 --color=yes configure --with-tests $COVERAGE $ASAN
Vince Lehman0a7da612014-10-29 14:39:29 -050034./waf -j1 --color=yes build
35
36# (tests will be run against optimized version)
37
Alexander Afanasyevbc98fcf2014-08-16 23:18:50 -070038sudo ./waf install --color=yes