From af1848ed13d2aa3a7fc218de1d0633e99814efec Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 3 Dec 2021 16:20:10 +0000 Subject: [PATCH] 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/...`. --- .cirrus.yml | 12 +++++------- toxav/toxav.c | 2 +- toxcore/DHT.h | 2 +- toxcore/TCP_connection.h | 2 +- toxcore/friend_connection.h | 2 +- toxcore/network.c | 2 +- 6 files changed, 10 insertions(+), 12 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 17dbb186..23dd9df0 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,16 +1,13 @@ --- cirrus-ci_task: container: - image: toxchat/toktok-stack:0.0.18 + image: toxchat/toktok-stack:0.0.23-third_party cpu: 2 memory: 2G configure_script: - /src/workspace/tools/inject-repo c-toxcore - # Work around "FATAL: corrupt installation: file '/home/builder/.cache/bazel/_bazel_builder/install/f439a981a1e06f45be981c123f9858d5/A-server.jar' is missing or modified" - # Clearing the cache through the Cirrus web UI doesn't fix, but this does. - - rm -rf /home/builder/.cache/bazel/ test_all_script: - - bazel test -k + - cd /src/workspace && bazel test -k --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST --build_tag_filters=-haskell --test_tag_filters=-haskell @@ -22,15 +19,16 @@ cirrus-ci_task: cimple_task: container: - image: toxchat/toktok-stack:0.0.18 + image: toxchat/toktok-stack:0.0.23-third_party cpu: 2 memory: 4G configure_script: - /src/workspace/tools/inject-repo c-toxcore test_all_script: - - bazel test -k + - cd /src/workspace && bazel test -k --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST --build_tag_filters=haskell --test_tag_filters=haskell + --config=release -- //c-toxcore/... diff --git a/toxav/toxav.c b/toxav/toxav.c index 2e2e8b07..3a46f0bb 100644 --- a/toxav/toxav.c +++ b/toxav/toxav.c @@ -24,7 +24,7 @@ // TODO(zoff99): don't hardcode this, let the application choose it // VPX Info: Time to spend encoding, in microseconds (it's a *soft* deadline) -#define WANTED_MAX_ENCODER_FPS (40) +#define WANTED_MAX_ENCODER_FPS 40 #define MAX_ENCODE_TIME_US (1000000 / WANTED_MAX_ENCODER_FPS) // to allow x fps #define VIDEO_SEND_X_KEYFRAMES_FIRST 7 // force the first n frames to be keyframes! diff --git a/toxcore/DHT.h b/toxcore/DHT.h index 4f7b012b..fcc67251 100644 --- a/toxcore/DHT.h +++ b/toxcore/DHT.h @@ -24,7 +24,7 @@ extern "C" { /* Maximum number of clients stored per friend. */ #define MAX_FRIEND_CLIENTS 8 -#define LCLIENT_NODES (MAX_FRIEND_CLIENTS) +#define LCLIENT_NODES MAX_FRIEND_CLIENTS #define LCLIENT_LENGTH 128 /* A list of the clients mathematically closest to ours. */ diff --git a/toxcore/TCP_connection.h b/toxcore/TCP_connection.h index f5dd36f4..0ae33045 100644 --- a/toxcore/TCP_connection.h +++ b/toxcore/TCP_connection.h @@ -27,7 +27,7 @@ #define MAX_FRIEND_TCP_CONNECTIONS 6 /* Time until connection to friend gets killed (if it doesn't get locked within that time) */ -#define TCP_CONNECTION_ANNOUNCE_TIMEOUT (TCP_CONNECTION_TIMEOUT) +#define TCP_CONNECTION_ANNOUNCE_TIMEOUT TCP_CONNECTION_TIMEOUT /* The amount of recommended connections for each friend * NOTE: Must be at most (MAX_FRIEND_TCP_CONNECTIONS / 2) */ diff --git a/toxcore/friend_connection.h b/toxcore/friend_connection.h index 2263c8c3..fecd7455 100644 --- a/toxcore/friend_connection.h +++ b/toxcore/friend_connection.h @@ -34,7 +34,7 @@ #define FRIEND_MAX_STORED_TCP_RELAYS (MAX_FRIEND_TCP_CONNECTIONS * 4) /* Max number of tcp relays sent to friends */ -#define MAX_SHARED_RELAYS (RECOMMENDED_FRIEND_TCP_CONNECTIONS) +#define MAX_SHARED_RELAYS RECOMMENDED_FRIEND_TCP_CONNECTIONS /* Interval between the sending of tcp relay information */ #define SHARE_RELAYS_INTERVAL (5 * 60) diff --git a/toxcore/network.c b/toxcore/network.c index c448cb7e..3efa3283 100644 --- a/toxcore/network.c +++ b/toxcore/network.c @@ -310,7 +310,7 @@ IP6 get_ip6_loopback(void) } #ifndef OS_WIN32 -#define INVALID_SOCKET -1 +#define INVALID_SOCKET (-1) #endif const Socket net_invalid_socket = { (int)INVALID_SOCKET };