toxcore/circle.yml
2017-04-01 17:47:34 +02:00

126 lines
6.5 KiB
YAML

machine:
environment:
MAKEFLAGS: "j4"
# --- 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 ---
dependencies:
pre:
- 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
- sudo apt-get install libev-dev libevent-dev
# ------------ network_test requires that "localhost" resolves to ::1 ------------
- sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry
# ------------ network_test requires that "localhost" resolves to ::1 ------------
- java -version ; exit 0
- gcc --version ; exit 0
- clang --version ; exit 0
compile:
override:
### ------- 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 -------
##### ------------ BUILD ------------
- cmake -DWARNINGS=OFF .
#- cmake .
- make
- sudo make install
- sudo ldconfig -v 2>/dev/null | grep toxcore
- sudo ldconfig -v 2>/dev/null | grep sodium
##### ------------ BUILD ------------
# --- 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_"
- rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/
- mkdir -p $CIRCLE_ARTIFACTS/android/
- . ~/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 ~/build/;make clean
- rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/
- . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install
- cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libvpx.zip *
- . ~/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 ~/build/;make clean
- rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/
- . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install
- cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/opus.zip *
- . ~/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 ~/build/;make clean
- rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/
- . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install
- cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/libsodium.zip *
- . ~/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
- . ~/pp;cd ~/build/;make clean
- rm -Rf /home/ubuntu/install_dest/ ; mkdir -p /home/ubuntu/install_dest/
- . ~/pp;cd ~/build/;make DESTDIR=/home/ubuntu/install_dest/ install
- cd /home/ubuntu/install_dest/ ; cd home/ubuntu/c-toxcore/toolchains/arm-linux-androideabi/sysroot/ ; zip -r $CIRCLE_ARTIFACTS/android/c-toxcore.zip *
# --- Android build ---
test:
override:
- make VERBOSE=1 test || make VERBOSE=1 ARGS="--rerun-failed" test