From 5ab42d41209ffe718b5fcf0265249578b73ca099 Mon Sep 17 00:00:00 2001 From: iphydf Date: Fri, 24 Jan 2025 14:11:26 +0000 Subject: [PATCH] chore: Move most cirrus jobs to circleci. Cirrus is very expensive now. We need to make our builds cheaper before we can use it more. For now, only the build that can't move out will stay, i.e. the FreeBSD VM one. --- .circleci/config.yml | 28 +++++++++ .cirrus.yml | 133 +++++++++++-------------------------------- 2 files changed, 61 insertions(+), 100 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 264139ada2..914e426023 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,10 +7,12 @@ workflows: jobs: - bazel-asan - bazel-dbg + - bazel-msan - bazel-opt - clang-analyze - cpplint - static-analysis + - cimple - cimplefmt - generate-events @@ -35,6 +37,16 @@ jobs: - run: .circleci/bazel-test //c-toxcore/... + bazel-msan: + working_directory: /tmp/cirrus-ci-build + docker: + - image: toxchat/toktok-stack:latest-msan + + steps: + - checkout + - run: .circleci/bazel-test + //c-toxcore/auto_tests:lossless_packet_test + bazel-opt: working_directory: /tmp/cirrus-ci-build docker: @@ -106,6 +118,22 @@ jobs: - run: git submodule update --init --recursive - run: other/analysis/run-cpplint + cimple: + working_directory: /tmp/cirrus-ci-build + docker: + - image: toxchat/toktok-stack:latest-release + + steps: + - checkout + - run: git submodule update --init --recursive + - run: cd /src/workspace && + bazel test + -k + --build_tag_filters=haskell + --test_tag_filters=haskell + -- + //c-toxcore/... + cimplefmt: working_directory: ~/work machine: { image: ubuntu-2204:current } diff --git a/.cirrus.yml b/.cirrus.yml index d434f093db..6c0163c4c7 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,100 +1,33 @@ ---- -bazel-opt_task: - timeout_in: 10m - container: - image: toxchat/toktok-stack:latest-release - cpu: 8 - memory: 2G - configure_script: - - git submodule update --init --recursive - - /src/workspace/tools/inject-repo c-toxcore - test_all_script: - - cd /src/workspace && tools/retry 5 bazel - test -k - --build_tag_filters=-haskell - --test_tag_filters=-haskell - -- - //c-toxcore/... - -//c-toxcore/auto_tests:tcp_relay_test # Cirrus doesn't allow external network connections. - -bazel-dbg_task: - timeout_in: 10m - container: - image: toxchat/toktok-stack:latest-debug - cpu: 8 - memory: 2G - configure_script: - - git submodule update --init --recursive - - /src/workspace/tools/inject-repo c-toxcore - test_all_script: - - cd /src/workspace && tools/retry 5 bazel - test -k - --build_tag_filters=-haskell - --test_tag_filters=-haskell - -- - //c-toxcore/... - -//c-toxcore/auto_tests:tcp_relay_test # Cirrus doesn't allow external network connections. - -bazel-msan_task: - timeout_in: 10m - container: - image: toxchat/toktok-stack:latest-msan - cpu: 4 - memory: 2G - configure_script: - - git submodule update --init --recursive - - /src/workspace/tools/inject-repo c-toxcore - test_all_script: - - cd /src/workspace && tools/retry 5 bazel - test -k - -- - //c-toxcore/auto_tests:lossless_packet_test - -cimple_task: - timeout_in: 5m - container: - image: toxchat/toktok-stack:latest-release - cpu: 2 - memory: 4G - configure_script: - - git submodule update --init --recursive - - /src/workspace/tools/inject-repo c-toxcore - test_all_script: - - cd /src/workspace && bazel - test -k - --build_tag_filters=haskell - --test_tag_filters=haskell - -- - //c-toxcore/... - -freebsd_task: - timeout_in: 5m - freebsd_instance: - image_family: freebsd-14-1 - configure_script: - - PAGER=cat ASSUME_ALWAYS_YES=YES pkg install - cmake - git - gmake - googletest - libconfig - libsodium - libvpx - ninja - opus - pkgconf - - git submodule update --init --recursive - test_all_script: - - | - # TODO(iphydf): Investigate FreeBSD failures on these tests. - sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt - cmake . \ - -DMIN_LOGGER_LEVEL=TRACE \ - -DMUST_BUILD_TOXAV=ON \ - -DNON_HERMETIC_TESTS=OFF \ - -DTEST_TIMEOUT_SECONDS=50 \ - -DUSE_IPV6=OFF \ - -DAUTOTEST=ON \ - -GNinja - cmake --build . --target install - ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:3 || ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:3 +# TODO(iphydf): Reactivate when we have quota again in February 2025. +# --- +# freebsd_task: +# timeout_in: 5m +# freebsd_instance: +# image_family: freebsd-14-1 +# configure_script: +# - PAGER=cat ASSUME_ALWAYS_YES=YES pkg install +# cmake +# git +# gmake +# googletest +# libconfig +# libsodium +# libvpx +# ninja +# opus +# pkgconf +# - git submodule update --init --recursive +# test_all_script: +# - | +# # TODO(iphydf): Investigate FreeBSD failures on these tests. +# sed -Ei -e '/\(dht_getnodes_api\)/s/^/#/' auto_tests/CMakeLists.txt +# cmake . \ +# -DMIN_LOGGER_LEVEL=TRACE \ +# -DMUST_BUILD_TOXAV=ON \ +# -DNON_HERMETIC_TESTS=OFF \ +# -DTEST_TIMEOUT_SECONDS=50 \ +# -DUSE_IPV6=OFF \ +# -DAUTOTEST=ON \ +# -GNinja +# cmake --build . --target install +# ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:3 || ctest -j50 --output-on-failure --rerun-failed --repeat until-pass:3