diff --git a/.travis.mk b/.travis.mk index 9a98991120ffa866c2a788c9ebe3e79249ea6025..49c071ac3f692e183f87a8d7fe9f9ca02cfd6533 100644 --- a/.travis.mk +++ b/.travis.mk @@ -2,6 +2,8 @@ # Travis CI rules # +DOCKER_IMAGE:=packpack/packpack:ubuntu-zesty + all: package source: @@ -14,13 +16,33 @@ package: test: test_$(TRAVIS_OS_NAME) -deps_linux: - sudo apt-get update > /dev/null - sudo apt-get -q -y install binutils-dev python-daemon python-yaml - sudo pip install six==1.9.0 - sudo pip install gevent==1.1.2 +# Redirect some targets via docker +test_linux: docker_test_ubuntu +coverage: docker_coverage_ubuntu + +docker_%: + mkdir -p ~/.cache/ccache + docker run \ + --rm=true --tty=true \ + --volume "${PWD}:/tarantool" \ + --volume "${HOME}/.cache:/cache" \ + --workdir /tarantool \ + -e XDG_CACHE_HOME=/cache \ + -e CCACHE_DIR=/cache/ccache \ + -e COVERALLS_TOKEN=${COVERALLS_TOKEN} \ + ${DOCKER_IMAGE} \ + make -f .travis.mk $(subst docker_,,$@) + +deps_ubuntu: + sudo apt-get update && apt-get install -y -f \ + build-essential cmake coreutils sed \ + libreadline-dev libncurses5-dev libyaml-dev libssl-dev \ + libcurl4-openssl-dev binutils-dev \ + python python-pip python-setuptools python-dev \ + python-msgpack python-yaml python-argparse python-six python-gevent \ + lcov ruby -test_linux: deps_linux +test_ubuntu: deps_ubuntu cmake . -DCMAKE_BUILD_TYPE=RelWithDebInfo make -j8 cd test && /usr/bin/python test-run.py diff --git a/.travis.yml b/.travis.yml index de8f9e2ba010e3c542ce3c420a26a16c14ade552..8fb17aa67702f1faa1929658c34108bd28212bf1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,16 +1,13 @@ -sudo: required +sudo: false services: - docker language: cpp + os: - linux - osx -compiler: - - clang - - gcc - cache: directories: - $HOME/.cache @@ -51,30 +48,6 @@ matrix: # - env: OS=debian DIST=jessie # - env: OS=debian DIST=stretch exclude: - - env: OS=el DIST=6 - compiler: clang - - env: OS=el DIST=7 - compiler: clang - - env: OS=fedora DIST=24 - compiler: clang - - env: OS=fedora DIST=25 - compiler: clang - - env: OS=ubuntu DIST=precise - compiler: clang - - env: OS=ubuntu DIST=trusty - compiler: clang - - env: OS=ubuntu DIST=xenial - compiler: clang - - env: OS=ubuntu DIST=yakkety - compiler: clang - - env: OS=debian DIST=wheezy - compiler: clang - - env: OS=debian DIST=jessie - compiler: clang - - env: OS=debian DIST=stretch - compiler: clang - - env: TARGET=source - compiler: clang - env: OS=el DIST=6 os: osx - env: OS=el DIST=7 @@ -99,8 +72,6 @@ matrix: os: osx - env: TARGET=source os: osx - - os: osx - compiler: gcc script: - make -f .travis.mk ${TARGET}