blob: b47b93bec79e4905e8bbe5ae86bcb6c5aa8d1936 [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
Shock Jiang2d8483c2014-10-30 10:15:37 -07002set -e
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07003
Alexander Afanasyevc7c99002015-10-09 17:27:30 -07004JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -08006
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08007set -x
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -08008
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -08009git submodule init
10git submodule sync
11git submodule update
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080012
13# Cleanup
14sudo ./waf -j1 --color=yes distclean
15
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080016if [[ "$JOB_NAME" != *"limited-build" ]]; then
17 # Configure/build in optimized mode with tests
18 ./waf -j1 --color=yes configure --with-tests
19 ./waf -j1 --color=yes build
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080020
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080021 # Cleanup
22 sudo ./waf -j1 --color=yes distclean
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080023
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080024 # Configure/build in optimized mode without tests
25 ./waf -j1 --color=yes configure
26 ./waf -j1 --color=yes build
27
28 # Cleanup
29 sudo ./waf -j1 --color=yes distclean
30fi
31
32# Configure/build in debug mode with tests
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070033if [[ "$JOB_NAME" == *"code-coverage" ]]; then
34 COVERAGE="--with-coverage"
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080035elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
36 ASAN="--with-sanitizer=address"
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070037fi
Alexander Afanasyev984ca9d2016-12-19 13:09:14 -080038./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080039./waf -j1 --color=yes build
40
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070041# (tests will be run against debug version)
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080042
43# Install
44sudo ./waf -j1 --color=yes install