@@ -34,17 +34,22 @@ 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+ DEBIAN_FRONTEND : noninteractive
48+ NEEDRESTART_MODE : l
4549 command : |
4650 sudo apt-get update
47- sudo apt-get install -y zlib1g-dev
51+ sudo apt-get install -y clang docker-compose zlib1g-dev
52+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
4853
4954jobs :
5055 fmt :
@@ -186,7 +191,9 @@ jobs:
186191 - --set redpanda.auto_create_topics_enabled=false
187192 - image : serjs/go-socks5-proxy
188193 name : proxy
189- resource_class : xlarge # use of a smaller executor tends crashes on link
194+ environment :
195+ - REQUIRE_AUTH=false
196+ resource_class : xlarge # use of a smaller executor tends crashes on link
190197 environment :
191198 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
192199 CARGO_INCREMENTAL : " 0"
@@ -207,9 +214,9 @@ jobs:
207214 SOCKS_PROXY : " proxy:1080"
208215 steps :
209216 - checkout
217+ - install_packages
210218 - rust_components
211219 - cache_restore
212- - install_packages
213220 - run :
214221 name : Cargo test
215222 command : cargo test --all-features --all-targets
@@ -222,59 +229,9 @@ jobs:
222229 path : proptest-regressions
223230
224231 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
232+ machine :
233+ image : default
234+ resource_class : xlarge # use of a smaller executor tends crashes on link
278235 environment :
279236 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
280237 CARGO_INCREMENTAL : " 0"
@@ -291,14 +248,18 @@ jobs:
291248 TEST_JAVA_INTEROPT : 1
292249 # Don't use the first node here since this is likely the controller and we want to ensure that we automatically
293250 # 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"
251+ KAFKA_CONNECT : " invalid:9093,kafka-1:9021 "
252+ KAFKA_SASL_CONNECT : kafka-1:9097
253+ SOCKS_PROXY : " localhost :1080"
297254 steps :
298255 - checkout
256+ - install_packages
299257 - rust_components
300258 - cache_restore
301- - install_packages
259+ - run :
260+ name : start container
261+ command : docker-compose -f docker-compose-kafka.yml up
262+ background : true
302263 - run :
303264 name : Cargo test
304265 command : cargo test --all-features --all-targets
@@ -314,7 +275,7 @@ jobs:
314275 build-default-features :
315276 docker :
316277 - image : quay.io/influxdb/rust:ci
317- resource_class : xlarge # use of a smaller executor tends crashes on link
278+ resource_class : xlarge # use of a smaller executor tends crashes on link
318279 environment :
319280 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
320281 CARGO_INCREMENTAL : " 0"
@@ -336,7 +297,7 @@ jobs:
336297 build-no-default-features :
337298 docker :
338299 - image : quay.io/influxdb/rust:ci
339- resource_class : xlarge # use of a smaller executor tends crashes on link
300+ resource_class : xlarge # use of a smaller executor tends crashes on link
340301 environment :
341302 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
342303 CARGO_INCREMENTAL : " 0"
@@ -358,7 +319,7 @@ jobs:
358319 build-all-features :
359320 docker :
360321 - image : quay.io/influxdb/rust:ci
361- resource_class : xlarge # use of a smaller executor tends crashes on link
322+ resource_class : xlarge # use of a smaller executor tends crashes on link
362323 environment :
363324 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
364325 CARGO_INCREMENTAL : " 0"
@@ -376,12 +337,11 @@ jobs:
376337 command : cargo build --all-features
377338 - cache_save
378339
379-
380340 # Builds fuzzing.
381341 build-fuzz :
382342 docker :
383343 - image : quay.io/influxdb/rust:ci
384- resource_class : xlarge # use of a smaller executor tends crashes on link
344+ resource_class : xlarge # use of a smaller executor tends crashes on link
385345 environment :
386346 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
387347 CARGO_INCREMENTAL : " 0"
@@ -409,7 +369,7 @@ jobs:
409369 run-fuzz :
410370 docker :
411371 - image : quay.io/influxdb/rust:ci
412- resource_class : xlarge # use of a smaller executor tends crashes on link
372+ resource_class : xlarge # use of a smaller executor tends crashes on link
413373 environment :
414374 # Disable incremental compilation to avoid overhead. We are not preserving these files anyway.
415375 CARGO_INCREMENTAL : " 0"
0 commit comments