blob: b09f9687c914d6ce4828383245b0a0e623199bb0 [file] [log] [blame]
Davide Pesavento813df802017-08-20 20:53:54 -04001#!/usr/bin/env bash
Davide Pesaventof6be8e32020-04-30 16:06:03 -04002set -ex
Davide Pesavento813df802017-08-20 20:53:54 -04003
Davide Pesavento813df802017-08-20 20:53:54 -04004git submodule sync
Davide Pesaventof6be8e32020-04-30 16:06:03 -04005git submodule update --init
Davide Pesavento813df802017-08-20 20:53:54 -04006
Davide Pesaventof6be8e32020-04-30 16:06:03 -04007if [[ -z $DISABLE_ASAN ]]; then
Davide Pesavento437adfe2018-01-11 02:20:42 -05008 ASAN="--with-sanitizer=address"
9fi
Davide Pesaventof6be8e32020-04-30 16:06:03 -040010if [[ $JOB_NAME == *"code-coverage" ]]; then
11 COVERAGE="--with-coverage"
Davide Pesavento813df802017-08-20 20:53:54 -040012fi
13
Davide Pesaventof6be8e32020-04-30 16:06:03 -040014if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then
15 # Build in release mode with tests
16 ./waf --color=yes configure --with-tests
17 ./waf --color=yes build -j$WAF_JOBS
Davide Pesavento813df802017-08-20 20:53:54 -040018
Davide Pesaventof6be8e32020-04-30 16:06:03 -040019 # Cleanup
20 ./waf --color=yes distclean
21
22 # Build in release mode without tests
23 ./waf --color=yes configure
24 ./waf --color=yes build -j$WAF_JOBS
25
26 # Cleanup
27 ./waf --color=yes distclean
28fi
29
30# Build in debug mode with tests
Ashlesh Gawande30d96e42021-03-21 19:15:33 -070031./waf --color=yes configure --with-chronosync --debug --with-tests $ASAN $COVERAGE
Davide Pesaventof6be8e32020-04-30 16:06:03 -040032./waf --color=yes build -j$WAF_JOBS
33
34# (tests will be run against the debug version)
Davide Pesavento813df802017-08-20 20:53:54 -040035
36# Install
Davide Pesavento0b0eddd2019-03-19 14:42:15 -040037sudo_preserve_env PATH -- ./waf --color=yes install