Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Shock Jiang | 2d8483c | 2014-10-30 10:15:37 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 4 | |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame^] | 5 | COVERAGE=$( python -c "print '--with-coverage --debug' if 'code-coverage' in '$JOB_NAME' else ''" ) |
| 6 | |
| 7 | # Cleanup |
| 8 | sudo ./waf -j1 --color=yes distclean |
| 9 | |
| 10 | # Configure/build in debug mode |
| 11 | ./waf -j1 --color=yes configure --with-tests --debug |
| 12 | ./waf -j1 --color=yes build |
| 13 | |
| 14 | # Cleanup |
| 15 | sudo ./waf -j1 --color=yes distclean |
| 16 | |
| 17 | # Configure/build in optimized mode without tests |
| 18 | ./waf -j1 --color=yes configure |
| 19 | ./waf -j1 --color=yes build |
| 20 | |
| 21 | # Cleanup |
| 22 | sudo ./waf -j1 --color=yes distclean |
| 23 | |
| 24 | # Configure/build in optimized mode |
| 25 | ./waf -j1 --color=yes configure --with-tests $COVERAGE |
| 26 | ./waf -j1 --color=yes build |
| 27 | |
| 28 | # (tests will be run against optimized version) |
| 29 | |
| 30 | # Install |
| 31 | sudo ./waf -j1 --color=yes install |