Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 1 | #!/usr/bin/env bash |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 2 | set -eo pipefail |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 3 | |
Davide Pesavento | d5c2447 | 2020-04-01 17:46:18 -0400 | [diff] [blame] | 4 | if [[ -z $DISABLE_ASAN ]]; then |
5 | ASAN="--with-sanitizer=address" | ||||
6 | fi | ||||
Davide Pesavento | 9a659d0 | 2018-01-10 02:55:43 -0500 | [diff] [blame] | 7 | if [[ $JOB_NAME == *"code-coverage" ]]; then |
8 | COVERAGE="--with-coverage" | ||||
Davide Pesavento | 9a659d0 | 2018-01-10 02:55:43 -0500 | [diff] [blame] | 9 | fi |
10 | |||||
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 11 | set -x |
12 | |||||
Eric Newberry | 9737aa8 | 2016-12-27 23:03:49 -0700 | [diff] [blame] | 13 | if [[ $JOB_NAME != *"code-coverage" && $JOB_NAME != *"limited-build" ]]; then |
Davide Pesavento | 9fa6a78 | 2020-03-10 19:47:06 -0400 | [diff] [blame] | 14 | # Build in release mode with tests |
15 | ./waf --color=yes configure --with-tests | ||||
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 16 | ./waf --color=yes build |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 17 | |
Davide Pesavento | 9fa6a78 | 2020-03-10 19:47:06 -0400 | [diff] [blame] | 18 | # Cleanup |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 19 | ./waf --color=yes distclean |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 20 | |
Davide Pesavento | 9fa6a78 | 2020-03-10 19:47:06 -0400 | [diff] [blame] | 21 | # Build in release mode without tests |
22 | ./waf --color=yes configure | ||||
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 23 | ./waf --color=yes build |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 24 | |
Davide Pesavento | 9fa6a78 | 2020-03-10 19:47:06 -0400 | [diff] [blame] | 25 | # Cleanup |
Davide Pesavento | a1a9d70 | 2020-03-29 00:58:15 -0400 | [diff] [blame] | 26 | ./waf --color=yes distclean |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 27 | fi |
28 | |||||
Davide Pesavento | 9fa6a78 | 2020-03-10 19:47:06 -0400 | [diff] [blame] | 29 | # Build in debug mode with tests |
Davide Pesavento | 9a659d0 | 2018-01-10 02:55:43 -0500 | [diff] [blame] | 30 | ./waf --color=yes configure --debug --with-tests $ASAN $COVERAGE |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 31 | ./waf --color=yes build |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 32 | |
Davide Pesavento | 956ac31 | 2016-09-20 19:11:30 +0200 | [diff] [blame] | 33 | # Install |
Davide Pesavento | bd3642f | 2022-08-12 18:19:31 -0400 | [diff] [blame] | 34 | sudo ./waf --color=yes install |