Skip to content

Commit

Permalink
[travis] Extra build without compat tests
Browse files Browse the repository at this point in the history
  • Loading branch information
achilleas-k committed Jul 20, 2020
1 parent 04063e7 commit 0ab71e7
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ matrix:
env: pymajor=3 coverage=1
dist: xenial
sudo: true
- python: "3.7"
os: linux
env: pymajor=3 nocompat=1
dist: xenial
- language: generic
os: osx
env: pymajor=2
Expand Down Expand Up @@ -56,25 +60,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
Expand All @@ -83,7 +90,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
Expand Down

0 comments on commit 0ab71e7

Please sign in to comment.