Skip to content

Commit

Permalink
cleanup: Remove redundant -DSODIUM_EXPORT from definitions.
Browse files Browse the repository at this point in the history
`-DSODIUM_STATIC` implies `-DSODIUM_EXPORT`.
  • Loading branch information
iphydf committed Sep 11, 2023
1 parent 0cef46e commit 9bcf018
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 64 deletions.
13 changes: 13 additions & 0 deletions .circleci/bazel-test
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

set -eux

git submodule update --init --recursive
/src/workspace/tools/inject-repo c-toxcore
cd /src/workspace && bazel test -k \
--config=remote \
--build_tag_filters=-haskell \
--test_tag_filters=-haskell \
--remote_download_minimal \
-- \
//c-toxcore/...
23 changes: 22 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ workflows:
version: 2
program-analysis:
jobs:
# Dynamic analysis
# Dynamic analysis in the Bazel build
- bazel-asan
- bazel-tsan
# Dynamic analysis with CMake
- asan
- tsan
- msan
Expand All @@ -18,6 +21,24 @@ workflows:
- static-analysis

jobs:
bazel-asan:
working_directory: /tmp/cirrus-ci-build
docker:
- image: toxchat/toktok-stack:latest-asan

steps:
- checkout
- run: .circleci/bazel-test

bazel-tsan:
working_directory: /tmp/cirrus-ci-build
docker:
- image: toxchat/toktok-stack:latest-tsan

steps:
- checkout
- run: .circleci/bazel-test

asan:
working_directory: ~/work
docker:
Expand Down
62 changes: 0 additions & 62 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,68 +35,6 @@ bazel-dbg_task:
//c-toxcore/...
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?

bazel-asan_task:
container:
image: toxchat/toktok-stack:latest-asan
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
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_download_minimal
--
//c-toxcore/...
-//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?

# TODO(iphydf): Enable once this works properly.
#bazel-msan_task:
# container:
# image: toxchat/toktok-stack:latest-msan
# 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
# --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
# --build_tag_filters=-haskell
# --test_tag_filters=-haskell
# --remote_download_minimal
# --
# //c-toxcore/...
# -//c-toxcore/auto_tests:tcp_relay_test # TODO(robinlinden): Why does this pass locally but not in Cirrus?

# TODO(iphydf): Fix test timeouts.
bazel-tsan_task:
container:
image: toxchat/toktok-stack:latest-tsan
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
--remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST
--build_tag_filters=-haskell
--test_tag_filters=-haskell
--remote_download_minimal
--
//c-toxcore/...
-//c-toxcore/auto_tests:conference_av_test
-//c-toxcore/auto_tests:conference_test
-//c-toxcore/auto_tests:file_transfer_test
-//c-toxcore/auto_tests:group_tcp_test
-//c-toxcore/auto_tests:onion_test
-//c-toxcore/auto_tests:tcp_relay_test
-//c-toxcore/auto_tests:tox_many_test

cimple_task:
container:
image: toxchat/toktok-stack:latest-release
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ endif()
if(MSVC)
option(MSVC_STATIC_SODIUM "Whether to link libsodium statically for MSVC" OFF)
if(MSVC_STATIC_SODIUM)
add_definitions(-DSODIUM_STATIC=1 -DSODIUM_EXPORT)
add_definitions(-DSODIUM_STATIC=1)
endif()
endif()

Expand Down

0 comments on commit 9bcf018

Please sign in to comment.