ci: Add script to enable checks with Travis CI
Change-Id: I5345a67dc588228df5560139477fa9236a6b437d
diff --git a/.jenkins.d/01-deps.sh b/.jenkins.d/01-deps.sh
index 1a0e8c8..6b9e10a 100755
--- a/.jenkins.d/01-deps.sh
+++ b/.jenkins.d/01-deps.sh
@@ -14,22 +14,22 @@
fi
if [[ $IS_UBUNTU == "yes" ]]; then
- sudo apt-get update -q -y
- sudo apt-get -y install build-essential
- sudo apt-get -y install libssl-dev libsqlite3-dev libcrypto++-dev
+ sudo apt-get update -qq -y
+ sudo apt-get -qq -y install build-essential
+ sudo apt-get -qq -y install libssl-dev libsqlite3-dev libcrypto++-dev
IS_12_04=$( python -c "print 'yes' if 'Ubuntu-12.04' in '$NODE_LABELS'.strip().split(' ') else 'no'" )
if [[ $IS_12_04 == "yes" ]]; then
- sudo apt-get install -y python-software-properties
+ sudo apt-get install -qq -y python-software-properties
sudo add-apt-repository -y ppa:boost-latest/ppa
- sudo apt-get update -q -y
- sudo apt-get install -y libboost1.55-all-dev
- sudo apt-get install -y python-gnomedesktop
+ sudo apt-get update -qq -y
+ sudo apt-get install -qq -y libboost1.55-all-dev
+ sudo apt-get install -qq -y python-gnomedesktop
else
- sudo apt-get install -y libboost-all-dev
+ sudo apt-get install -qq -y libboost-all-dev
fi
- sudo apt-get install -y python-dev python-pygraphviz python-kiwi
- sudo apt-get install -y python-pygoocanvas python-gnome2
- sudo apt-get install -y python-rsvg ipython
+ sudo apt-get install -qq -y python-dev python-pygraphviz python-kiwi
+ sudo apt-get install -qq -y python-pygoocanvas python-gnome2
+ sudo apt-get install -qq -y python-rsvg ipython
fi
diff --git a/.jenkins.d/02-deps-ndn-cxx.sh b/.jenkins.d/02-deps-ndn-cxx.sh
index fdfafce..1835a6c 100755
--- a/.jenkins.d/02-deps-ndn-cxx.sh
+++ b/.jenkins.d/02-deps-ndn-cxx.sh
@@ -2,6 +2,14 @@
set -x
set -e
+if [[ $USE_NDN_PPA == "yes" ]]; then
+ sudo apt-get install -y python-software-properties
+ sudo add-apt-repository -qq -y ppa:named-data/ppa
+ sudo apt-get update -qq
+ sudo apt-get install -qq -y ndn-cxx-dev
+ exit 0
+fi
+
cd /tmp
BUILD="no"
if [ ! -d ndn-cxx ]; then
diff --git a/.jenkins.d/10-build.sh b/.jenkins.d/10-build.sh
index 33352ca..93e7d79 100755
--- a/.jenkins.d/10-build.sh
+++ b/.jenkins.d/10-build.sh
@@ -16,7 +16,7 @@
sudo ./waf -j1 distclean
# Configure/build in debug mode
-./waf -j1 configure --enable-examples --enable-tests $EXTRA_FLAGS
+./waf -j1 configure --enable-modules=ndnSIM --enable-examples --enable-tests $EXTRA_FLAGS
./waf -j1 build
# # Cleanup
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..ebfe01a
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,26 @@
+language: cpp
+os:
+ - linux
+compiler:
+ - gcc
+notifications:
+ email:
+ on_success: always
+ on_failure: always
+cache:
+ - ccache
+env:
+ - NODE_LABELS="Linux Ubuntu Ubuntu-12.04"
+before_install:
+ - travis_retry sudo apt-get install -qq ccache
+script:
+ - |
+ git rm -qrf .
+ git clone --depth=1 https://github.com/cawka/ns-3-dev-ndnSIM.git ns-3
+ git clone --depth=1 https://github.com/cawka/pybindgen.git pybindgen
+ mkdir -p ns-3/src/ndnSIM
+ mv .git ns-3/src/ndnSIM/
+ (cd ns-3/src/ndnSIM/ && git reset -q && git checkout .)
+ - cd ns-3
+ - export CXX="ccache $CXX"
+ - ./src/ndnSIM/.jenkins
diff --git a/wscript b/wscript
index e9ef718..45d2a32 100644
--- a/wscript
+++ b/wscript
@@ -72,7 +72,7 @@
deps.append('visualizer')
if bld.env.ENABLE_EXAMPLES:
- deps += ['point-to-point-layout', 'csma', 'applications']
+ deps += ['point-to-point-layout', 'csma', 'applications', 'wifi']
module = bld.create_ns3_module ('ndnSIM', deps)
module.module = 'ndnSIM'