Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ossia-pd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Build
shell: cmd
run: |
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DOSSIA_PD_ONLY=1 -DOSSIA_CI=1 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DOSSIA_PD_ONLY=1 -DOSSIA_CI=1 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build

Expand All @@ -72,7 +72,7 @@ jobs:
- uses: ./.github/actions/latest-ubuntu-toolchain
- name: Build
run: |
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DOSSIA_CI=1 -DCMAKE_BUILD_TYPE=Release -DOSSIA_PD_ONLY=1 -DCMAKE_INSTALL_PREFIX=install
cmake -B build -S ${GITHUB_WORKSPACE} -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DOSSIA_CI=1 -DCMAKE_BUILD_TYPE=Release -DOSSIA_PD_ONLY=1 -DCMAKE_INSTALL_PREFIX=install
cmake --build build
cmake --build build --target install
- name: Archive Package
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ossia-purrdata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Build
shell: cmd
run: |
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DOSSIA_PD_ONLY=1 -DOSSIA_PURR_DATA=1 -DOSSIA_CI=1 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake -B build -S %GITHUB_WORKSPACE% -GNinja -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DOSSIA_PD_ONLY=1 -DOSSIA_PURR_DATA=1 -DOSSIA_CI=1 -DCMAKE_SYSTEM_VERSION=7 -DCMAKE_INSTALL_PREFIX=install -DCMAKE_BUILD_TYPE=Release
cmake --build build
cmake --install build

Expand All @@ -75,6 +75,7 @@ jobs:
run: |
cmake -B build -S ${GITHUB_WORKSPACE} \
-GNinja \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DOSSIA_PURR_DATA=1 \
-DOSSIA_CI=1 \
-DCMAKE_BUILD_TYPE=Release \
Expand Down
2 changes: 1 addition & 1 deletion 3rdparty/fmt
Submodule fmt updated 99 files
+4 −0 .cmake-format
+1 −0 .github/CODEOWNERS
+1 −0 .github/FUNDING.yml
+8 −0 .github/SECURITY.md
+33 −0 .github/workflows/codeql.yml
+3 −3 .github/workflows/doc.yml
+3 −3 .github/workflows/fuzz.yml
+26 −9 .github/workflows/lint.yml
+39 −11 .github/workflows/linux.yml
+6 −6 .github/workflows/macos.yml
+143 −0 .github/workflows/release.yml
+8 −26 .github/workflows/supply-chain.yml
+5 −2 .github/workflows/windows.yml
+1 −0 .gitignore
+351 −290 CMakeLists.txt
+297 −0 ChangeLog.md
+0 −7 LICENSE
+41 −136 README.md
+27 −0 doc/LICENSE-exception
+64 −8 doc/api.md
+1 −0 doc/fmt.css
+10 −3 doc/get-started.md
+1 −1 doc/index.md
+0 −290 doc/python-license.txt
+259 −450 doc/syntax.md
+5 −7 include/fmt/args.h
+270 −320 include/fmt/base.h
+26 −22 include/fmt/chrono.h
+42 −6 include/fmt/color.h
+42 −26 include/fmt/compile.h
+13 −4 include/fmt/core.h
+201 −0 include/fmt/fmt-c.h
+711 −690 include/fmt/format-inl.h
+200 −171 include/fmt/format.h
+9 −18 include/fmt/os.h
+3 −3 include/fmt/ostream.h
+37 −8 include/fmt/printf.h
+61 −44 include/fmt/ranges.h
+182 −79 include/fmt/std.h
+46 −25 include/fmt/xchar.h
+67 −0 src/fmt-c.cc
+7 −5 src/fmt.cc
+2 −2 src/format.cc
+22 −19 src/os.cc
+2 −1 support/AndroidManifest.xml
+33 −35 support/build.gradle
+6 −0 support/cmake-format-requirements.txt
+6 −2 support/cmake/FindSetEnv.cmake
+19 −17 support/cmake/JoinPaths.cmake
+4 −0 support/doc-requirements.in
+502 −0 support/doc-requirements.txt
+8 −0 support/gradle.properties
+6 −0 support/gradle/wrapper/gradle-wrapper.properties
+52 −0 support/llvm-snapshot.gpg.key
+12 −1 support/mkdocs
+267 −148 support/python/mkdocstrings_handlers/cxx/__init__.py
+62 −21 support/release.py
+75 −85 test/CMakeLists.txt
+1 −1 test/args-test.cc
+1 −1 test/assert-test.cc
+17 −15 test/base-test.cc
+112 −0 test/c-test.c
+4 −2 test/chrono-test.cc
+13 −1 test/color-test.cc
+132 −71 test/compile-error-test/CMakeLists.txt
+0 −62 test/compile-fp-test.cc
+51 −14 test/compile-test.cc
+25 −21 test/cuda-test/CMakeLists.txt
+1 −1 test/detect-stdfs.cc
+1 −1 test/enforce-checks-test.cc
+3 −5 test/format-impl-test.cc
+49 −110 test/format-test.cc
+7 −5 test/fuzzing/CMakeLists.txt
+2 −2 test/fuzzing/chrono-duration.cc
+1 −1 test/fuzzing/fuzzer-common.h
+1 −2 test/gtest-extra-test.cc
+1 −1 test/gtest-extra.cc
+1 −1 test/gtest-extra.h
+8 −14 test/gtest/CMakeLists.txt
+1 −1 test/mock-allocator.h
+24 −176 test/module-test.cc
+9 −3 test/no-builtin-types-test.cc
+1 −1 test/noexception-test.cc
+1 −2 test/os-test.cc
+2 −2 test/ostream-test.cc
+3 −3 test/posix-mock-test.cc
+1 −1 test/posix-mock.h
+58 −7 test/printf-test.cc
+1 −1 test/ranges-odr-test.cc
+51 −22 test/ranges-test.cc
+17 −3 test/scan-test.cc
+1 −1 test/scan.h
+112 −9 test/std-test.cc
+1 −1 test/test-assert.h
+1 −1 test/test-main.cc
+1 −1 test/unicode-test.cc
+1 −1 test/util.cc
+1 −1 test/util.h
+34 −6 test/xchar-test.cc
2 changes: 1 addition & 1 deletion 3rdparty/spdlog
Submodule spdlog updated 139 files
2 changes: 0 additions & 2 deletions cmake/deps/fmt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ if(NOT TARGET fmt::fmt)
FMT_LIB_EXPORT=1
PUBLIC
FMT_USE_LONG_DOUBLE=0
FMT_USE_INT128=0
FMT_USE_FLOAT128=0
FMT_STATIC_THOUSANDS_SEPARATOR=1
INTERFACE
Expand All @@ -29,7 +28,6 @@ if(NOT TARGET fmt::fmt)
FMT_HEADER_ONLY=1

