Skip to content

Commit 7eaf32a

Browse files
committed
fixed bugs, enabled osx-arm wheel
Signed-off-by: Krzysztof Milde <[email protected]>
1 parent aa8a87b commit 7eaf32a

15 files changed

Lines changed: 1028 additions & 300 deletions

.github/workflows/conda.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,13 @@ jobs:
8181
- uses: mamba-org/setup-micromamba@v2
8282
with:
8383
micromamba-version: '2.3.2-0'
84-
environment-file: conda/dev-environment-linux.yml
84+
environment-file: conda/dev-environment-unix.yml
8585
init-shell: >-
8686
bash
8787
cache-environment: true
8888
cache-downloads: true
8989
post-cleanup: 'all'
90-
if: ${{ runner.os == 'Linux' }}
91-
92-
- uses: mamba-org/setup-micromamba@v2
93-
with:
94-
micromamba-version: '2.3.2-0'
95-
environment-file: conda/dev-environment-osx.yml
96-
init-shell: >-
97-
bash
98-
cache-environment: true
99-
cache-downloads: true
100-
post-cleanup: 'all'
101-
if: ${{ runner.os == 'macOS' }}
90+
if: ${{ runner.os != 'Windows' }}
10291

10392
- uses: mamba-org/setup-micromamba@v2
10493
with:

conda/dev-environment-osx.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

conda/dev-environment-win.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ channels:
33
- conda-forge
44
- nodefaults
55
dependencies:
6-
# - bison # not available on windows
76
- astor
7+
- avrocpp
8+
# - bison # not available on windows
89
- brotli
910
- bump-my-version
1011
- cmake

cpp/cmake/modules/FindDepsKafkaAdapter.cmake

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,12 @@ cmake_minimum_required(VERSION 3.7.2)
33
if (CSP_USE_VCPKG)
44
find_package(RdKafka CONFIG REQUIRED)
55
find_package(unofficial-avro-cpp CONFIG REQUIRED)
6-
set(CSP_HAVE_AVRO ON)
76
if(NOT WIN32)
87
# Bad, but a temporary workaround for
98
# https://github.com/microsoft/vcpkg/issues/40320
109
link_directories(${VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib)
1110
endif()
1211
else()
1312
find_package(RdKafka REQUIRED)
14-
find_package(Avro QUIET)
15-
if(Avro_FOUND)
16-
set(CSP_HAVE_AVRO ON)
17-
else()
18-
set(CSP_HAVE_AVRO OFF)
19-
message(STATUS "Avro not found - AVRO protocol support will be disabled")
20-
endif()
13+
find_package(Avro REQUIRED)
2114
endif()

cpp/csp/adapters/kafka/CMakeLists.txt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,11 @@ find_package(DepsKafkaAdapter REQUIRED)
2424

2525
target_link_libraries(csp_kafka_adapter PUBLIC csp_adapter_utils RdKafka::rdkafka RdKafka::rdkafka++)
2626

27-
# Link Avro library if available
28-
if(CSP_HAVE_AVRO)
29-
target_compile_definitions(csp_kafka_adapter PUBLIC CSP_HAVE_AVRO)
30-
if(CSP_USE_VCPKG)
31-
target_link_libraries(csp_kafka_adapter PUBLIC unofficial::avro-cpp::avrocpp)
32-
else()
33-
target_link_libraries(csp_kafka_adapter PUBLIC Avro::avrocpp)
34-
endif()
27+
# Link Avro library
28+
if(CSP_USE_VCPKG)
29+
target_link_libraries(csp_kafka_adapter PUBLIC unofficial::avro-cpp::avrocpp)
30+
else()
31+
target_link_libraries(csp_kafka_adapter PUBLIC Avro::avrocpp)
3532
endif()
3633

3734
install(TARGETS csp_kafka_adapter

cpp/csp/adapters/kafka/KafkaPublisher.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
#include <csp/adapters/kafka/KafkaPublisher.h>
44
#include <csp/adapters/utils/MessageWriter.h>
55
#include <csp/adapters/utils/JSONMessageWriter.h>
6-
#ifdef CSP_HAVE_AVRO
76
#include <csp/adapters/utils/AvroMessageWriter.h>
8-
#endif
97

108
#include <librdkafka/rdkafkacpp.h>
119

@@ -20,10 +18,8 @@ KafkaPublisher::KafkaPublisher( KafkaAdapterManager * mgr, const Dictionary & pr
2018
auto protocol = properties.get<std::string>( "protocol" );
2119
if( protocol == "JSON" )
2220
m_msgWriter = std::make_shared<utils::JSONMessageWriter>( properties );
23-
#ifdef CSP_HAVE_AVRO
2421
else if( protocol == "AVRO" )
2522
m_msgWriter = std::make_shared<utils::AvroMessageWriter>( properties );
26-
#endif
2723
else if( protocol != "RAW_BYTES" )
2824
CSP_THROW( NotImplemented, "msg protocol " << protocol << " not currently supported for kafka output adapters" );
2925
}

0 commit comments

Comments
 (0)