@@ -34,17 +34,21 @@ commands:
3434 - save_cache :
3535 name : Save Cargo Cache
3636 paths :
37- - /usr/local/ cargo/registry
37+ - ~/. cargo/registry
3838 key : cargo-cache-{{ arch }}-{{ .Branch }}-{{ checksum "Cargo.toml" }}
3939
4040 install_packages :
41- description : Install zlib-dev
41+ description : Install packages
4242 steps :
4343 - run :
44- name : Install zlib-dev
44+ name : Install packages
45+ environment :
46+ # Keep Ubuntu from doing stupid things
47+ NEEDRESTART_MODE : l
4548 command : |
4649 sudo apt-get update
47- sudo apt-get install -y zlib1g-dev
50+ sudo apt-get install -y clang docker-compose zlib1g-dev
51+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
4852
4953jobs :
5054 fmt :
@@ -186,7 +190,9 @@ jobs:
186190 - --set redpanda.auto_create_topics_enabled=false
187191 - image : serjs/go-socks5-proxy
188192 name : proxy
189- resource_class : xlarge # use of a smaller executor tends crashes on link
193+ environment :
194+ - REQUIRE_AUTH=false
195+ resource_class : xlarge # use of a smaller executor tends crashes on link
190196 environment :
191197 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
192198 CARGO_INCREMENTAL : " 0"
@@ -207,9 +213,9 @@ jobs:
207213 SOCKS_PROXY : " proxy:1080"
208214 steps :
209215 - checkout
216+ - install_packages
210217 - rust_components
211218 - cache_restore
212- - install_packages
213219 - run :
214220 name : Cargo test
215221 command : cargo test --all-features --all-targets
@@ -222,59 +228,9 @@ jobs:
222228 path : proptest-regressions
223229
224230 test-kafka :
225- # setup multiple docker images (see https://circleci.com/docs/2.0/configuration-reference/#docker)
226- docker :
227- - image : quay.io/influxdb/rust:ci
228- - image : docker.io/bitnami/zookeeper:3.7
229- name : zookeeper
230- environment :
231- - ALLOW_ANONYMOUS_LOGIN=yes
232- - image : docker.io/bitnami/kafka:3.9.0
233- name : kafka-0
234- environment :
235- - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
236- - KAFKA_CFG_BROKER_ID=0
237- - ALLOW_PLAINTEXT_LISTENER=yes
238- - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT,SECURE:SASL_PLAINTEXT
239- - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093,SECURE://:9094
240- - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka-0:9092,EXTERNAL://kafka-0:9093,SECURE://kafka-0:9094
241- - KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
242- - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
243- - KAFKA_CLIENT_USERS=admin
244- - KAFKA_CLIENT_PASSWORDS=admin-secret
245- - KAFKA_CLIENT_LISTENER_NAME=SECURE
246- - image : docker.io/bitnami/kafka:3.9.0
247- name : kafka-1
248- environment :
249- - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
250- - KAFKA_CFG_BROKER_ID=1
251- - ALLOW_PLAINTEXT_LISTENER=yes
252- - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT,SECURE:SASL_PLAINTEXT
253- - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093,SECURE://:9094
254- - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka-1:9092,EXTERNAL://kafka-1:9093,SECURE://kafka-1:9094
255- - KAFKA_CFG_SASL_ENABLED_MECHANISMS=PLAIN
256- - KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
257- - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
258- - KAFKA_CLIENT_USERS=admin
259- - KAFKA_CLIENT_PASSWORDS=admin-secret
260- - KAFKA_CLIENT_LISTENER_NAME=SECURE
261- - image : docker.io/bitnami/kafka:3.9.0
262- name : kafka-2
263- environment :
264- - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181
265- - KAFKA_CFG_BROKER_ID=2
266- - ALLOW_PLAINTEXT_LISTENER=yes
267- - KAFKA_CFG_LISTENER_SECURITY_PROTOCOL_MAP=CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT,SECURE:SASL_PLAINTEXT
268- - KAFKA_CFG_LISTENERS=CLIENT://:9092,EXTERNAL://:9093,SECURE://:9094
269- - KAFKA_CFG_ADVERTISED_LISTENERS=CLIENT://kafka-2:9092,EXTERNAL://kafka-2:9093,SECURE://kafka-2:9094
270- - KAFKA_INTER_BROKER_LISTENER_NAME=CLIENT
271- - KAFKA_CFG_AUTO_CREATE_TOPICS_ENABLE=false
272- - KAFKA_CLIENT_USERS=admin
273- - KAFKA_CLIENT_PASSWORDS=admin-secret
274- - KAFKA_CLIENT_LISTENER_NAME=SECURE
275- - image : serjs/go-socks5-proxy
276- name : proxy
277- resource_class : xlarge # use of a smaller executor tends crashes on link
231+ machine :
232+ image : default
233+ resource_class : xlarge # use of a smaller executor tends crashes on link
278234 environment :
279235 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
280236 CARGO_INCREMENTAL : " 0"
@@ -291,14 +247,18 @@ jobs:
291247 TEST_JAVA_INTEROPT : 1
292248 # Don't use the first node here since this is likely the controller and we want to ensure that we automatically
293249 # pick the controller for certain actions (e.g. topic creation) and don't just get lucky.
294- KAFKA_CONNECT : " invalid:9093,kafka-1:9093 "
295- KAFKA_SASL_CONNECT : kafka-1:9094
296- SOCKS_PROXY : " proxy :1080"
250+ KAFKA_CONNECT : " invalid:9093,kafka-1:9021 "
251+ KAFKA_SASL_CONNECT : kafka-1:9097
252+ SOCKS_PROXY : " localhost :1080"
297253 steps :
298254 - checkout
255+ - install_packages
299256 - rust_components
300257 - cache_restore
301- - install_packages
258+ - run :
259+ name : start container
260+ command : docker-compose -f docker-compose-kafka.yml up
261+ background : true
302262 - run :
303263 name : Cargo test
304264 command : cargo test --all-features --all-targets
@@ -314,7 +274,7 @@ jobs:
314274 build-default-features :
315275 docker :
316276 - image : quay.io/influxdb/rust:ci
317- resource_class : xlarge # use of a smaller executor tends crashes on link
277+ resource_class : xlarge # use of a smaller executor tends crashes on link
318278 environment :
319279 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
320280 CARGO_INCREMENTAL : " 0"
@@ -336,7 +296,7 @@ jobs:
336296 build-no-default-features :
337297 docker :
338298 - image : quay.io/influxdb/rust:ci
339- resource_class : xlarge # use of a smaller executor tends crashes on link
299+ resource_class : xlarge # use of a smaller executor tends crashes on link
340300 environment :
341301 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
342302 CARGO_INCREMENTAL : " 0"
@@ -358,7 +318,7 @@ jobs:
358318 build-all-features :
359319 docker :
360320 - image : quay.io/influxdb/rust:ci
361- resource_class : xlarge # use of a smaller executor tends crashes on link
321+ resource_class : xlarge # use of a smaller executor tends crashes on link
362322 environment :
363323 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
364324 CARGO_INCREMENTAL : " 0"
@@ -376,12 +336,11 @@ jobs:
376336 command : cargo build --all-features
377337 - cache_save
378338
379-
380339 # Builds fuzzing.
381340 build-fuzz :
382341 docker :
383342 - image : quay.io/influxdb/rust:ci
384- resource_class : xlarge # use of a smaller executor tends crashes on link
343+ resource_class : xlarge # use of a smaller executor tends crashes on link
385344 environment :
386345 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
387346 CARGO_INCREMENTAL : " 0"
@@ -409,7 +368,7 @@ jobs:
409368 run-fuzz :
410369 docker :
411370 - image : quay.io/influxdb/rust:ci
412- resource_class : xlarge # use of a smaller executor tends crashes on link
371+ resource_class : xlarge # use of a smaller executor tends crashes on link
413372 environment :
414373 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
415374 CARGO_INCREMENTAL : " 0"
0 commit comments