-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcircle.yml
More file actions
288 lines (260 loc) · 16.1 KB
/
circle.yml
File metadata and controls
288 lines (260 loc) · 16.1 KB
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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
machine:
timezone:
Europe/Berlin
environment:
MAKEFLAGS: ""
BINARIUM_BIN: bild_gruppen_arbeiter
BINARIUM_SRC: bild_gruppen_arbeiter.c
BINARIUM_LOG: bild_gruppen_arbeiter.log
CF2: " -ftree-vectorize "
CF3: " -funsafe-math-optimizations -ffast-math "
## ----------- RASPI cross compile ----------------
RASPI_PATH: "/home/ubuntu/cc/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/bin:$PATH"
RASPI_SYSROOT_: "/home/ubuntu/cc/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot"
RASPI_TOOL_PREFIX: arm-linux-gnueabihf
RASPI_INSTALL_DEST: "/home/ubuntu/installdest/"
RASPI_TARGET_: arm-linux-gnueabi
RASPI_HOST_: arm-linux-gnueabi
RASPI_CXX: $RASPI_TOOL_PREFIX-g++
RASPI_AR: $RASPI_TOOL_PREFIX-ar
RASPI_RANLIB: $RASPI_TOOL_PREFIX-ranlib
RASPI_CC: $RASPI_TOOL_PREFIX-gcc
RASPI_LD: $RASPI_TOOL_PREFIX-ld
RASPI_PKG_CONFIG_PATH: "/home/ubuntu/cc/tools/arm-bcm2708/arm-rpi-4.9.3-linux-gnueabihf/arm-linux-gnueabihf/sysroot/usr/lib/pkgconfig"
RASPI_s_: "/home/ubuntu/src/"
RASPI_PKGSDIR: "/home/ubuntu/pkgs/"
## ----------- RASPI cross compile ----------------
# ---------------------------------------------------
# v0.1.10 cfg_dec2 3921fd04ee233a21befa960cf26214410e1b6582
# v0.1.10 cfg_dec 94bf0a32adac079b7739c6d32cfc0e504993f962
# v0.1.10 onlyKF 74dc53cf180e32f92ebb3cb5e8542e919cc3b343
# v0.1.10 mobtweaks f73b345c21fae0e0e56fae86dc82f63188a00aca
# c-toxcore v0.1.9 a429ef4a28a5e5e0ad010efffb76d2abc3ada0af
# c-toxcore v0.1.8 f6db9333e2d1262e7ba3846563c30f63c98ffa38
# c-toxcore v0.1.7 48c86e942d487a8856cbd25797b320bfb1879ddc
# c-toxcore v0.1.6 895de7ef26e7617769f2271345e414545c2581f8
# c-toxcore v0.1.5 995578f1038842288c1ff552fd796ab2377db6e1
# c-toxcore v0.1.4 27a97a8280813ec05a5209811c40ab23203bb292
# c-toxcore v0.1.3 fdb46f6cf216a866d29402ae991be9c43282dde6
# c-toxcore v0.1.2 a096c71db867ac83fc3e01e0fbe98573d20f9286
# ---------------------------------------------------
# c-toxcore version used
CTOXCORE_VERSION_HASH: "zoff99/_0.1.10_2017_video_fix_10p"
# c-toxcore repo used
# CTOXCORE_URL: "https://github.com/TokTok/c-toxcore"
CTOXCORE_URL: "https://github.com/zoff99/c-toxcore"
LIBSODIUM_VERSION: "tags/1.0.13"
LIBSODIUM_BRANCH: "1.0.13"
RASPBERRRY_TOOLS_HASH: d820ab9c21969013b4e56c7e9cba25518afcdd44
dependencies:
pre:
# -----------------------------------
- sudo /etc/init.d/mysql stop ; exit 0
- sudo /etc/init.d/postgresql stop ; exit 0
# -----------------------------------
- sudo apt-get update
- sudo apt-get install cmake
- aptitude search 4l|grep -i convert ; exit 0
- aptitude search 4l|grep -i v4l ; exit 0
- sudo apt-get install build-essential libtool autotools-dev automake checkinstall check git yasm libv4lconvert0 libv4l-dev
- sudo apt-get install libopus-dev libvpx-dev pkg-config
- sudo apt-get install libasound2-dev
- sudo apt-get install linux-generic
- sudo apt-get install libjpeg-dev
- sudo apt-get install libpulse-dev
- sudo apt-get install libconfig-dev
- sudo bash -c "echo '::1 localhost ipv6-localhost ipv6-loopback' >> /etc/hosts" # ipv6 localhost entry
- gcc --version ; exit 0
- clang --version ; exit 0
### submodules ----------------
- git submodule add --force https://github.com/TokTok/c-toxcore c-toxcore ; echo ok
- git submodule add --force https://github.com/jedisct1/libsodium libsodium ; echo ok
- git submodule init ; git submodule update ; echo ok
# -- sometimes submodule can't find commit hash, whatever ------
- rm -Rf c-toxcore ; git clone "$CTOXCORE_URL"
# -- sometimes submodule can't find commit hash, whatever ------
- cd c-toxcore/ ; git checkout $CTOXCORE_VERSION_HASH
- cd libsodium/ ; git checkout $LIBSODIUM_VERSION
### submodules ----------------
### ------- compile and install libsodium -------
- cd libsodium/ ; ./autogen.sh
- cd libsodium/ ; ./configure && make check
- 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/ ; sudo ldconfig
- cd libsodium ; sudo ldconfig -v 2>/dev/null | grep sodium
## --- now again to save the artefact ---
- cd libsodium ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; rm -Rf "$INSTALL_DEST"
- cd libsodium ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; mkdir -p "$INSTALL_DEST"/usr ; ./configure --prefix="$INSTALL_DEST"/usr
- cd libsodium ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; make install ; ls -alR "$INSTALL_DEST"/usr
- mkdir -p $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries
- export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; cd "$INSTALL_DEST" ; tar -czvf $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries/pkg_libsodium.tar.gz *
## --- now again to save the artefact ---
### ------- compile and install libsodium -------
### ------------ compile and install c-toxcore ------------
- cd c-toxcore ; cmake -DWARNINGS=OFF .
- cd c-toxcore ; make
- cd c-toxcore ; sudo make install
- cd c-toxcore ; sudo ldconfig -v 2>/dev/null | grep toxcore
## --- now again to save the artefact ---
- cd c-toxcore ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; rm -Rf "$INSTALL_DEST"
- cd c-toxcore ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; mkdir -p "$INSTALL_DEST"/usr ; autoreconf -fi ;
export CFLAGS=" -O3 -g "; ./configure --enable-logging --disable-soname-versions --prefix="$INSTALL_DEST"/usr
- cd c-toxcore ; export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; make install ; ls -alR "$INSTALL_DEST"/usr
- mkdir -p $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries
- export INSTALL_DEST=/home/ubuntu/installdest_linux/ ; cd "$INSTALL_DEST" ; tar -czvf $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries/pkg_c-toxcore.tar.gz *
## --- now again to save the artefact ---
### ------------ run tests
# - cd c-toxcore ; make test ARGS="-V" ; ex1=$? ; if [ $ex1 -ne 0 ]; then sleep 60; make test ARGS="-V" ; exit $? ; fi
### ------------ compile and install c-toxcore ------------
## ----------- RASPI cross compile ----------------
## ----------- set architecture -------------------
## ----------- set architecture -------------------
- ARCH="RASPI";printf '#! /bin/bash\nexport CUR_ARCH_="'"$ARCH"'"\n' > ~/glo
- chmod a+rx ~/glo
- cat ~/glo
## ----------- set architecture -------------------
## ----------- set architecture -------------------
- mkdir ~/cc/
- cd ~/cc ; git clone https://github.com/raspberrypi/tools
- cd ~/cc/tools/ ; git checkout $RASPBERRRY_TOOLS_HASH
- . ~/glo;a=${CUR_ARCH_}_PKG_CONFIG_PATH;mkdir -p "${!a}"
- . ~/glo;a=${CUR_ARCH_}_PKGSDIR;mkdir -p "${!a}"
- . ~/glo;a=${CUR_ARCH_}_SYSROOT_;ls -al "${!a}"
- . ~/glo;a=${CUR_ARCH_}_s_;mkdir -p "${!a}"
- . ~/glo;a=${CUR_ARCH_}_PKGSDIR;mkdir -p "${!a}"
- . ~/glo;echo 'export PKGSDIR="$'"${CUR_ARCH_}"'_PKGSDIR";export INSTALL_DEST="$'"${CUR_ARCH_}"'_INSTALL_DEST";export PKG_CONFIG_PATH="$'"${CUR_ARCH_}"'_PKG_CONFIG_PATH";export PATH="$'"${CUR_ARCH_}"'_PATH";export CC="$'"${CUR_ARCH_}"'_CC";export CXX="$'"${CUR_ARCH_}"'_CXX";export AR="$'"${CUR_ARCH_}"'_AR";export RANLIB="$'"${CUR_ARCH_}"'_RANLIB";export _s_="$'"${CUR_ARCH_}"'_s_";export _SYSROOT_="$'"${CUR_ARCH_}"'_SYSROOT_";export _HOST_="$'"${CUR_ARCH_}"'_HOST_";export _TARGET_="$'"${CUR_ARCH_}"'_TARGET_";export _TOOL_PREFIX="$'"${CUR_ARCH_}"'_TOOL_PREFIX";export CUR_ARCH_="'"${CUR_ARCH_}"'";export LD="$'"${CUR_ARCH_}"'_LD"' > ~/pp
- chmod u+x ~/pp
- cat ~/pp
- . ~/glo;printf '#! /bin/bash\n. ~/pp;rm -Rf ~/build/\nmkdir -p ~/build/\narg1_="$1";shift;cd ~/build/;$'"${CUR_ARCH_}"'_s_/"$arg1_"/configure $* && make && make install\n' > ~/do_compile.sh
- chmod a+rx ~/do_compile.sh
- cat ~/do_compile.sh
- . ~/glo;printf '#! /bin/bash\n. ~/pp;rm -Rf ~/build/\nmkdir -p ~/build/\nrm -Rf "$INSTALL_DEST"\narg1_="$1";shift;cd ~/build/;$_s_/"$arg1_"/configure $* && make && make install && cd "$INSTALL_DEST" && tar -czvf "$PKGSDIR""/"pkg_"$arg1_".tar.gz * && rm -Rf "$INSTALL_DEST" \n' > ~/do_package.sh
- chmod a+rx ~/do_package.sh
- cat ~/do_package.sh
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3.0 https://github.com/yasm/yasm.git
- . ~/pp;cd $_s_/yasm/;autoreconf -fi
- . ~/pp;~/do_compile.sh "yasm" --prefix="$_SYSROOT_"/usr --disable-shared --disable-soname-versions --with-sysroot="$_SYSROOT_" --host="$_HOST_" --target="$_TARGET_"
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.7.0 https://github.com/webmproject/libvpx.git
- . ~/pp;export CROSS="arm-linux-gnueabihf-" ;export CXXFLAGS=" -g -O3 $CF2 $CF3 ";
export CFLAGS=" -g -O3 $CF2 $CF3 ";
~/do_compile.sh "libvpx" --prefix="$_SYSROOT_"/usr --disable-examples
--disable-unit-tests --target=generic-gnu --extra-cflags="--sysroot=$_SYSROOT_"
--size-limit=16384x16384
--enable-onthefly-bitpacking
--enable-runtime-cpu-detect
--enable-realtime-only
--enable-multi-res-encoding
--enable-temporal-denoising
- . ~/pp;export CROSS="arm-linux-gnueabihf-" ;export CXXFLAGS=" -g -O3 $CF2 $CF3 ";
export CFLAGS=" -g -O3 $CF2 $CF3 ";
~/do_package.sh "libvpx" --prefix="$INSTALL_DEST"/usr --disable-examples
--disable-unit-tests --target=generic-gnu --extra-cflags="--sysroot=$_SYSROOT_"
--size-limit=16384x16384
--enable-onthefly-bitpacking
--enable-runtime-cpu-detect
--enable-realtime-only
--enable-multi-res-encoding
--enable-temporal-denoising
- . ~/pp;cd $_s_;git clone --depth=1 --branch=v1.3-beta https://github.com/xiph/opus.git
- . ~/pp;cd $_s_/opus/;autoreconf -fi
- . ~/pp;export CXXFLAGS=" -g -O3 $CF2 ";export CFLAGS=" -g -O3 $CF2 ";
~/do_compile.sh "opus" --prefix="$_SYSROOT_"/usr --disable-shared
--disable-soname-versions --target="$_TOOL_PREFIX" --with-sysroot="$_SYSROOT_"
--host="$_TOOL_PREFIX"
- . ~/pp;export CXXFLAGS=" -g -O3 $CF2 ";export CFLAGS=" -g -O3 $CF2 ";
~/do_package.sh "opus" --prefix="$INSTALL_DEST"/usr --disable-shared
--disable-soname-versions --target="$_TOOL_PREFIX" --with-sysroot="$_SYSROOT_"
--host="$_TOOL_PREFIX"
- . ~/pp;cd $_s_;git clone --depth=1 --branch=$LIBSODIUM_BRANCH https://github.com/jedisct1/libsodium.git
- . ~/pp;cd $_s_/libsodium/;autoreconf -fi
- . ~/pp;export CXXFLAGS=" -g -O3 ";export CFLAGS=" -g -O3 ";
~/do_compile.sh "libsodium" --prefix="$_SYSROOT_"/usr --disable-shared
--disable-soname-versions --target="$_TOOL_PREFIX" --with-sysroot="$_SYSROOT_"
--host="$_TOOL_PREFIX" --disable-pie
- . ~/pp;export CXXFLAGS=" -g -O3 ";export CFLAGS=" -g -O3 ";
~/do_package.sh "libsodium" --prefix="$INSTALL_DEST"/usr --disable-shared
--disable-soname-versions --target="$_TOOL_PREFIX" --with-sysroot="$_SYSROOT_"
--host="$_TOOL_PREFIX" --disable-pie
# install raspi binary pkgs -------------------------
- wget 'https://github.com/zoff99/raspi_cross_compile/raw/master/bin_packages/libv4l-dev.tgz' -O ~/pkg2.tgz
- . ~/pp;cd "$_SYSROOT_" ; tar -xzvf ~/pkg2.tgz
- wget 'https://github.com/zoff99/raspi_cross_compile/raw/master/bin_packages/libv4lconvert0.tgz' -O ~/pkg3.tgz
- . ~/pp;cd "$_SYSROOT_" ; tar -xzvf ~/pkg3.tgz
- wget 'https://github.com/zoff99/raspi_cross_compile/raw/master/bin_packages/libjpeg62-turbo.tgz' -O ~/pkg4.tgz
- . ~/pp;cd "$_SYSROOT_" ; tar -xzvf ~/pkg4.tgz
- wget 'https://github.com/zoff99/raspi_cross_compile/raw/master/bin_packages/libjpeg62-turbo-dev.tgz' -O ~/pkg1.tgz
- . ~/pp;cd "$_SYSROOT_" ; tar -xzvf ~/pkg1.tgz
- wget 'https://github.com/zoff99/raspi_cross_compile/raw/master/bin_packages/libconfig-dev.tgz' -O ~/pkg1.tgz
- . ~/pp;cd "$_SYSROOT_" ; tar -xzvf ~/pkg1.tgz
# install raspi binary pkgs -------------------------
- . ~/pp;cd $_s_;git clone "$CTOXCORE_URL"
- . ~/pp;cd $_s_/c-toxcore/;git checkout $CTOXCORE_VERSION_HASH
- . ~/pp;cd $_s_/c-toxcore/;autoreconf -fi
- . ~/pp;export CFLAGS=" -O3 -g ";~/do_compile.sh "c-toxcore" --prefix="$_SYSROOT_"/usr
--enable-logging --disable-soname-versions --host="$_TOOL_PREFIX"
--with-sysroot="$_SYSROOT_" --disable-testing --disable-rt
- . ~/pp;export CFLAGS=" -O3 -g ";~/do_package.sh "c-toxcore" --prefix="$INSTALL_DEST"/usr
--enable-logging --disable-soname-versions --host="$_TOOL_PREFIX"
--with-sysroot="$_SYSROOT_" --disable-testing --disable-rt
# --- toxbootstrapd for RASPI ----
- . ~/pp;~/do_compile.sh "c-toxcore" --prefix="$_SYSROOT_"/usr --enable-logging
--enable-daemon --disable-soname-versions --host="$_TOOL_PREFIX"
--with-sysroot="$_SYSROOT_" --disable-testing --disable-rt ; exit 0 # this will fail
- . ~/pp; cd /home/ubuntu/build/build ; export V=3 ; /bin/bash ../libtool --tag=CC
--mode=link $CC -std=gnu99 -I/home/ubuntu/src//c-toxcore/other/bootstrap_daemon
-I"$_SYSROOT_"/usr/include -g -O2 -o tox-bootstrapd
../other/bootstrap_daemon/src/tox_bootstrapd-command_line_arguments.o
../other/bootstrap_daemon/src/tox_bootstrapd-config.o
../other/bootstrap_daemon/src/tox_bootstrapd-log.o
../other/bootstrap_daemon/src/tox_bootstrapd-tox-bootstrapd.o
../other/tox_bootstrapd-bootstrap_node_packets.o libtoxcore.la -L"$_SYSROOT_"/usr/lib
-L"$_SYSROOT_"/usr/lib/arm-linux-gnueabihf -lconfig -lsodium ; exit 0
- ls -al /home/ubuntu/build/build/.libs/tox-bootstrapd ; exit 0
- file /home/ubuntu/build/build/.libs/tox-bootstrapd ; exit 0
# --- toxbootstrapd for RASPI ----
- . ~/pp;mkdir -p $CIRCLE_ARTIFACTS/"${CUR_ARCH_}"/
- . ~/pp;cp -av "$PKGSDIR"/* $CIRCLE_ARTIFACTS/"${CUR_ARCH_}"/
# --- toxbootstrapd for RASPI ----
- . ~/pp;cp -av /home/ubuntu/build/build/.libs/tox-bootstrapd $CIRCLE_ARTIFACTS/"${CUR_ARCH_}"/ ; exit 0
# --- toxbootstrapd for RASPI ----
- cd src ; rm -fv "$BINARIUM_BIN" "$BINARIUM_BIN"_static
- cd src ; . ~/pp ; $CC -O3 -g -fPIC -o "$BINARIUM_BIN" "$BINARIUM_SRC"
-std=gnu99 -I"$_SYSROOT_"/usr/local/include/ -L"$_SYSROOT_"/usr/lib/arm-linux-gnueabihf/
-lsodium -ltoxcore -ltoxav -lpthread -lvpx -ljpeg -lv4lconvert
- cd src ; ldd "$BINARIUM_BIN" ; exit 0
- cd src ; find . -name '*'"$BINARIUM_BIN"'*' -exec ls -al {} \; 2> /dev/null ; exit 0
- cd src ; . ~/pp ; $CC -O3 -g -Wall -Wextra -Wpedantic -o "$BINARIUM_BIN"_static
"$BINARIUM_SRC" -static -std=gnu99
-L"$_SYSROOT_"/usr/lib/arm-linux-gnueabihf/ -I"$_SYSROOT_"/usr/lib/arm-linux-gnueabihf/
-lsodium -ltoxcore -ltoxav -lsodium -lpthread -static-libgcc
-static-libstdc++ -lopus -lvpx -lm -lpthread -lv4lconvert
-ljpeg -lm -lrt
- cd src ; ls -al "$BINARIUM_BIN" "$BINARIUM_BIN"_static
- cd src ;. ~/pp ; cp -av ./"$BINARIUM_BIN" $CIRCLE_ARTIFACTS/"${CUR_ARCH_}"/
- cd src ;. ~/pp ; cp -av ./"$BINARIUM_BIN"_static $CIRCLE_ARTIFACTS/"${CUR_ARCH_}"/
## ----------- RASPI cross compile ----------------
test:
override:
- cd src ; rm -fv "$BINARIUM_BIN" "$BINARIUM_BIN"_static
- cd src ; gcc -O3 -g -fPIC -o "$BINARIUM_BIN" "$BINARIUM_SRC" -std=gnu99
-lsodium -I/usr/local/include/ -ltoxcore -ltoxav
-lpthread -lvpx
- cd src ; ldd "$BINARIUM_BIN" ; exit 0
- find / -name '*libjpeg*' 2> /dev/null ; exit 0
- cd src ; gcc -O3 -g -Wall -o "$BINARIUM_BIN"_static "$BINARIUM_SRC" -static -std=gnu99
-L/usr/local/lib -I/usr/local/include/ -lsodium -ltoxcore -ltoxav -ltoxgroup
-ltoxmessenger -ltoxfriends -ltoxnetcrypto -ltoxdht -ltoxnetwork -ltoxcrypto
-lsodium -lpthread -static-libgcc -static-libstdc++ -lopus -lvpx -lm
-lpthread -lm -lrt
- cd src ; ls -al "$BINARIUM_BIN" "$BINARIUM_BIN"_static
- mkdir -p $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries/
- cp -av src/"$BINARIUM_BIN" $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries/
- cp -av src/"$BINARIUM_BIN"_static $CIRCLE_ARTIFACTS/ubuntu_14_04_binaries/
- cd src ; ./"$BINARIUM_BIN"_static :
background: true
- sleep 10
- cd src ; cat ./"$BINARIUM_LOG"
- cd src ; cat ./"$BINARIUM_LOG" | grep '\-\-MyToxID\-\-:' | cut -d':' -f 3
- sleep 10
#- sleep 240
- cd src ; cat ./"$BINARIUM_LOG"