2018-11-29 17:58:52 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Build deps
|
2018-11-29 21:12:20 +01:00
|
|
|
sudo add-apt-repository ppa:openjdk-r/ppa -y
|
2018-11-29 17:58:52 +01:00
|
|
|
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
|
|
|
sudo apt-get update -qq
|
2018-11-29 21:12:20 +01:00
|
|
|
sudo apt-get upgrade -y
|
2018-11-29 21:15:48 +01:00
|
|
|
sudo apt-get install gcc-8 g++-8 make gperf openjdk-11-jdk cmake libssl-dev -y
|
2018-11-29 17:58:52 +01:00
|
|
|
|
|
|
|
# Dirs
|
|
|
|
cd src/main/jni
|
|
|
|
mkdir build
|
|
|
|
mkdir $TRAVIS_BUILD_DIR/out
|
|
|
|
cd build
|
|
|
|
|
|
|
|
# Setup env
|
|
|
|
export JAVA_HOME=$(dirname $(dirname $(readlink -f $(which javac))))
|
|
|
|
export CC=/usr/bin/gcc-8
|
|
|
|
export CXX=/usr/bin/g++-8
|
|
|
|
|
|
|
|
# Build
|
|
|
|
cmake -DTD_ENABLE_JNI=ON -DCMAKE_INSTALL_PREFIX:PATH=. ..
|
|
|
|
cmake --build . --target install
|
|
|
|
|
|
|
|
# Copy artifacts
|
|
|
|
cp -rf * $TRAVIS_BUILD_DIR/out
|