forked from TokTok/c-toxcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
103 lines (88 loc) · 5 KB
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
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
# ------------ 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_"
- . ~/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 ---
test:
override:
- make VERBOSE=1 test || make VERBOSE=1 ARGS="--rerun-failed" test