blob: ce7a7746f784d8f2798cfcaca93a78fd63ba48b6 [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
2set -x
Alexander Afanasyev33ce4c32014-10-24 11:19:45 -07003set -e
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04004
Alexander Afanasyev4c32e742014-11-09 21:37:12 -08005COVERAGE=$( python -c "print '--with-coverage --debug' if 'code-coverage' in '$JOB_NAME' else ''" )
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04006
7sudo rm -Rf /usr/local/include/ndn-cxx
8sudo rm -f /usr/local/lib/libndn-cxx*
9sudo rm -f /usr/local/lib/pkgconfig/libndn-cxx*
10
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020011# Cleanup
12sudo ./waf -j1 --color=yes distclean
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040013
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020014# Configure/build in debug mode
Alexander Afanasyev6f9ec932014-10-31 10:34:00 -070015./waf -j1 --color=yes configure --with-tests --debug
Davide Pesaventodfe9c6b2014-08-25 21:17:10 +020016./waf -j1 --color=yes build
17
18# Cleanup
19sudo ./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
26sudo ./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 Afanasyeva87e0a82014-10-21 14:09:19 -040033
34# Install
35sudo ./waf -j1 --color=yes install
36sudo ldconfig || true