mirror of
https://github.com/Telecominfraproject/wlan-cloud-lib-cppkafka.git
synced 2026-01-27 10:22:42 +00:00
45 lines
1.3 KiB
YAML
45 lines
1.3 KiB
YAML
language: cpp
|
|
|
|
sudo: false
|
|
|
|
compiler:
|
|
- gcc
|
|
- clang
|
|
|
|
env:
|
|
- RDKAFKA_VERSION=v0.9.4
|
|
- RDKAFKA_VERSION=v0.11.5
|
|
|
|
os:
|
|
- linux
|
|
|
|
addons:
|
|
apt:
|
|
packages:
|
|
- libboost-dev
|
|
- libboost-program-options-dev
|
|
- zookeeper
|
|
- zookeeperd
|
|
|
|
before_script:
|
|
- service zookeeper start
|
|
- KAFKA_VERSION=2.11-1.0.0
|
|
- wget http://apache.cs.utah.edu/kafka/1.0.0/kafka_$KAFKA_VERSION.tgz
|
|
- tar xvzf kafka_$KAFKA_VERSION.tgz
|
|
- ./kafka_$KAFKA_VERSION/bin/kafka-server-start.sh ./kafka_$KAFKA_VERSION/config/server.properties > /dev/null 2> /dev/null &
|
|
- git clone https://github.com/edenhill/librdkafka.git
|
|
- while ! echo "asd" | nc localhost 9092; do sleep 1; done
|
|
- ./kafka_$KAFKA_VERSION/bin/kafka-topics.sh --create --zookeeper localhost:2181 --topic cppkafka_test1 --partitions 3 --replication-factor 1
|
|
- ./kafka_$KAFKA_VERSION/bin/kafka-topics.sh --create --zookeeper localhost:2181 --topic cppkafka_test2 --partitions 3 --replication-factor 1
|
|
|
|
script:
|
|
- cd librdkafka
|
|
- git checkout $RDKAFKA_VERSION
|
|
- ./configure --prefix=./install && make libs && make install
|
|
- cd ..
|
|
- mkdir build && cd build
|
|
- cmake .. -DRDKAFKA_ROOT_DIR=../librdkafka/install/ -DKAFKA_TEST_INSTANCE=localhost:9092
|
|
- make examples
|
|
- make tests
|
|
- ./tests/cppkafka_tests
|