diff --git a/.travis.yml b/.travis.yml index ce75e5d2..dcb9dc7c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,6 +22,11 @@ matrix: env: pymajor=3 coverage=1 dist: xenial sudo: true + - python: "3.7" + os: linux + env: pymajor=3 coverage=1 nocompat=1 + dist: xenial + sudo: true - language: generic os: osx env: pymajor=2 @@ -56,25 +61,28 @@ addons: - libboost-all-dev before_install: - - nixprefix="/usr/local" - - export NIX_INCDIR=${nixprefix}/include/nixio-1.0 - - export NIX_LIBDIR=${nixprefix}/lib - - export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${nixprefix}/lib/pkgconfig + # build nix for compat tests + if [[ -z "${nocompat}" ]]; then + nixprefix="/usr/local"; + export NIX_INCDIR=${nixprefix}/include/nixio-1.0; + export NIX_LIBDIR=${nixprefix}/lib; + export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:${nixprefix}/lib/pkgconfig; + git clone --branch ${NIX_BRANCH} https://github.com/G-Node/nix /tmp/libnix; + pushd /tmp/libnix; + mkdir build; + pushd build; + cmake -DCMAKE_INSTALL_PREFIX=${nixprefix} ..; + make; + sudo make install; + popd; + popd; + fi # For macOS python3 - export PATH="/usr/local/opt/python@3.8/bin:$PATH" - alias pip2='pip' - if [[ "${TRAVIS_OS_NAME}" != "osx" ]]; then pip${pymajor} install --upgrade numpy; fi - pip${pymajor} install --upgrade h5py pytest pytest-xdist pytest-cov six; - if [[ "${pymajor}" == 2 ]]; then pip${pymajor} install enum34; fi - - git clone --branch ${NIX_BRANCH} https://github.com/G-Node/nix /tmp/libnix - - pushd /tmp/libnix - - mkdir build - - pushd build - - cmake -DCMAKE_INSTALL_PREFIX=${nixprefix} .. - - make - - sudo make install - - popd - - popd - which pip${pymajor} - which python${pymajor} - python${pymajor} --version @@ -83,7 +91,11 @@ install: - python${pymajor} setup.py build script: - - pytest --cov=nixio --nix-compat -nauto; + - if [[ "${nocompat}" == 1 ]]; then + pytest --cov=nixio -nauto; + else + pytest --cov=nixio --nix-compat -nauto; + fi after_success: - if [[ "${coverage}" == 1 ]]; then