forked from arnaud-lb/php-rdkafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
122 lines (116 loc) · 3.87 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
dist: xenial
language: php
compiler:
- gcc
services:
- docker
env:
global:
- TEST_KAFKA_BROKERS=kafka:9092
- TEST_KAFKA_BROKER_VERSION=2.3
- LIBRDKAFKA_REPOSITORY_URL=https://github.com/edenhill/librdkafka.git
- PHP_RDKAFKA_CFLAGS='-Wall -Werror=implicit-function-declaration'
jobs:
allow_failures:
- env: LIBRDKAFKA_VERSION=master
fast_finish: true
include:
# Slow tests
- php: 7.4
env: LIBRDKAFKA_VERSION=v1.4.4 MEMORY_CHECK=1 PHP_VERSION=7.4.0 PHP_RDKAFKA_CFLAGS='-Wall -Werror -Wno-deprecated-declarations'
addons:
apt:
packages:
- valgrind
- libonig-dev
- libzip-dev
# librdkafka 1.4.4
- php: 7.4
env: LIBRDKAFKA_VERSION=v1.4.4
- php: 7.3
env: LIBRDKAFKA_VERSION=v1.4.4
- php: 7.2
env: LIBRDKAFKA_VERSION=v1.4.4
- php: 7.1
env: LIBRDKAFKA_VERSION=v1.4.4
- php: 7.0
env: LIBRDKAFKA_VERSION=v1.4.4
- php: 5.6
env: LIBRDKAFKA_VERSION=v1.4.4
# librdkafka 1.1.0
- php: 7.4
env: LIBRDKAFKA_VERSION=v1.1.0
- php: 7.3
env: LIBRDKAFKA_VERSION=v1.1.0
- php: 7.2
env: LIBRDKAFKA_VERSION=v1.1.0
- php: 7.1
env: LIBRDKAFKA_VERSION=v1.1.0
- php: 7.0
env: LIBRDKAFKA_VERSION=v1.1.0
- php: 5.6
env: LIBRDKAFKA_VERSION=v1.1.0
# librdkafka 1.0.1
- php: 7.4
env: LIBRDKAFKA_VERSION=v1.0.1
- php: 7.3
env: LIBRDKAFKA_VERSION=v1.0.1
- php: 7.2
env: LIBRDKAFKA_VERSION=v1.0.1
- php: 7.1
env: LIBRDKAFKA_VERSION=v1.0.1
- php: 7.0
env: LIBRDKAFKA_VERSION=v1.0.1
- php: 5.6
env: LIBRDKAFKA_VERSION=v1.0.1
# librdkafka 0.11.x
- php: 7.4
env: LIBRDKAFKA_VERSION=0.11.x
- php: 7.3
env: LIBRDKAFKA_VERSION=0.11.x
- php: 7.2
env: LIBRDKAFKA_VERSION=0.11.x
- php: 7.1
env: LIBRDKAFKA_VERSION=0.11.x
- php: 7.0
env: LIBRDKAFKA_VERSION=0.11.x
- php: 5.6
env: LIBRDKAFKA_VERSION=0.11.x
# librdkafka master
- php: 7.4
env: LIBRDKAFKA_VERSION=master
- php: 7.3
env: LIBRDKAFKA_VERSION=master
- php: 7.2
env: LIBRDKAFKA_VERSION=master
- php: 7.1
env: LIBRDKAFKA_VERSION=master
- php: 7.0
env: LIBRDKAFKA_VERSION=master
- php: 5.6
env: LIBRDKAFKA_VERSION=master
before_install:
- |
# Use a debug php build when MEMORY_CHECK=1
set -e;
if [ -n "$MEMORY_CHECK" ]; then
export PHP_BUILD_CONFIGURE_OPTS="--enable-debug";
git clone git://github.com/php-build/php-build.git $HOME/.phpenv/plugins/php-build;
travis_wait phpenv install $PHP_VERSION;
phpenv rehash;
phpenv global $PHP_VERSION;
fi
- |
# Start Kafka and install an up-to-date librdkafka
docker network create kafka_network
docker pull wurstmeister/zookeeper:3.4.6
docker run -d --network kafka_network --name zookeeper wurstmeister/zookeeper:3.4.6
docker pull wurstmeister/kafka:2.12-2.3.1
docker run -d -p 9092:9092 --network kafka_network -e "KAFKA_AUTO_CREATE_TOPICS_ENABLE=true" -e "KAFKA_CREATE_TOPICS=test-topic:1:1:compact" -e "KAFKA_ADVERTISED_HOST_NAME=kafka" -e "KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181" -e "KAFKA_ADVERTISED_PORT=9092" --name kafka wurstmeister/kafka:2.12-2.3.1
export KAFKA_BROKER=kafka:9092
sudo sh -c 'echo "\n127.0.0.1 kafka\n" >> /etc/hosts'
install:
- .travis/build.sh
script:
- cp tests/test_env.php.sample tests/test_env.php
- .travis/test.sh