Skip to content

Commit 745b6f3

Browse files
authored
Merge pull request #60 from confluentinc/travis
Travis CI integration
2 parents ff1f073 + d7aa1d9 commit 745b6f3

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,5 @@ confluent?kafka.egg-info
1313
.cache
1414
*.log
1515
confluent-kafka-0.*.*
16+
tmp-build
17+
.tox

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
python:
3+
- "2.7"
4+
- "3.4"
5+
before_install:
6+
- bash tools/bootstrap-librdkafka.sh v0.9.2 tmp-build
7+
install:
8+
- pip install -v --global-option=build_ext --global-option="-Itmp-build/include/" --global-option="-Ltmp-build/lib" .
9+
env:
10+
- LD_LIBRARY_PATH=$PWD/tmp-build/lib
11+
script: py.test --ignore=tmp-build

tools/bootstrap-librdkafka.sh

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
#
3+
#
4+
# Downloads, builds and installs librdkafka into <install-dir>
5+
#
6+
7+
set -e
8+
9+
VERSION=$1
10+
PREFIXDIR=$2
11+
12+
if [[ -z "$VERSION" ]]; then
13+
echo "Usage: $0 <librdkafka-version> [<install-dir>]" 1>&2
14+
exit 1
15+
fi
16+
17+
if [[ -z "$PREFIXDIR" ]]; then
18+
PREFIXDIR=tmp-build
19+
fi
20+
21+
if [[ $PREFIXDIR != /* ]]; then
22+
PREFIXDIR="$PWD/$PREFIXDIR"
23+
fi
24+
25+
mkdir -p "$PREFIXDIR/librdkafka"
26+
pushd "$PREFIXDIR/librdkafka"
27+
28+
test -f configure ||
29+
curl -sL "https://github.com/edenhill/librdkafka/archive/${VERSION}.tar.gz" | \
30+
tar -xz --strip-components=1 -f -
31+
32+
./configure --prefix="$PREFIXDIR"
33+
make -j
34+
make install
35+
popd
36+

0 commit comments

Comments
 (0)