From 0c0189c1c118b76e6b30e3cd5534d4ed6f3de99c Mon Sep 17 00:00:00 2001 From: Ben Kirzhner Date: Thu, 2 Mar 2017 15:44:33 -0800 Subject: [PATCH 1/3] Build against multiple redis versions. --- .travis.yml | 9 ++++++--- Makefile | 23 +++++++++++++++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 8f79b9d..7d4b762 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,14 @@ sudo: false -services: - - redis-server language: python python: - 2.6 - 2.7 - pypy install: + - make build-redis + - make run-redis & - pip install redis --use-mirrors -script: make test +env: + - REDIS_VERSION=3.0.7 + - REDIS_VERSION=3.2.8 +script: make test diff --git a/Makefile b/Makefile index 748c504..ff054b7 100644 --- a/Makefile +++ b/Makefile @@ -13,9 +13,28 @@ qless.lua: qless-lib.lua api.lua egrep -v '^[[:space:]]*--[^\[]' | \ egrep -v '^--$$' >> qless.lua +REDIS_VERSION ?= stable +REDIS_DIR = redis-$(REDIS_VERSION) +REDIS_TAR = redis-$(REDIS_VERSION).tar.gz +REDIS_BIN = $(REDIS_DIR)/src/redis-server + +.PHONY: clean test redis clean: - rm -f qless.lua qless-lib.lua + rm -rf qless.lua qless-lib.lua $(REDIS_TAR) $(REDIS_DIR) -.PHONY: test test: qless.lua *.lua nosetests --exe -v + +$(REDIS_TAR): + curl -O http://download.redis.io/releases/$(REDIS_TAR) + +$(REDIS_DIR): $(REDIS_TAR) + tar xvf $(REDIS_TAR) + +$(REDIS_BIN): $(REDIS_DIR) + cd $(REDIS_DIR) && make + +build-redis: $(REDIS_BIN) + +run-redis: $(REDIS_BIN) + $(REDIS_BIN) --daemonize yes From a1462d155cb9dbab15d5b3c9a420a55abad6b1ad Mon Sep 17 00:00:00 2001 From: Ben Kirzhner Date: Thu, 2 Mar 2017 16:38:20 -0800 Subject: [PATCH 2/3] simplify build steps (no need to split build & run) --- .travis.yml | 3 +-- Makefile | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d4b762..fc995f0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,7 @@ python: - 2.7 - pypy install: - - make build-redis - - make run-redis & + - make redis - pip install redis --use-mirrors env: - REDIS_VERSION=3.0.7 diff --git a/Makefile b/Makefile index ff054b7..d7c7b9e 100644 --- a/Makefile +++ b/Makefile @@ -34,7 +34,5 @@ $(REDIS_DIR): $(REDIS_TAR) $(REDIS_BIN): $(REDIS_DIR) cd $(REDIS_DIR) && make -build-redis: $(REDIS_BIN) - -run-redis: $(REDIS_BIN) +redis: $(REDIS_BIN) $(REDIS_BIN) --daemonize yes From c1f86872903da5a28eb448f15d4716f2f03d0f79 Mon Sep 17 00:00:00 2001 From: Ben Kirzhner Date: Thu, 2 Mar 2017 16:47:28 -0800 Subject: [PATCH 3/3] Allow failures for 3.2.8 until we can fix known issues. --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index fc995f0..fcc909b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,4 +10,7 @@ install: env: - REDIS_VERSION=3.0.7 - REDIS_VERSION=3.2.8 +matrix: + allow_failures: + - env: REDIS_VERSION=3.2.8 script: make test