Skip to content

Commit 14480e6

Browse files
committed
Merge pull request #327 from hannosch/travis-cache
Make use of the new travis-ci caching mechanism.
2 parents 87c6d0e + 3a6e37a commit 14480e6

4 files changed

Lines changed: 19 additions & 6 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ man/
2424
parts/
2525
share/
2626
site-packages/
27+
zookeeper/
2728
.coverage
2829
.idea
2930
.pip_cache

.travis.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
sudo: false
2+
3+
addons:
4+
apt:
5+
packages:
6+
- libevent-dev
7+
8+
cache:
9+
directories:
10+
- $HOME/.cache/pip
11+
- zookeeper
12+
113
language: python
214
python:
315
- "2.7"
@@ -39,9 +51,6 @@ matrix:
3951
notifications:
4052
email: false
4153

42-
before_install:
43-
- sudo apt-get install libevent-dev
44-
4554
install:
4655
- pip install tox
4756

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ BIN = $(HERE)/bin
33
PYTHON = $(BIN)/python
44
PIP_DOWNLOAD_CACHE ?= $(HERE)/.pip_cache
55
INSTALL = $(BIN)/pip install
6-
INSTALL += --download-cache $(PIP_DOWNLOAD_CACHE)
6+
ifneq ($(TRAVIS), true)
7+
INSTALL += --download-cache $(PIP_DOWNLOAD_CACHE)
8+
endif
79
TOX_VENV ?= py27
810
BUILD_DIRS = bin build include lib lib64 man share
911

ensure-zookeeper-env.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,17 @@
33
set -e
44

55
HERE=`pwd`
6-
ZOO_BASE_DIR="$HERE/bin/"
6+
ZOO_BASE_DIR="$HERE/zookeeper"
77
ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.6}
8-
ZOOKEEPER_PATH="$ZOO_BASE_DIR/zookeeper-$ZOOKEEPER_VERSION"
8+
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION"
99
ZOO_MIRROR_URL="http://apache.osuosl.org/"
1010

1111

1212
function download_zookeeper(){
1313
mkdir -p $ZOO_BASE_DIR
1414
cd $ZOO_BASE_DIR
1515
curl --silent -C - $ZOO_MIRROR_URL/zookeeper/zookeeper-$ZOOKEEPER_VERSION/zookeeper-$ZOOKEEPER_VERSION.tar.gz | tar -zx
16+
mv zookeeper-$ZOOKEEPER_VERSION $ZOOKEEPER_VERSION
1617
chmod a+x $ZOOKEEPER_PATH/bin/zkServer.sh
1718
}
1819

0 commit comments

Comments
 (0)