summaryrefslogtreecommitdiff
path: root/circle.yml
blob: 9e0ef3210efd8916a9003e5d923175a33431bf72 (plain)
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
compile:
  override:
  - "echo 'TODO(zoff99): fix compile'"

test:
  override:
  - "echo 'TODO(zoff99): fix compile'"

#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 bash -c "echo 'deb http://archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse' >> /etc/apt/sources.list" # add backports repo
#  - sudo apt-get update
#  - sudo apt-get install astyle/trusty-backports
#  - sudo apt-get install clang
#  - sudo apt-get install build-essential libtool autotools-dev automake checkinstall 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 ------------
#
#  - sudo bash -c "echo /usr/local/lib/x86_64-linux-gnu > /etc/ld.so.conf.d/fix685519.conf" # fix https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=685519 
#
#  - java -version ; exit 0
#  - gcc --version ; exit 0
#  - clang --version ; exit 0
#  - astyle --version ; exit 0
#
#compile:
#  override:
#  ### ----- check code style ------
#  - cd .. ; cp -av c-toxcore ./astyle_check/
#  - cd ../astyle_check/ ; ls -al other/astyle/astylerc
#  - cd ../astyle_check/ ;
#    SOURCES=`find . -name "*.[ch]" -and -not -name "*.api.h" -and -not -wholename "*crypto_pwhash*" -and -not -wholename "./super_donators/*"|sort`;
#    astyle -n --options=other/astyle/astylerc $SOURCES ; exit 0
#  - cd ../astyle_check/ ; git --no-pager diff
#  - cd ../astyle_check/ ; git diff | cat > $CIRCLE_ARTIFACTS/astyle_check.patch 2>&1
#  ### ----- check code style ------
#
#  ### ------- 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 -DASAN=ON -DDEBUG=ON -DSTRICT_ABI=ON -DTRACE=ON -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 test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1 || make test ARGS="--rerun-failed" CTEST_OUTPUT_ON_FAILURE=1