Commit Graph

36 Commits

Author SHA1 Message Date
iphydf
0a61d11085
Test a few cmake option combinations before the build.
This takes a few seconds but allows us to cover cases that aren't checked
often.
2017-01-05 12:34:52 +00:00
iphydf
4e731bb435
Fix SSL verification in coveralls. 2017-01-02 23:43:42 +00:00
iphydf
2dc2ac52b9
Fix --enable-logging flag in autotools configure script.
We also never really tested this, because we run make distcheck, which
does another configure with default flags instead of the ones we passed.

Fixes #317.
2016-12-13 00:52:58 +00:00
iphydf
d8ae726d0a Don't build nTox by default.
Build it on Travis. It won't be built on the windows builds regardless
of having it enabled globally.

Fixes #292.
2016-12-05 22:02:30 +00:00
Maxim Biro
f0f53dbd55 Don't error on warnings by default
Having -Werror set by default causes users' builds to fail because
toxcore is not warning-free. Failing on errors is appropriate for the
development phase, e.g. when building it in a CI enviroment, but it
doesn't make much sense to fail builds for users and let them figure out
that they need to pass -DWARNINGS=OFF to make the library build.
2016-11-28 15:13:01 -05:00
iphydf
b2dd50f9fc
Work around Travis issue that causes build failures.
Travis seems to no longer set $TERM, which breaks opam. We now manually
set it to some hopefully sane value.
2016-11-10 23:45:48 +00:00
endoffile78
3f53090c1d
Remove assoc 2016-11-06 09:14:53 -06:00
iphydf
7b6b47a610
Enable address sanitizer on the cmake build. 2016-11-06 12:19:34 +00:00
iphydf
96c672aef5
Compile as C++ for windows builds.
Compiling as C++ changes nothing semantically, but ensures that we don't
break C++ compatibility while also retaining C compatibility.

C++ compatibility is useful for tooling and additional diagnostics and
analyses.
2016-11-02 18:50:41 +00:00
iphydf
de966cdf90
Error if format_test can't be executed.
This ensures that on Travis, format_test will always be executed, or the
build fails.
2016-10-26 13:34:29 +01:00
iphydf
0fb79c54b8
Set log level for DEBUG=ON to LOG_DEBUG.
We use TRACE=ON (cmake flag) to enable LOG_TRACE. This way, a regular
build can enable DEBUG while not paying the price of TRACE. This is
particularly important for FFI bindings (especially Python), where
invoking callbacks can be an expensive operation.
2016-10-06 15:15:42 +01:00
Maxim Biro
02e9cd38f1 Add option to build tox-bootstrapd
When cross-compiling to <target> from Linux, cmake might find native Linux
libconfig and decide to build tox-bootstrapd. If the target is Windows, this
will fail, as tox-bootstrapd can't be built for Windows in the first place. If
the target is Linux of some other architecture, then using host native
libconfig will fail too. Thus an option is needed to guard against this.
2016-10-05 23:47:39 -04:00
Maxim Biro
90123c803a Align things nicer 2016-10-04 15:44:46 -04:00
Maxim Biro
bf42872bb3 Use TEST_TIMEOUT_SECONDS cmake flag on Travis 2016-10-04 15:32:38 -04:00
iphydf
c037100747
Import the hstox SUT interface from hstox.
We'll maintain it in the c-toxcore repo, where it belongs.
2016-10-01 02:13:34 +01:00
iphydf
e59fd26d49
Add OSX and Windows build to travis config.
Tests for Windows are disabled for now, until we figure out which tests
can successfully run on wine and select only those.
2016-09-20 13:52:33 +01:00
iphydf
67ac9138ab
Add STRICT_ABI cmake flag to generate export lists.
Enabling this flag will generate and use an LD version script. It
ensures that the dynamic libraries (libtoxcore.so, libtoxav.so) only
export the symbols that are defined in their public API (tox.h and
toxav.h, respectively).
2016-09-19 19:42:12 +01:00
iphydf
37c041f815
Clean up Travis build a bit in preparation for osx/win. 2016-09-16 11:22:23 +01:00
iphydf
c0d84ab489
Remove format-source from travis script.
This test is already performed by `make test` later on. We originally
had it in the Travis script to make it fail fast when the format is
wrong, but there is also some value in running all tests despite format
errors.

