Commit Graph

35 Commits

Author SHA1 Message Date
iphydf
ee154da4a9
refactor: Use cmp instead of msgpack-c for events packing.
This library is better in every way.
2022-03-26 23:57:15 +00:00
iphydf
1928704065
test: Add fuzzer tests to the bazel build. 2022-03-25 18:48:41 +00:00
iphydf
2cc8dafd4c
cleanup: Remove redundant Messenger and DHT tests.
These don't test anything that isn't covered by higher level tox tests.
These are also not unit tests and have never found any bug that wasn't
also caught by other tests. This makes them a pure maintenance burden.
2022-03-03 21:17:03 +00:00
iphydf
d46091072d
chore: Remove msan from all CIs except circleci.
It doesn't work yet and is wasting CI resources.
2022-02-18 22:21:01 +00:00
iphydf
2e7c5b4b24
chore: Use latest instead of versioned toktok-stack image. 2022-01-30 19:15:30 +00:00
iphydf
b6f48b3b7d
chore: Rename bazel-release to -opt and -debug to -dbg. 2022-01-29 22:21:13 +00:00
iphydf
d23222c92f
chore: Run static analysers in multiple variants.
Currently: 1) libsodium and 2) nacl.

Note that the "nacl" variant is actually libsodium. We just want to make
sure the static analysers see the `VANILLA_NACL` code paths.
2022-01-14 10:45:11 +00:00
iphydf
4a2cb37e4b
fix: Fix some uninitialised memory errors found by valgrind and msan.
Also added a valgrind build to run it on every pull request. I've had to
disable a few tests because valgrind makes those run infinitely slowly,
consistently timing them out.
2022-01-13 20:15:21 +00:00
iphydf
46a443f188
chore: Ignore failures from bazel-tsan and bazel-asan.
Also increased memory limits so it doesn't OOM.
2022-01-13 00:36:34 +00:00
iphydf
685b78d31d
chore: Add asan/tsan bazel builds.
These have all dependencies built with asan/tsan, so they can do deeper
sanity checks such as checking what opus is doing with our buffers.

The asan check currently fails for me locally, so these are not yet set
to be required for PRs to be merged.
2022-01-12 20:33:21 +00:00
iphydf
eebc516d55
chore: Disable the OpenMP cracker in bazel for now.
I broke it. I'll re-enable it if/when I fix omp support in the bazel
build.
2022-01-11 13:29:53 +00:00
iphydf
277f512dbb
chore: Add bazel-debug build.
This has in the already found real bugs that only happen when compiling
with stack protector and no optimisations.
2022-01-02 03:15:39 +00:00
iphydf
6f61de54d3
chore: Add "tcc" and "compcert" compiler targets.
It's nice we are able to compile with `tcc`. Let's not break that.
CompCert is also neat, but its interpreter mode doesn't work on tox, so
we only use the compiler.
2021-12-30 23:09:23 +00:00
iphydf
29eb3dd490
chore: Remove apidsl comment from tox.h.
There is no more apidsl, so you can edit tox.h manually now.
2021-12-23 15:33:03 +00:00
iphydf
2f546a9710
chore: Rename test source to match standard.
All tests should end in `_test.c` or `_test.cc` for unit tests.
2021-12-23 03:50:16 +00:00
iphydf
24f49fc917
chore: Fix up a few source code comment and style issues.
Tokstyle no longer allows:
* Includes inside an `extern "C"`
* Comments on function definition and declaration to be different.
* Doxygen comments commenting on other doxygen comments.
2021-12-21 18:14:53 +00:00
iphydf
4746a8b3af
cleanup: Remove apidsl; remove crypto_memcmp.
* `crypto_memcmp` was replaced by more specific functions. We never want
  to compare arbitrary amounts of data this way. We use these functions
  to compare key material.
* apidsl has been bothering people, so now we un-bother them. You're
  welcome.
* Added the memlock/unlock functions from the New Group Chats branch.
* Remove some system dependencies in crypto_core_mem.c.
* Renamed UPPERCASE_NAMES to Snake_Camel_Case names.
2021-12-19 19:22:38 +00:00
iphydf
a57f4a5fdf
chore: Update toktok-stack version.
So we can use the latest cimple.
2021-12-16 01:16:21 +00:00
iphydf
af1848ed13
chore: Use toktok-stack docker image with built third_party.
This should cut down the build time a bit by downloading the binaries
built for `//third_party/...`.
2021-12-05 19:21:57 +00:00
iphydf
57b0651ffd
test: Add some unit tests for important internal DHT functions.
We definitely need more of this kind of test so refactorings don't
accidentally break things in ways that happen to still work in auto
tests.
2021-12-01 14:08:37 +00:00
iphydf
99d873b985
chore: Enable cimple tests on cirrus build.
This ensures that we don't break Cimple compatibility despite Travis
being gone (which used to test this).
2021-11-27 02:56:17 +00:00
iphydf
1700334c3b
chore: Upgrade to toktok-stack:0.0.11. 2021-11-25 18:32:50 +00:00
Robin Linden
485fe88253
Get Appveyor and Cirrus CI to pass again
* Fix Appveyor CI build

The problem was that when running commands in powershell, any stderr
output is treated as an "exception", stopping the build even if the exit
code of the command was good.

* Add workarounds to get Cirrus CI to pass

Removing the cache isn't great, but the build is still only 5-7 minues,
so it's not terrible either.

Disabling the tcp_relay test also sucks. It passes locally, so we're
likely getting caught in a firewall or something like it somewhere.
2021-09-17 23:43:09 +02:00
iphydf
7b758f66db
Enable cimple tests by default but allow disabling them.
Use `bazel test //c-toxcore/... --build_tag_filters=-haskell` to run all
tests except the ones that depend on Haskell (i.e. cimple tests).
2020-05-03 14:03:54 +01:00
iphydf
2c45d45133
Fix continuous integration builds. 2020-04-24 14:43:37 +00:00
iphydf
ef7058422e
Smarter setup of bazel remote cache on Cirrus CI.
We now check whether the cache application is reachable and running via
cURL. If it's running, we add the `--config=remote` line.
2020-03-22 20:45:30 +00:00
iphydf
88814e9f1d
Disable bazel remote cache on CI.
code.tox.chat is down.
2020-03-21 20:30:12 +00:00
iphydf
983c2c44fe
Enable remote cache for bazel builds. 2020-03-17 03:21:54 +00:00
iphydf
64bf3695d9
Add a mutex lock/unlock inside every public API function. 2020-03-11 15:21:43 +00:00
iphydf
e35d70af18
Use net_pack/unpack instead of host_to_net.
The latter is doing pretty much the same thing but in a confusing way (it
doesn't change the type of the variable, but does change the semantics).
2020-03-05 22:56:26 +00:00
iphydf
e618829112
Add "cimple_test" to the bazel build. 2020-03-02 15:20:34 +00:00
iphydf
0f7138c010
Upgrade bazel to 2.1.1.
Removed av_test, because it depends on an ancient opencv that starts to
really not exist on modern systems anymore.
2020-03-02 14:23:44 +00:00
Robin Lindén
7418174129
Force IPv4 for cirrus-ci tests 2019-07-21 16:23:33 +02:00
iphydf
a49cbe582d
Fix bazel build version at 0.22.0 for CI.
To make this reproducible. With floating versions (always latest), this
can break any time a new bazel version is released.
2019-03-24 21:59:39 +00:00
iphydf
b694dbc223
Add Cirrus CI configuration.
This CI can run Bazel tests, because it supports IPv6. This is nice,
because now we can run IPv6 tests on every PR.
2018-09-24 22:00:17 +00:00