blob: 1d9ee2a9f86f6cf83cdb0dd01551e2f7a69f8f0d [file] [log] [blame]
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07001#!/usr/bin/env bash
2set -x
Shock Jiang2d8483c2014-10-30 10:15:37 -07003set -e
Alexander Afanasyev21034bf2014-09-02 18:31:53 -07004
Alexander Afanasyevc7c99002015-10-09 17:27:30 -07005JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
6source "$JDIR"/util.sh
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -08007
8# Cleanup
9sudo ./waf -j1 --color=yes distclean
10
11# Configure/build in debug mode
12./waf -j1 --color=yes configure --with-tests --debug
13./waf -j1 --color=yes build
14
15# Cleanup
16sudo ./waf -j1 --color=yes distclean
17
18# Configure/build in optimized mode without tests
19./waf -j1 --color=yes configure
20./waf -j1 --color=yes build
21
22# Cleanup
23sudo ./waf -j1 --color=yes distclean
24
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070025# Configure/build in debug mode
26if [[ "$JOB_NAME" == *"code-coverage" ]]; then
27 COVERAGE="--with-coverage"
28fi
29./waf -j1 --color=yes configure --debug --with-tests $COVERAGE
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080030./waf -j1 --color=yes build
31
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070032# (tests will be run against debug version)
Alexander Afanasyev7495a7e2014-11-20 19:21:27 -080033
34# Install
35sudo ./waf -j1 --color=yes install
Alexander Afanasyevc7c99002015-10-09 17:27:30 -070036
37if has Linux $NODE_LABELS; then
38 sudo ldconfig
39elif has FreeBSD $NODE_LABELS; then
40 sudo ldconfig -a
41fi