Fixes #83. There are no more relevant phases that would benefit from the
padding lines proposed.
2016-09-16 11:05:54 +01:00
iphydf
2db31d95fd
Use "phase" script for travis build phases.
This is the first step towards unifying travis configs for toxcore,
hstox, and qtox.
2016-09-11 22:13:47 +01:00
iphydf
6683a4b284
Use TokTok's apidsl instead of the iphydf one. 2016-09-11 21:09:41 +01:00
iphydf
254feb0acd
Add address sanitizer option to cmake file. 2016-09-08 10:13:40 +01:00
iphydf
13ae9e9a93
Move logging to a callback.
This removes the global logger (which by the way was deleted when the first tox
was killed, so other toxes would then stop logging). Various bits of the code
now carry a logger or pass it around. It's a bit less transparent now, but now
there is no need to have a global logger, and clients can decide what to log and
where.
2016-08-27 01:16:14 +01:00
iphydf
7075c3648a
Add cmake test for apidsl. 2016-08-24 09:41:40 +01:00
iphydf
f9c83c1084
Build assoc DHT code on travis. 2016-08-20 00:59:22 +01:00
iphydf
c597f67012
Add format-source script.
This is easier to use from a precommit hook, so it can be used to ensure that
all formatting is correct before committing code.
2016-08-20 00:39:18 +01:00
iphydf
a5e35180c7
Make tox_callback_friend_name stateless.
See #27 and #40 for details.
2016-08-18 00:01:53 +01:00
iphydf
db22522741
Add missing DHT_bootstrap to CMakeLists.txt.
- This PR also adds a DEBUG cmake option that enables -DTOX_DEBUG.
- We also remove `-Wall`, because there are too many warnings, and nobody really
  looks at them at the moment. We'll see about fixing them soon. We'll also want
  to enable `-Werror` at some point.
- Finally, this PR enables `-O3` to make sure toxcore still works correctly
  under heavy compiler optimisations.
2016-08-17 22:12:39 +01:00
iphydf
2fc5449870
Try searching for libsodium with pkg-config in ./configure.
If libsodium can't be found with PKG_CHECK_MODULES, try AC_CHECK_LIB. If that
also fails, abort configure. If a user passes --with-libsodium-libs explicitly,
that overrides the pkg-config found location.
2016-08-17 21:28:44 +01:00
iphydf
cebf64a588
Split toxcore into layers.
This allows us to more clearly define interfaces between modules, and have the
linker help us ensure that module boundaries are respected.

The onion/tcp/net_crypto layer is a bit too large. This is due to a cyclic
dependency (onion -> net_crypto -> TCP -> onion). We may or may not want to
break that cycle in the future to allow the onion library to exist on its own
without net_crypto.
2016-08-16 17:36:18 +01:00
iphydf
35932b5381
Add "make install" step to Travis build. 2016-08-12 20:49:50 +02:00
iphydf
f7324f997b
Only report coverage on clang, not on the GCC build. 2016-08-12 01:54:42 +01:00
iphydf
b5cfd33340
Add and use CMake build script
Also, fix the hstox build that was taking half an hour. It now takes 5 minutes.
Also, perform distcheck on travis to ensure that make dist works. It's not
actually failing the build at the moment due to broken tests.
2016-08-12 01:13:11 +01:00
iphydf
459f8f2013
Check code formatting on Travis.
We run astyle on Travis and check if there is a diff. The build terminates if
git finds a difference.
2016-08-12 01:00:00 +01:00
iphydf
8339e3449f
Run hstox test suite against toxcore on Travis. 2016-08-12 00:22:09 +01:00
iphydf
50921070ce
Move toxcore travis build scripts out of .travis.yml.
This is in preparation for having multiple types of build. One of the future
builds will be a hstox build, another may be frama-c or some other static
analyser. It makes sense to split these up into multiple builds, because each of
them can take a while, and running them in parallel will speed things up. Also,
the hstox test coverage should be reported separately from the toxcore auto_test
coverage.
2016-08-12 00:07:05 +01:00