blob: 6e42480c3bbb2d8cc3a215d9c16cae46eca73c0e [file] [log] [blame]
Davide Pesavento956ac312016-09-20 19:11:30 +02001#!/usr/bin/env bash
2set -e
3
4JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5source "$JDIR"/util.sh
6
7set -x
8
9# Cleanup
10sudo ./waf -j1 --color=yes distclean
11
Eric Newberry9737aa82016-12-27 23:03:49 -070012if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
Davide Pesavento956ac312016-09-20 19:11:30 +020013 # Configure/build in optimized mode with tests
14 ./waf -j1 --color=yes configure --with-tests
15 ./waf -j1 --color=yes build
16
17 # Cleanup
18 sudo ./waf -j1 --color=yes distclean
19
20 # Configure/build in optimized mode without tests
21 ./waf -j1 --color=yes configure
22 ./waf -j1 --color=yes build
23
24 # Cleanup
25 sudo ./waf -j1 --color=yes distclean
26fi
27
28# Configure/build in debug mode with tests
Eric Newberry9737aa82016-12-27 23:03:49 -070029if [[ $JOB_NAME == *"code-coverage" ]]; then
Eric Newberry716ab602016-12-29 21:49:57 -070030 COVERAGE="--with-coverage"
Davide Pesaventof085ed12017-06-30 14:59:52 -040031elif [[ -n $BUILD_WITH_ASAN || -z $TRAVIS ]]; then
Davide Pesavento956ac312016-09-20 19:11:30 +020032 ASAN="--with-sanitizer=address"
33fi
34./waf -j1 --color=yes configure --debug --with-tests $COVERAGE $ASAN
35./waf -j1 --color=yes build
36
37# (tests will be run against debug version)
38
39# Install
40sudo ./waf -j1 --color=yes install