Permalink
Browse files

Android Build Fixes (#61)

* Fixed lz4 issue with Android

* Based build updates for Android+Lz4

* Force use clang for capnp android

* Suppressed Boost build output for Android

* Removed suppress logs for Boost build

* Moved android build to GAMS travis CI

* Updated Travis CI

* Updated Travis CI #2

* Added capnp-java option to base_build

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml

* Update .travis.yml
  • Loading branch information...
amsurana authored and jredmondson committed Oct 22, 2018
1 parent 92a5004 commit 590fc40ff114a3ce2ab095536153e965e1ec2ea4
Showing with 64 additions and 15 deletions.
  1. +30 −15 .travis.yml
  2. +34 −0 scripts/linux/base_build.sh
@@ -25,10 +25,16 @@ env:
- CAPNP_ROOT=$TRAVIS_BUILD_DIR/capnproto
- LD_LIBRARY_PATH=$MADARA_ROOT/lib:$GAMS_ROOT/lib:$LD_LIBRARY_PATH:$CAPNP_ROOT/c++/.libs
- CORES=6
- TESTS="tests"
- GAMS="gams"

matrix:

allow_failures:
- env: NAME="OSX 10.13 clang zmq" CLANG="clang" ZMQ="zmq"
- env: NAME="Ubuntu 16.04 android zmq" ANDROID="android" ZMQ="zmq" TESTS="" CLANG="" GAMS=""
- env: NAME="Ubuntu 16.04 android" ANDROID="android" SSL="ssl" TESTS="" CLANG="" GAMS=""

include:
################MAC#####################

@@ -110,6 +116,15 @@ matrix:
- compiler: gcc
os: linux
env: NAME="Ubuntu 16.04 g++ simtime" SIMTIME="simtime"
# g++, linux, android, zmq
- compiler: gcc
os: linux
env: NAME="Ubuntu 16.04 android zmq" ANDROID="android" ZMQ="zmq" TESTS="" CLANG="" GAMS=""

# g++, linux, android, ssl
- compiler: gcc
os: linux
env: NAME="Ubuntu 16.04 android" ANDROID="android" SSL="ssl" TESTS="" CLANG="" GAMS=""

addons:
apt:
@@ -137,19 +152,19 @@ script:
- echo "TRAVIS_BUILD_DIR=$TRAVIS_BUILD_DIR"
- echo ls $TRAVIS_BUILD_DIR
- ls $TRAVIS_BUILD_DIR
- echo $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara gams tests types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME
- $GAMS_ROOT/bin/test_arguments_parser
- $GAMS_ROOT/bin/test_auctions
- $GAMS_ROOT/bin/test_controller_run
- $GAMS_ROOT/bin/test_controller
- $GAMS_ROOT/bin/test_coordinates
- $GAMS_ROOT/bin/test_elections
- $GAMS_ROOT/bin/test_groups
- $GAMS_ROOT/bin/test_location
- $GAMS_ROOT/bin/test_mape_loop
- if [ "$ROS" == "ros" ]; then $GAMS_ROOT/bin/test_ros2gams; fi
- $GAMS_ROOT/bin/test_utility
- $GAMS_ROOT/bin/test_variables
- $GAMS_ROOT/bin/test_types
- echo $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara $GAMS $TESTS types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME $ANDROID
- $GAMS_ROOT/scripts/$OS/base_build.sh prereqs $CLANG madara $GAMS $TESTS types $SSL $JAVA $ZMQ $PYTHON $ROS $SIMTIME $ANDROID
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_arguments_parser; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_auctions; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_controller_run; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_controller; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_coordinates; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_elections; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_groups; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_location; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_mape_loop; fi
- if [ ! -z $TESTS ] && [ "$ROS" == "ros" ]; then $GAMS_ROOT/bin/test_ros2gams; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_utility; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_variables; fi
- if [ ! -z $TESTS ]; then $GAMS_ROOT/bin/test_types; fi

@@ -103,6 +103,7 @@ MAC=${MAC:-0}
BUILD_ERRORS=0
TYPES=0
ANDROID_TESTS=0
CAPNP_JAVA=0

MPC_DEPENDENCY_ENABLED=0
MADARA_DEPENDENCY_ENABLED=0
@@ -202,6 +203,8 @@ do
LZ4=1
elif [ "$var" = "zmq" ]; then
ZMQ=1
elif [ "$var" = "capnp-java" ]; then
CAPNP_JAVA=1
elif [ "$var" = "simtime" ]; then
SIMTIME=1
elif [ "$var" = "tutorials" ]; then
@@ -1087,6 +1090,37 @@ if [ $ANDROID_TESTS -eq 1 ]; then
./run-middleware-tests.sh
fi

if [ $CAPNP_JAVA -eq 1 ]; then

export BASE_CAPNP_DIR=$INSTALL_DIR/capnproto-java
export CAPNP_PREFIX=$BASE_CAPNP_DIR/capnproto
export CAPNP_JAVA_DIR=$BASE_CAPNP_DIR/capnproto-java
if [ $CLEAN = 1 ]; then
rm -rf $BASE_CAPNP_DIR
mkdir -p $BASE_CAPNP_DIR
cd $BASE_CAPNP_DIR
git clone --single-branch --branch release-0.6.1 --depth 1 https://github.com/capnproto/capnproto.git
git clone https://github.com/capnproto/capnproto-java.git
fi
#Build CAPNP Dir.
cd $CAPNP_PREFIX/c++
autoreconf -i
./configure
make -j4
export PATH=$CAPNP_PREFiX/c++:$PATH
export CAPNP_CXX_FLAGS='-I $(CAPNP_PREFIX)/c++/src -L $(CAPNP_PREFIX)/c++/.libs -lkj -lcapnp'
#Build Capnp java
cd $CAPNP_JAVA_DIR/cmake/
cmake -DCAPNP_PKG_PATH=$CAPNP_PREFIX/c++/capnp.pc $CAPNP_PREFIX/c++/CMakeLists.txt
cd $CAPNP_PREFIX/c++
make -j4
cd $CAPNP_JAVA_DIR
sed -i -e 's/c++11/c++14/g' $CAPNP_JAVA_DIR/Makefile
sed -i '/CAPNP_CXX_FLAGS=\$/d' $CAPNP_JAVA_DIR/Makefile
make -j4

fi

if [ $VREP_CONFIG -eq 1 ]; then
echo "CONFIGURING 20 VREP PORTS"
$GAMS_ROOT/scripts/simulation/remoteApiConnectionsGen.pl 19905 20

0 comments on commit 590fc40

Please sign in to comment.