FMT_USE_LONG_DOUBLE=0
FMT_USE_INT128=0
FMT_USE_FLOAT128=0
FMT_STATIC_THOUSANDS_SEPARATOR=1
)
Expand Down
1 change: 0 additions & 1 deletion cmake/ossiaConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ else()
target_compile_definitions(ossia::ossia INTERFACE
FMT_HEADER_ONLY=1
FMT_USE_LONG_DOUBLE=0
FMT_USE_INT128=0
FMT_USE_FLOAT128=0
FMT_STATIC_THOUSANDS_SEPARATOR=1

Expand Down
9 changes: 8 additions & 1 deletion src/ossia/network/value/format_value.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@

#include <fmt/ranges.h>
FMT_BEGIN_NAMESPACE
#if FMT_VERSION >= 100000
#if FMT_VERSION >= 120200
// fmt 12 renamed detail::is_container_adaptor_like -> is_container_adaptor and
// promoted it out of the detail namespace into fmt itself.
template <typename T> struct is_container_adaptor<boost::container::flat_set<T>>
: std::false_type {

};
#elif FMT_VERSION >= 100000
namespace detail {
template <typename T> class is_container_adaptor_like<boost::container::flat_set<T>>
: public std::false_type {
Expand Down
26 changes: 23 additions & 3 deletions tests/Network/WSLogger.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ TEST_CASE("test_websockets_log_no_connection", "test_websockets_log_no_connectio

TEST_CASE("test_websockets_log_connection", "test_websockets_log_connection")
{
using namespace std::chrono;
bool opened = false;
bool message = false;
bool closed = false;
Expand All @@ -39,18 +40,37 @@ TEST_CASE("test_websockets_log_connection", "test_websockets_log_connection")
srv.set_close_handler([&](auto&&...) { closed = true; });
srv.listen(5567);

// The client connects from its own thread (websocket_threaded_connection)
// while the server's io_context is pumped from here. On slow or loaded CI
// machines - especially the static Debug Windows build - the cross-thread
// handshake routinely takes longer than the fixed 100ms windows this test
// used to rely on, which led to spurious "opened == false" failures. Pump
// the context until each step is actually observed instead, with a generous
// upper bound so a genuine regression still fails in reasonable time.
auto& io = ctx->context;
auto pump_until = [&](auto&& predicate) {
const auto deadline = steady_clock::now() + seconds(15);
while(!predicate() && steady_clock::now() < deadline)
{
if(io.stopped())
io.restart();
io.run_for(milliseconds(20));
}
};

{
ossia::string_view host = "ws://127.0.0.1:5567";
std::string appname = "foo";

auto con = std::make_shared<ossia::websocket_threaded_connection>(std::string(host));
auto sink = std::make_shared<websocket_log_sink>(con, appname);
auto log = std::make_shared<spdlog::logger>("max_logger", sink);
ctx->context.run_for(std::chrono::milliseconds(100));

pump_until([&] { return opened; });
log->info("helo");
ctx->context.run_for(std::chrono::milliseconds(100));
pump_until([&] { return message; });
}
ctx->context.run_for(std::chrono::milliseconds(100));
pump_until([&] { return closed; });

REQUIRE(opened);
REQUIRE(message);
Expand Down
8 changes: 8 additions & 0 deletions tests/catch/include_catch.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,11 @@
#endif
#include <iostream>
#include <fstream>

#if defined(_WIN32)
#include <winsock2.h>
static const struct ossia_test_winsock_owner {
ossia_test_winsock_owner() { WSADATA d; ::WSAStartup(MAKEWORD(2, 2), &d); }
~ossia_test_winsock_owner() { ::WSACleanup(); }
} ossia_test_winsock_owner_instance;
#endif
Loading