blob: 3c975e0727bb533aa48ee95d0a1eea3072c9b775 [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
Alexander Afanasyev6602b3b2016-03-15 14:14:11 -070016if [[ "$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
Alexander Afanasyevf22ebaf2015-12-17 21:23:05 -080033if [[ "$JOB_NAME" == *"code-coverage" ]]; then
34 COVERAGE="--with-coverage"
35fi
36./waf -j1 --color=yes configure --debug --with-tests --without-pch $COVERAGE
Davide Pesaventoab1e8f22014-10-21 22:45:33 +020037./waf -j1 --color=yes build
38
Alexander Afanasyevf22ebaf2015-12-17 21:23:05 -080039# (tests will be run against debug version)
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -070040
41# Install
42sudo ./waf -j1 --color=yes install