blob: a9c3446d25b9bec9dd2b62a1fb2bdf6e5e50deb6 [file] [log] [blame]
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -07001#!/usr/bin/env bash
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -07002set -e
3
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +00004JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -07009git submodule init
10git submodule sync
11git submodule update
12
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020013# Cleanup
14sudo ./waf -j1 --color=yes distclean
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -070015
Eric Newberry81a9a862016-12-27 22:59:27 -070016if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +000017 # Configure/build in optimized mode with tests
Alexander Afanasyev6602b3b2016-03-15 14:14:11 -070018 ./waf -j1 --color=yes configure --with-tests
19 ./waf -j1 --color=yes build
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020020
Alexander Afanasyev6602b3b2016-03-15 14:14:11 -070021 # Cleanup
22 sudo ./waf -j1 --color=yes distclean
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020023
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +000024 # Configure/build in optimized mode without tests
Alexander Afanasyev6602b3b2016-03-15 14:14:11 -070025 ./waf -j1 --color=yes configure
26 ./waf -j1 --color=yes build
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020027
Alexander Afanasyev6602b3b2016-03-15 14:14:11 -070028 # Cleanup
29 sudo ./waf -j1 --color=yes distclean
30fi
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020031
Davide Pesaventoe0edc4c2016-09-13 18:29:52 +000032# Configure/build in debug mode with tests and without precompiled headers
Eric Newberry81a9a862016-12-27 22:59:27 -070033if [[ $JOB_NAME == *"code-coverage" ]]; then
Alexander Afanasyevf22ebaf2015-12-17 21:23:05 -080034 COVERAGE="--with-coverage"
Davide Pesavento043c5012016-09-19 17:23:32 +000035elif ! has OSX-10.9 $NODE_LABELS && ! has OSX-10.11 $NODE_LABELS; then
36 ASAN="--with-sanitizer=address"
Alexander Afanasyevf22ebaf2015-12-17 21:23:05 -080037fi
Davide Pesavento043c5012016-09-19 17:23:32 +000038./waf -j1 --color=yes configure --debug --with-tests --without-pch $COVERAGE $ASAN
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020039./waf -j1 --color=yes build
40
Alexander Afanasyevf22ebaf2015-12-17 21:23:05 -080041# (tests will be run against debug version)
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -070042
43# Install
44sudo ./waf -j1 --color=yes install