From 199878f7660f7bb9775a951774c9dc1280b19806 Mon Sep 17 00:00:00 2001 From: iphydf Date: Wed, 19 Feb 2025 23:32:19 +0000 Subject: [PATCH] chore: Use new bazel script for circle ci. --- .circleci/bazel-test | 12 ------------ .circleci/config.yml | 28 ++++++++++++++++------------ auto_tests/proxy_test.c | 6 +++--- other/proxy/proxy_server.go | 4 ++-- 4 files changed, 21 insertions(+), 29 deletions(-) delete mode 100755 .circleci/bazel-test diff --git a/.circleci/bazel-test b/.circleci/bazel-test deleted file mode 100755 index b44119ff01..0000000000 --- a/.circleci/bazel-test +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/sh - -set -eux - -git submodule update --init --recursive -/src/workspace/tools/inject-repo c-toxcore -# TODO(iphydf): Re-enable fuzz-test when https://github.com/tweag/rules_nixpkgs/issues/442 is fixed. -cd /src/workspace && bazel test -k \ - --build_tag_filters=-haskell,-fuzz-test \ - --test_tag_filters=-haskell,-fuzz-test \ - -- \ - "$@" diff --git a/.circleci/config.yml b/.circleci/config.yml index 1dde721b72..2b64161b36 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,9 +6,9 @@ workflows: circleci: jobs: - bazel-asan - - bazel-dbg + - bazel-debug - bazel-msan - - bazel-opt + - bazel-release - clang-analyze - cpplint - static-analysis @@ -20,41 +20,45 @@ jobs: bazel-asan: working_directory: /tmp/cirrus-ci-build docker: - - image: toxchat/toktok-stack:latest-asan + - image: toxchat/toktok-stack:latest steps: - checkout - - run: .circleci/bazel-test + - run: bash <(curl -s https://raw.githubusercontent.com/TokTok/ci-tools/refs/heads/master/tools/circleci-bazel-test) + --build_tag_filters=-haskell,-fuzz-test + --test_tag_filters=-haskell,-fuzz-test //c-toxcore/... - bazel-dbg: + bazel-debug: working_directory: /tmp/cirrus-ci-build docker: - - image: toxchat/toktok-stack:latest-debug + - image: toxchat/toktok-stack:latest steps: - checkout - - run: .circleci/bazel-test + - run: bash <(curl -s https://raw.githubusercontent.com/TokTok/ci-tools/refs/heads/master/tools/circleci-bazel-test) + --build_tag_filters=-haskell + --test_tag_filters=-haskell //c-toxcore/... bazel-msan: working_directory: /tmp/cirrus-ci-build docker: - - image: toxchat/toktok-stack:latest-msan + - image: toxchat/toktok-stack:latest steps: - checkout - - run: .circleci/bazel-test + - run: bash <(curl -s https://raw.githubusercontent.com/TokTok/ci-tools/refs/heads/master/tools/circleci-bazel-test) //c-toxcore/auto_tests:lossless_packet_test - bazel-opt: + bazel-release: working_directory: /tmp/cirrus-ci-build docker: - - image: toxchat/toktok-stack:latest-release + - image: toxchat/toktok-stack:latest steps: - checkout - - run: .circleci/bazel-test + - run: bash <(curl -s https://raw.githubusercontent.com/TokTok/ci-tools/refs/heads/master/tools/circleci-bazel-test) //c-toxcore/... static-analysis: diff --git a/auto_tests/proxy_test.c b/auto_tests/proxy_test.c index 66d6bc9b26..79e3997fdd 100644 --- a/auto_tests/proxy_test.c +++ b/auto_tests/proxy_test.c @@ -60,7 +60,7 @@ int main(int argc, char **argv) c_sleep(100); } - const uint16_t tcp_port = 8082; + const uint16_t tcp_port = 7082; uint32_t index[] = { 1, 2, 3, 4 }; struct Tox_Options *tox_options = tox_options_new(nullptr); @@ -92,7 +92,7 @@ int main(int argc, char **argv) // tox3 has UDP disabled and connects to tox1 via an HTTP proxy tox_options_set_udp_enabled(tox_options, false); tox_options_set_proxy_host(tox_options, "127.0.0.1"); - tox_options_set_proxy_port(tox_options, 8080); + tox_options_set_proxy_port(tox_options, 7080); tox_options_set_proxy_type(tox_options, TOX_PROXY_TYPE_HTTP); Tox *tox3 = tox_new_log(tox_options, nullptr, &index[2]); @@ -101,7 +101,7 @@ int main(int argc, char **argv) // tox4 has UDP disabled and connects to tox1 via a SOCKS5 proxy tox_options_set_udp_enabled(tox_options, false); tox_options_set_proxy_host(tox_options, "127.0.0.1"); - tox_options_set_proxy_port(tox_options, 8081); + tox_options_set_proxy_port(tox_options, 7081); tox_options_set_proxy_type(tox_options, TOX_PROXY_TYPE_SOCKS5); Tox *tox4 = tox_new_log(tox_options, nullptr, &index[3]); diff --git a/other/proxy/proxy_server.go b/other/proxy/proxy_server.go index 04d9b2f32b..9bf927c296 100644 --- a/other/proxy/proxy_server.go +++ b/other/proxy/proxy_server.go @@ -15,8 +15,8 @@ import ( const ( debug = false - httpAddr = ":8080" - socks5Addr = ":8081" + httpAddr = ":7080" + socks5Addr = ":7081" ) func handleTunneling(w http.ResponseWriter, r *http.Request) {