blob: f2ba8124de66abd6690c96dc686e94635406f51c [file] [log] [blame]
Davide Pesavento813df802017-08-20 20:53:54 -04001#!/usr/bin/env bash
Davide Pesaventoede59632022-08-26 20:35:44 -04002set -eo pipefail
Davide Pesavento813df802017-08-20 20:53:54 -04003
Davide Pesaventof6be8e32020-04-30 16:06:03 -04004if [[ -z $DISABLE_ASAN ]]; then
Davide Pesavento437adfe2018-01-11 02:20:42 -05005 ASAN="--with-sanitizer=address"
6fi
Davide Pesaventof6be8e32020-04-30 16:06:03 -04007if [[ $JOB_NAME == *"code-coverage" ]]; then
8 COVERAGE="--with-coverage"
Davide Pesavento813df802017-08-20 20:53:54 -04009fi
10
Davide Pesaventoede59632022-08-26 20:35:44 -040011set -x
12
Davide Pesaventof6be8e32020-04-30 16:06:03 -040013if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
14 # Build in release mode with tests
15 ./waf --color=yes configure --with-tests
Davide Pesaventoede59632022-08-26 20:35:44 -040016 ./waf --color=yes build
Davide Pesavento813df802017-08-20 20:53:54 -040017
Davide Pesaventof6be8e32020-04-30 16:06:03 -040018 # Cleanup
19 ./waf --color=yes distclean
20
21 # Build in release mode without tests
22 ./waf --color=yes configure
Davide Pesaventoede59632022-08-26 20:35:44 -040023 ./waf --color=yes build
Davide Pesaventof6be8e32020-04-30 16:06:03 -040024
25 # Cleanup
26 ./waf --color=yes distclean
27fi
28
29# Build in debug mode with tests
Saurab Dulalecb0b712023-08-18 01:48:54 +000030./waf --color=yes configure --debug --with-chronosync --with-psync --with-svs --with-tests $ASAN $COVERAGE
Davide Pesaventoede59632022-08-26 20:35:44 -040031./waf --color=yes build
Davide Pesaventof6be8e32020-04-30 16:06:03 -040032
33# (tests will be run against the debug version)
Davide Pesavento813df802017-08-20 20:53:54 -040034
35# Install
Davide Pesaventoede59632022-08-26 20:35:44 -040036sudo ./waf --color=yes install