File tree Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Expand file tree Collapse file tree 2 files changed +28
-28
lines changed Original file line number Diff line number Diff line change @@ -130,6 +130,34 @@ jobs:
130
130
~/.cargo/git
131
131
target
132
132
key : ${{ runner.os }}-cargo-${{ matrix.target }}-kafka-${{ hashFiles('**/Cargo.lock') }}
133
+
134
+ - name : Find and fix librdkafka CMakeLists.txt
135
+ run : |
136
+ # Download the package first so it's in the registry
137
+ cargo fetch
138
+
139
+ # Find the rdkafka-sys package directory
140
+ RDKAFKA_SYS_DIR=$(find ~/.cargo/registry/src -name "rdkafka-sys-*" -type d | head -n 1)
141
+ echo "Found rdkafka-sys at: $RDKAFKA_SYS_DIR"
142
+
143
+ # Find the librdkafka CMakeLists.txt file
144
+ CMAKE_FILE="$RDKAFKA_SYS_DIR/librdkafka/CMakeLists.txt"
145
+
146
+ if [ -f "$CMAKE_FILE" ]; then
147
+ echo "Found CMakeLists.txt at: $CMAKE_FILE"
148
+
149
+ # Make a backup of the original file
150
+ cp "$CMAKE_FILE" "$CMAKE_FILE.bak"
151
+
152
+ # Replace the minimum required version
153
+ sed -i 's/cmake_minimum_required(VERSION 3.2)/cmake_minimum_required(VERSION 3.5)/' "$CMAKE_FILE"
154
+
155
+ echo "Modified CMakeLists.txt - before and after comparison:"
156
+ diff "$CMAKE_FILE.bak" "$CMAKE_FILE" || true
157
+ else
158
+ echo "Could not find librdkafka CMakeLists.txt file!"
159
+ exit 1
160
+ fi
133
161
134
162
- name : Build with Kafka
135
163
uses : actions-rs/cargo@v1
Original file line number Diff line number Diff line change 62
62
exit 1
63
63
fi
64
64
65
- - name : Find and fix librdkafka CMakeLists.txt
66
- run : |
67
- # Download the package first so it's in the registry
68
- cargo fetch
69
-
70
- # Find the rdkafka-sys package directory
71
- RDKAFKA_SYS_DIR=$(find ~/.cargo/registry/src -name "rdkafka-sys-*" -type d | head -n 1)
72
- echo "Found rdkafka-sys at: $RDKAFKA_SYS_DIR"
73
-
74
- # Find the librdkafka CMakeLists.txt file
75
- CMAKE_FILE="$RDKAFKA_SYS_DIR/librdkafka/CMakeLists.txt"
76
-
77
- if [ -f "$CMAKE_FILE" ]; then
78
- echo "Found CMakeLists.txt at: $CMAKE_FILE"
79
-
80
- # Make a backup of the original file
81
- cp "$CMAKE_FILE" "$CMAKE_FILE.bak"
82
-
83
- # Replace the minimum required version
84
- sed -i 's/cmake_minimum_required(VERSION 3.2)/cmake_minimum_required(VERSION 3.5)/' "$CMAKE_FILE"
85
-
86
- echo "Modified CMakeLists.txt - before and after comparison:"
87
- diff "$CMAKE_FILE.bak" "$CMAKE_FILE" || true
88
- else
89
- echo "Could not find librdkafka CMakeLists.txt file!"
90
- exit 1
91
- fi
92
-
93
65
- name : Check with clippy
94
66
run : cargo hack clippy --verbose --each-feature --no-dev-deps -- -D warnings
95
67
You can’t perform that action at this time.
0 commit comments