From cfae20cc8dbb70fb1fa2f912a479e13d0c4139a4 2018-02-12 11:44:12 From: Vitaly Takmazov Date: 2018-02-12 11:44:12 Subject: [PATCH] Travis: run extended_test in a Stretch container --- diff --git a/.travis.yml b/.travis.yml index ea42bcf955485273e5fbffd71af1b94c4f959b62..0f499fa492b94d06775639a68fca65b48e826062 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,55 +1,27 @@ language: cpp -python: - - "2.7_with_system_site_packages" -virtualenv: - system_site_packages: true +sudo: required +services: + - docker matrix: include: - - os: linux - dist: trusty - sudo: required - env: CXX11=true - os: linux dist: trusty sudo: required - os: osx before_script: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - export DEBIAN_FRONTEND=noninteractive; - export APT_LISTCHANGES_FRONTEND=none; - echo force-confold | sudo tee -a /etc/dpkg/dpkg.cfg; - if [[ "CXX11" == "true" ]]; then - curl -k https://swift.im/keys/packages.key | sudo apt-key add -; - echo 'deb http://us.archive.ubuntu.com/ubuntu xenial main restricted universe multiverse' | sudo tee /etc/apt/sources.list.d/xenial.list > /dev/null; - echo 'deb http://us.archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/xenial.list > /dev/null; - echo 'deb http://us.archive.ubuntu.com/ubuntu xenial-security main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/xenial.list > /dev/null; - echo 'deb http://us.archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse' | sudo tee -a /etc/apt/sources.list.d/xenial.list > /dev/null; - echo "deb http://packages.spectrum.im/spectrum2/ xenial main" | sudo tee -a /etc/apt/sources.list; - echo "deb http://swift.im/packages/ubuntu/xenial beta main" | sudo tee -a /etc/apt/sources.list; - else - echo "deb http://packages.spectrum.im/spectrum2/ trusty main" | sudo tee -a /etc/apt/sources.list; - fi; - echo "deb http://packages.prosody.im/debian $(lsb_release -sc) main" | sudo tee -a /etc/apt/sources.list; - sudo apt-get update -qq; - sudo apt-get purge chromium-browser; - sudo apt-get install -y --force-yes build-essential prosody ngircd python-sleekxmpp libswiften-dev libprotobuf-dev protobuf-compiler libpurple-dev libglib2.0-dev libdbus-glib-1-dev liblog4cxx10-dev libpopt-dev libboost-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-locale-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-date-time-dev libcppunit-dev libcommuni-dev libminiupnpc-dev libnatpmp-dev; - sudo killall lua5.1; - else + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/e6e43cf6a3%5E/Formula/cppunit.rb; - brew install protobuf log4cxx popt boost; + brew install protobuf log4cxx popt; travis_wait 30 brew install -s libswiften; fi -install: - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - pip install --user sleekxmpp; - fi script: - - cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON . && make - - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then - make extended_test; - else + - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then + cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON .; + make; make test; + else + docker build . -f Dockerfile.stretch; fi notifications: slack: spectrum2:CIlYHtxGMAaxs3qVHfwBzCuy diff --git a/Dockerfile.stretch b/Dockerfile.stretch new file mode 100644 index 0000000000000000000000000000000000000000..e0024563e7d54fb732bc42888d0c6aee8591032e --- /dev/null +++ b/Dockerfile.stretch @@ -0,0 +1,14 @@ +FROM debian:stretch + +ARG DEBIAN_FRONTEND=noninteractive +ARG APT_LISTCHANGES_FRONTEND=none +RUN echo force-confold | tee -a /etc/dpkg/dpkg.cfg +RUN apt-get update -qq +RUN apt-get install -y --force-yes apt-transport-https +RUN echo "deb http://packages.spectrum.im/spectrum2/ stretch main" | tee -a /etc/apt/sources.list +RUN echo "deb [trusted=yes] http://swift.im/packages/debian/sid beta main" | tee -a /etc/apt/sources.list +RUN apt-get update -qq --allow-unauthenticated +RUN apt-get install -y --force-yes build-essential git cmake prosody ngircd python-sleekxmpp libswiften-dev libprotobuf-dev protobuf-compiler libpurple-dev libglib2.0-dev libdbus-glib-1-dev liblog4cxx10-dev libpopt-dev libboost-dev libboost-signals-dev libboost-system-dev libboost-thread-dev libboost-locale-dev libboost-filesystem-dev libboost-program-options-dev libboost-regex-dev libboost-date-time-dev libcppunit-dev libcommuni-dev libminiupnpc-dev libnatpmp-dev libssl-dev libcurl4-openssl-dev libidn11-dev libxml2-dev libsqlite3-dev libqt4-dev +RUN git clone git://github.com/SpectrumIM/spectrum2.git && cd spectrum2 +RUN cd spectrum2 && cmake -DCMAKE_BUILD_TYPE=Debug -DENABLE_TESTS=ON . && make +RUN cd spectrum2 && make extended_test