Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Alexander Afanasyev | 33ce4c3 | 2014-10-24 11:19:45 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 4 | |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 5 | COVERAGE=$( python -c "print '--with-coverage' if 'code-coverage' in '$JOB_NAME' else ''" ) |
| 6 | |
| 7 | sudo rm -Rf /usr/local/include/ndn-cxx |
| 8 | sudo rm -f /usr/local/lib/libndn-cxx* |
| 9 | sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx* |
| 10 | |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 11 | # Cleanup |
| 12 | sudo ./waf -j1 --color=yes distclean |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 13 | |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 14 | # Configure/build in debug mode |
Alexander Afanasyev | 6f9ec93 | 2014-10-31 10:34:00 -0700 | [diff] [blame^] | 15 | ./waf -j1 --color=yes configure --with-tests --debug |
Davide Pesavento | dfe9c6b | 2014-08-25 21:17:10 +0200 | [diff] [blame] | 16 | ./waf -j1 --color=yes build |
| 17 | |
| 18 | # Cleanup |
| 19 | sudo ./waf -j1 --color=yes distclean |
| 20 | |
| 21 | # Configure/build in optimized mode without tests with precompiled headers |
| 22 | ./waf -j1 --color=yes configure |
| 23 | ./waf -j1 --color=yes build |
| 24 | |
| 25 | # Cleanup |
| 26 | sudo ./waf -j1 --color=yes distclean |
| 27 | |
| 28 | # Configure/build in optimized mode |
| 29 | ./waf -j1 --color=yes configure --with-tests --without-pch $COVERAGE |
| 30 | ./waf -j1 --color=yes build |
| 31 | |
| 32 | # (tests will be run against optimized version) |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 33 | |
| 34 | # Install |
| 35 | sudo ./waf -j1 --color=yes install |
| 36 | sudo ldconfig || true |