Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 3 | |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 4 | if [[ -z $DISABLE_ASAN ]]; then |
Davide Pesavento | 437adfe | 2018-01-11 02:20:42 -0500 | [diff] [blame] | 5 | ASAN="--with-sanitizer=address" |
| 6 | fi |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 7 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
| 8 | COVERAGE="--with-coverage" |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 9 | fi |
| 10 | |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 11 | set -x |
| 12 | |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 13 | if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then |
| 14 | # Build in release mode with tests |
| 15 | ./waf --color=yes configure --with-tests |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 16 | ./waf --color=yes build |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 17 | |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 18 | # Cleanup |
| 19 | ./waf --color=yes distclean |
| 20 | |
| 21 | # Build in release mode without tests |
| 22 | ./waf --color=yes configure |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 23 | ./waf --color=yes build |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 24 | |
| 25 | # Cleanup |
| 26 | ./waf --color=yes distclean |
| 27 | fi |
| 28 | |
| 29 | # Build in debug mode with tests |
Davide Pesavento | ba8a4ed | 2021-10-13 21:28:43 -0400 | [diff] [blame] | 30 | ./waf --color=yes configure --debug --with-chronosync --with-tests $ASAN $COVERAGE |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 31 | ./waf --color=yes build |
Davide Pesavento | f6be8e3 | 2020-04-30 16:06:03 -0400 | [diff] [blame] | 32 | |
| 33 | # (tests will be run against the debug version) |
Davide Pesavento | 813df80 | 2017-08-20 20:53:54 -0400 | [diff] [blame] | 34 | |
| 35 | # Install |
Davide Pesavento | ede5963 | 2022-08-26 20:35:44 -0400 | [diff] [blame] | 36 | sudo ./waf --color=yes install |