diff --git a/.travis.yml b/.travis.yml index 45295f77cf59fbdf648b37d95aaf76309f6075a2..524b8f6bfe5c85ed59c49e7ad124eae85f8f0046 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,18 +13,37 @@ matrix: - os: windows include: - python: 3.5 - env: DISTRIB="ubuntu" + env: CUDA_VERSION=9.2 before_install: - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit - python: 3.6 + env: CUDA_VERSION=9.2 before_install: - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit - python: 3.7 + env: CUDA_VERSION=9.2 before_install: - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit - python: 3.8 + env: CUDA_VERSION=9.2 before_install: - sudo apt-get install -y ninja-build build-essential nvidia-cuda-toolkit + - python: 3.5 + env: CUDA_VERSION=10.1 + before_install: + - sudo apt-get install -y ninja-build build-essential + - python: 3.6 + env: CUDA_VERSION=10.1 + before_install: + - sudo apt-get install -y ninja-build build-essential + - python: 3.7 + env: CUDA_VERSION=10.1 + before_install: + - sudo apt-get install -y ninja-build build-essential + - python: 3.8 + env: CUDA_VERSION=10.1 + before_install: + - sudo apt-get install -y ninja-build build-essential - name: Python 3.7.2 on macOS os: osx osx_image: xcode11 @@ -46,6 +65,7 @@ matrix: env: PATH=/c/Python37:/c/Python37/Scripts:$PATH install: - source tests/travis_install.sh +- apt instal rename - pip3 install torch - pip3 install -e . - pip3 install torch || echo "failed to install machine learning stuff" @@ -54,6 +74,8 @@ before_script: - git config --global user.name "Stephan Seitz" script: - python setup.py bdist_wheel +- rename "s/dist\/pyronn_torch-(.*)\.whl/dist\/pyronn_torch-cuda-$CUDA_VERSION-\$1\.whl/s" dist/pyronn_torch-*.whl + after_success: - if [[ "$COVERAGE" == "true" ]]; then coveralls || echo "failed"; codecov; fi after_script: diff --git a/tests/install_travis.sh b/tests/install_travis.sh index 0765fc1eb3aa14308ee2af808810aa63aef33c6d..859cdba30e29b57b29fac8cf61d9a1589c1090a1 100755 --- a/tests/install_travis.sh +++ b/tests/install_travis.sh @@ -42,6 +42,15 @@ if [[ "$DISTRIB" == "conda" ]]; then shopt -s expand_aliases fi +if [[ "$CUDA_VERSION" == 10.1 ]]; then +wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-ubuntu1804.pin +sudo mv cuda-ubuntu1804.pin /etc/apt/preferences.d/cuda-repository-pin-600 +sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub +sudo add-apt-repository "deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/ /" +sudo apt-get update +sudo apt-get -y install cuda-$CUDA_VERSION +fi + # for all pip3 install -U pip wheel setuptools pip3 install -U cppimport pybind11