blob: d8d5be9e7ab4a151bce605cbb5897a70394ce8a7 [file] [log] [blame]
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -04001#!/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" != *"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 and without precompiled headers
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
45
46if has Linux $NODE_LABELS; then
47 sudo ldconfig
Alexander Afanasyevf293ceb2018-06-14 18:56:27 -040048elif has FreeBSD10 $NODE_LABELS; then
49 sudo ldconfig -m
Alexander Afanasyev6e64ac92018-06-14 17:25:38 -040050fi