2016-11-28 02:27:18 +08:00
|
|
|
machine:
|
|
|
|
environment:
|
|
|
|
MAKEFLAGS: "j4"
|
2017-01-23 20:33:21 +08:00
|
|
|
# --- Android build ---
|
|
|
|
_toolchain_: "/home/ubuntu/c-toxcore/toolchains/"
|
|
|
|
_s_: "/home/ubuntu/c-toxcore/src/"
|
|
|
|
AND_PATH: "$_toolchain_/arm-linux-androideabi/bin:$PATH"
|
|
|
|
AND_PKG_CONFIG_PATH: "$_toolchain_/arm-linux-androideabi/sysroot/usr/lib/pkgconfig"
|
|
|
|
AND_CC: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang"
|
|
|
|
AND_CXX: "$_toolchain_/arm-linux-androideabi/bin/arm-linux-androideabi-clang++"
|
|
|
|
# --- Android build ---
|
2016-11-28 02:27:18 +08:00
|
|
|
dependencies:
|
|
|
|
pre:
|
2017-01-20 02:31:09 +08:00
|
|
|
- sudo apt-get update
|
|
|
|
- sudo apt-get install clang
|
|
|
|
- sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm
|
|
|
|
- sudo apt-get install libopus-dev libvpx-dev pkg-config
|
2016-11-28 02:27:18 +08:00
|
|
|
|
|
|
|
# ------------ network_test requires that "localhost" resolves to ::1 ------------
|
2017-01-20 02:31:09 +08:00
|
|
|
- sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry
|
2016-11-28 02:27:18 +08:00
|
|
|
# ------------ network_test requires that "localhost" resolves to ::1 ------------
|
|
|
|
|
2017-01-23 20:33:21 +08:00
|
|
|
- java -version ; exit 0
|
2017-01-20 02:31:09 +08:00
|
|
|
- gcc --version ; exit 0
|
|
|
|
- clang --version ; exit 0
|
2016-11-28 02:27:18 +08:00
|
|
|
|
|
|
|
compile:
|
|
|
|
override:
|
2017-01-20 02:31:09 +08:00
|
|
|
### ------- get libsodium -------
|
|
|
|
- mkdir ~/libsodium
|
|
|
|
- cd ~/libsodium/ ; git clone https://github.com/jedisct1/libsodium.git
|
|
|
|
- cd ~/libsodium/ ; cd libsodium/ ; git checkout tags/1.0.11
|
|
|
|
- cd ~/libsodium/ ; cd libsodium/ ; ./autogen.sh
|
|
|
|
- cd ~/libsodium/ ; cd libsodium/ ; ./configure && make check
|
|
|
|
- cd ~/libsodium/ ; cd libsodium/ ; sudo bash -c "printf 'y\naa\n\n' | checkinstall --install --pkgname libsodium --pkgversion 1.0.0 --nodoc --deldesc=no --pkglicense='GPL2'"
|
|
|
|
- cd ~/libsodium/ ; cd libsodium/ ; sudo ldconfig
|
|
|
|
### ------- get libsodium -------
|
2016-11-28 02:27:18 +08:00
|
|
|
|
|
|
|
##### ------------ BUILD ------------
|
2017-01-20 02:31:09 +08:00
|
|
|
- cmake -DWARNINGS=OFF .
|
|
|
|
#- cmake .
|
|
|
|
- make
|
|
|
|
- sudo make install
|
|
|
|
- sudo ldconfig -v 2>/dev/null | grep toxcore
|
|
|
|
- sudo ldconfig -v 2>/dev/null | grep sodium
|
2016-11-28 02:27:18 +08:00
|
|
|
##### ------------ BUILD ------------
|
|
|
|
|
2017-01-23 20:33:21 +08:00
|
|
|
# --- Android build ---
|
|
|
|
- echo 'export PATH="$AND_PATH";export PKG_CONFIG_PATH="$AND_PKG_CONFIG_PATH";export CC="$AND_CC";export CXX="$AND_CXX";export CPPFLAGS="";export LDFLAGS=""' > ~/pp
|
|
|
|
- chmod u+x ~/pp
|
|
|
|
- mkdir -p "$_s_"
|
|
|
|
- . ~/pp;mkdir -p "$PKG_CONFIG_PATH"
|
|
|
|
- . ~/pp;curl -s http://dl.google.com/android/repository/android-ndk-r13b-linux-x86_64.zip -o android-ndk-r13b-linux-x86_64.zip
|
|
|
|
- . ~/pp;unzip android-ndk-r13b-linux-x86_64.zip
|
|
|
|
- . ~/pp;mv -v /home/ubuntu/c-toxcore/android-ndk-r13b /home/ubuntu/android-ndk
|
|
|
|
- . ~/pp;/home/ubuntu/android-ndk/build/tools/make_standalone_toolchain.py --arch arm --install-dir "$_toolchain_"/arm-linux-androideabi --api 12 --force
|
|
|
|
|
|
|
|
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git
|
|
|
|
- . ~/pp;cd $_s_/yasm/;autoreconf -fi
|
|
|
|
- . ~/pp;rm -Rf ~/build/
|
|
|
|
- . ~/pp;mkdir -p ~/build/
|
|
|
|
- . ~/pp;cd ~/build/;$_s_/yasm/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot
|
|
|
|
- . ~/pp;cd ~/build/;make -j4
|
|
|
|
- . ~/pp;cd ~/build/;make install
|
|
|
|
|
|
|
|
|
|
|
|
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.6.0 https://github.com/webmproject/libvpx.git
|
|
|
|
- . ~/pp;rm -Rf ~/build/
|
|
|
|
- . ~/pp;mkdir -p ~/build/
|
|
|
|
- . ~/pp;cd ~/build/;$_s_/libvpx/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-examples --disable-unit-tests --sdk-path=/home/ubuntu/android-ndk --target=armv7-android-gcc
|
|
|
|
- . ~/pp;cd ~/build/;make -j4
|
|
|
|
- . ~/pp;cd ~/build/;make install
|
|
|
|
|
|
|
|
|
|
|
|
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.1.3 https://github.com/xiph/opus.git
|
|
|
|
- . ~/pp;cd $_s_/opus/;autoreconf -fi
|
|
|
|
- . ~/pp;rm -Rf ~/build/
|
|
|
|
- . ~/pp;mkdir -p ~/build/
|
|
|
|
- . ~/pp;cd ~/build/;$_s_/opus/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot
|
|
|
|
- . ~/pp;cd ~/build/;make -j4
|
|
|
|
- . ~/pp;cd ~/build/;make install
|
|
|
|
|
|
|
|
|
|
|
|
- . ~/pp;cd $_s_;git clone --depth=1 --branch=1.0.11 https://github.com/jedisct1/libsodium.git
|
|
|
|
- . ~/pp;cd $_s_/libsodium/;autoreconf -fi
|
|
|
|
- . ~/pp;rm -Rf ~/build/
|
|
|
|
- . ~/pp;mkdir -p ~/build/
|
|
|
|
- . ~/pp;cd ~/build/;$_s_/libsodium/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-shared --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --enable-minimal --disable-pie
|
|
|
|
- . ~/pp;cd ~/build/;make -j4
|
|
|
|
- . ~/pp;cd ~/build/;make install
|
|
|
|
|
|
|
|
|
|
|
|
- . ~/pp;cd ~/c-toxcore/;autoreconf -fi
|
|
|
|
- . ~/pp;rm -Rf ~/build/
|
|
|
|
- . ~/pp;mkdir -p ~/build/
|
|
|
|
- . ~/pp;cd ~/build/;~/c-toxcore/configure --prefix="$_toolchain_"/arm-linux-androideabi/sysroot/usr --disable-soname-versions --host=arm-linux-androideabi --with-sysroot="$_toolchain_"/arm-linux-androideabi/sysroot --disable-testing --disable-rt
|
|
|
|
- . ~/pp;cd ~/build/;make -j4
|
|
|
|
- . ~/pp;cd ~/build/;make install
|
|
|
|
# --- Android build ---
|
|
|
|
|
2016-11-28 02:27:18 +08:00
|
|
|
test:
|
|
|
|
override:
|
2017-01-20 02:31:09 +08:00
|
|
|
- make VERBOSE=1 test || make VERBOSE=1 ARGS="--rerun-failed" test
|