Skip to content

Commit 5e0067b

Browse files
authored
fixed musl conflict (#81)
Signed-off-by: [email protected] <[email protected]>
1 parent bd7559c commit 5e0067b

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.github/workflows/master.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- uses: actions/checkout@v2
2323
- run: sudo apt-get update
2424
if: matrix.target == 'x86_64-unknown-linux-musl'
25-
- run: sudo apt-get install -y musl musl-dev musl-tools
25+
- run: sudo apt-get install -y musl musl-dev musl-tools cmake
2626
if: matrix.target == 'x86_64-unknown-linux-musl'
2727
- name: Cache cargo registry
2828
uses: actions/cache@v1
@@ -59,20 +59,25 @@ jobs:
5959
toolchain: ${{ matrix.toolchain }}
6060
args: --target ${{ matrix.target }} --workspace
6161

62-
# If musl, compile and test all excluding kafka
62+
# If musl, compile and test all
6363
- uses: actions-rs/cargo@v1
6464
if: matrix.target == 'x86_64-unknown-linux-musl'
6565
with:
6666
command: build
6767
toolchain: ${{ matrix.toolchain }}
68-
args: --target ${{ matrix.target }} --workspace --exclude cloudevents-sdk-rdkafka
68+
args: --target ${{ matrix.target }} --workspace
69+
env:
70+
CC: musl-gcc
71+
CXX: g++
6972
- uses: actions-rs/cargo@v1
7073
if: matrix.target == 'x86_64-unknown-linux-musl'
7174
with:
7275
command: test
7376
toolchain: ${{ matrix.toolchain }}
74-
args: --target ${{ matrix.target }} --workspace --exclude cloudevents-sdk-rdkafka
75-
77+
args: --target ${{ matrix.target }} --workspace
78+
env:
79+
CC: musl-gcc
80+
CXX: g++
7681
# If wasm, then we test only the main module and cloudevents-sdk-reqwest
7782
- uses: actions-rs/cargo@v1
7883
if: matrix.target == 'wasm32-unknown-unknown'

cloudevents-sdk-rdkafka/Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ readme = "README.md"
1515
bytes = "^0.5"
1616
cloudevents-sdk = { version = "0.2.0", path = ".." }
1717
lazy_static = "1.4.0"
18-
rdkafka = "^0.23"
18+
rdkafka = { version = "^0.24", features = ["cmake-build"] }
19+
1920

2021
[dev-dependencies]
2122
url = { version = "^2.1" }

cloudevents-sdk-rdkafka/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
//!
88
//! use cloudevents::Event;
99
//! use rdkafka::producer::{FutureProducer, FutureRecord};
10+
//! use rdkafka::util::Timeout;
1011
//! use cloudevents_sdk_rdkafka::{MessageRecord, FutureRecordExt};
1112
//!
1213
//! # async fn produce(producer: &FutureProducer, event: Event) {
@@ -17,7 +18,7 @@
1718
//! FutureRecord::to("topic")
1819
//! .key("some_event")
1920
//! .message_record(&message_record),
20-
//! 0
21+
//! Timeout::Never
2122
//! ).await;
2223
//!
2324
//! # }

0 commit comments

Comments
 (0)