blob: 33c02fa4be40f634373394351bd526a0f4937ede [file] [log] [blame]
Zhiyi Zhang8617a792017-01-17 16:45:56 -08001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
9git submodule init
10git submodule sync
11git submodule update
12
13# Cleanup
14sudo ./waf -j1 --color=yes distclean
15
16if [[ $JOB_NAME != *"code-coverage" && $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
20
21 # Cleanup
22 sudo ./waf -j1 --color=yes distclean
23
24 # 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
33if [[ $JOB_NAME == *"code-coverage" ]]; then
34 COVERAGE="--with-coverage"
35elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
36 ASAN="--with-sanitizer=address"
37fi
38./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN
39./waf -j1 --color=yes build
40
41# (tests will be run against debug version)
42
43# Install
44sudo ./waf -j1 --color=yes install
Zhiyi Zhang7021a932017-03-17 10:26:51 -070045
46if has Linux $NODE_LABELS; then
47 sudo ldconfig
48elif has FreeBSD $NODE_LABELS; then
49 sudo ldconfig -a
50fi