diff --git a/Dockerfile_test_ubuntu32 b/Dockerfile_test_ubuntu32 new file mode 100644 index 0000000000..1c9afcc75c --- /dev/null +++ b/Dockerfile_test_ubuntu32 @@ -0,0 +1,12 @@ +FROM 32bit/ubuntu:14.04 + +RUN apt-get update && apt-get install -y python-software-properties software-properties-common git +RUN add-apt-repository ppa:evarlast/golang1.4 +RUN apt-get update && apt-get install -y golang-go + +ENV GOPATH=/root/go +RUN mkdir -p /root/go/src/github.com/influxdb/influxdb +RUN mkdir -p /tmp/artifacts + +VOLUME /root/go/src/github.com/influxdb/influxdb +VOLUME /tmp/artifacts diff --git a/circle-test.sh b/circle-test.sh index a53ac6487a..41ad1d5ac0 100755 --- a/circle-test.sh +++ b/circle-test.sh @@ -53,6 +53,17 @@ case $CIRCLE_NODE_INDEX in 0) go test $PARALLELISM $TIMEOUT -v ./... 2>&1 | tee $CIRCLE_ARTIFACTS/test_logs.txt rc=${PIPESTATUS[0]} + if [[ $rc != 0 ]]; then + exit $rc + fi + + # 32bit tests. (Could be run on a separate node instead) + exit_if_fail docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test . + docker run -v $(pwd):/root/go/src/github.com/influxdb/influxdb \ + -v ${CIRCLE_ARTIFACTS}:/tmp/artifacts \ + -t ubuntu-32-influxdb-test bash \ + -c "cd /root/go/src/github.com/influxdb/influxdb && go get -t -d -v ./... && go build -v ./... && go test ${PARALLELISM} ${TIMEOUT} -v ./... 2>&1 | tee /tmp/artifacts/test_logs_i386.txt && exit \${PIPESTATUS[0]}" + rc=$? ;; 1) GORACE="halt_on_error=1" go test $PARALLELISM $TIMEOUT -v -race ./... 2>&1 | tee $CIRCLE_ARTIFACTS/test_logs_race.txt diff --git a/circle.yml b/circle.yml index 141e26fda2..96067c3ecb 100644 --- a/circle.yml +++ b/circle.yml @@ -1,4 +1,6 @@ machine: + services: + - docker pre: - bash < <(curl -s -S -L https://raw.githubusercontent.com/moovweb/gvm/master/binscripts/gvm-installer) - source $HOME/.gvm/scripts/gvm; gvm install go1.4.2 --binary @@ -6,6 +8,11 @@ machine: dependencies: override: - echo "Dummy override, so no Circle dependencies execute" + - if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi + - docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test . + - mkdir -p ~/docker; docker save ubuntu-32-influxdb-test > ~/docker/image.tar + cache_directories: + - "~/docker" test: override: - bash circle-test.sh: diff --git a/test-32bit-docker.sh b/test-32bit-docker.sh new file mode 100755 index 0000000000..145ee37676 --- /dev/null +++ b/test-32bit-docker.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +docker build -f Dockerfile_test_ubuntu32 -t ubuntu-32-influxdb-test . +docker run -v $(pwd):/root/go/src/github.com/influxdb/influxdb -t ubuntu-32-influxdb-test bash -c "cd /root/go/src/github.com/influxdb/influxdb && go get -t -d -v ./... && go build -v ./... && go test -v ./..."