diff --git a/.github/workflows/build-release.yaml b/.github/workflows/build-release.yaml index 79a89d4..f49a194 100644 --- a/.github/workflows/build-release.yaml +++ b/.github/workflows/build-release.yaml @@ -16,7 +16,7 @@ jobs: tag: ${{ steps.parse-tag.outputs.tag }} steps: - uses: actions/checkout@v3 - - uses: aica-technology/.github/.github/actions/docker-tag-from-git@v0.5.0 + - uses: aica-technology/.github/.github/actions/docker-tag-from-git@v0.6.1 id: parse-tag build: diff --git a/CHANGELOG.md b/CHANGELOG.md index ee87578..9357b74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,24 @@ Release Versions: +- [1.4.0](#140) +- [1.3.0](#130) - [1.2.0](#120) - [1.1.0](#110) - [1.0.0](#100) - [0.2.0](#020) - [0.1.0](#010) +## 1.4.0 + +Version 1.4.0 includes a first stable version of communication interfaces. + +## 1.3.0 + +Version 1.3.0 introduces the first version of the communication_interfaces library, which is a more standalone and +versatile alternative of network_interfaces for socket communication. It doesn't have dependencies on control libraries +or clproto. Additionally, the release includes automated builds for the CI. + ## 1.2.0 Version 1.2.0 is an update to support the latest release of diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a430ed5..e0acf1b 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -set (NETWORK_INTERFACES_VERSION 1.2.0) +set (NETWORK_INTERFACES_VERSION 1.4.0) project(network_interfaces VERSION ${NETWORK_INTERFACES_VERSION}) option(BUILD_TESTING "Build tests." OFF) @@ -40,7 +40,7 @@ include(FindPkgConfig) add_project_dependency(control_libraries 7.0.0 REQUIRED COMPONENTS state_representation) add_project_dependency(clproto 7.0.0 REQUIRED) -if (NOT ${cppzmq_FOUND}) # provided by parent CMakeLists.txt (if used) +if (NOT cppzmq_POPULATED) # provided by parent CMakeLists.txt (if used) add_project_dependency(cppzmq 4.7.1 REQUIRED) endif() diff --git a/python/setup.py b/python/setup.py index 5b7b36f..855abc3 100644 --- a/python/setup.py +++ b/python/setup.py @@ -2,7 +2,7 @@ setuptools.setup( name="network_interfaces", - version="1.2.0", + version="1.4.0", description="This package implements network interfaces of AICA", maintainer="Dominic Reber", maintainer_email="dominic@aica.tech", diff --git a/source/communication_interfaces/CMakeLists.txt b/source/communication_interfaces/CMakeLists.txt index 83d7500..e419509 100644 --- a/source/communication_interfaces/CMakeLists.txt +++ b/source/communication_interfaces/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.15) -set(COMMUNICATION_INTERFACES_VERSION 0.0.1) +set(COMMUNICATION_INTERFACES_VERSION 0.0.2) project(communication_interfaces VERSION ${COMMUNICATION_INTERFACES_VERSION}) option(BUILD_TESTING "Build tests." OFF) @@ -38,12 +38,10 @@ include(GNUInstallDirs) include(CMakePackageConfigHelpers) include(FindPkgConfig) -if (NOT ${cppzmq_FOUND}) # provided by parent CMakeLists.txt (if used) +if (NOT cppzmq_POPULATED) # provided by parent CMakeLists.txt (if used) add_project_dependency(cppzmq 4.7.1 REQUIRED) endif() -include_directories(include) - add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCE_DIR}/src/sockets/UDPSocket.cpp ${PROJECT_SOURCE_DIR}/src/sockets/UDPClient.cpp @@ -55,7 +53,10 @@ add_library(${PROJECT_NAME} SHARED ${PROJECT_SOURCE_DIR}/src/sockets/TCPSocket.cpp ${PROJECT_SOURCE_DIR}/src/sockets/TCPClient.cpp ${PROJECT_SOURCE_DIR}/src/sockets/TCPServer.cpp) -target_include_directories(${PROJECT_NAME} PUBLIC include) +target_include_directories(${PROJECT_NAME} PUBLIC + $ + $ +) target_link_libraries(${PROJECT_NAME} PUBLIC cppzmq) install(DIRECTORY include/ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) @@ -74,6 +75,18 @@ if(BUILD_TESTING) add_test(NAME test_${PROJECT_NAME} COMMAND test_${PROJECT_NAME}) endif() +# export the target and its associated config (includes, linked libraries, etc) +install(TARGETS ${PROJECT_NAME} + EXPORT ${PROJECT_NAME}Targets + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} +) +install(EXPORT ${PROJECT_NAME}Targets + FILE ${PROJECT_NAME}Targets.cmake + DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME} +) # generate the version file for the config file write_basic_package_version_file( diff --git a/source/communication_interfaces/communication_interfaces-config.cmake.in b/source/communication_interfaces/communication_interfaces-config.cmake.in index cc4e2c5..f2d28d9 100644 --- a/source/communication_interfaces/communication_interfaces-config.cmake.in +++ b/source/communication_interfaces/communication_interfaces-config.cmake.in @@ -1,4 +1,5 @@ @PACKAGE_INIT@ include(CMakeFindDependencyMacro) -find_dependency(cppzmq) \ No newline at end of file +find_dependency(cppzmq) +include(${CMAKE_CURRENT_LIST_DIR}/communication_interfacesTargets.cmake) diff --git a/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp b/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp index e9a8d94..dfce313 100644 --- a/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp +++ b/source/communication_interfaces/src/sockets/ZMQSubscriber.cpp @@ -6,9 +6,9 @@ ZMQSubscriber::ZMQSubscriber(ZMQSocketConfiguration configuration) : ZMQSocket(s void ZMQSubscriber::open() { this->socket_ = std::make_shared(*this->config_.context, ZMQ_SUB); - this->open_socket(); this->socket_->set(zmq::sockopt::conflate, 1); this->socket_->set(zmq::sockopt::subscribe, ""); + this->open_socket(); } bool ZMQSubscriber::send_bytes(const std::string&) { diff --git a/source/install.sh b/source/install.sh old mode 100644 new mode 100755