From 6aebe5230df3ebb07ebfa9a2578e9b7ba11101b5 Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Thu, 12 Mar 2020 00:52:12 +0100
Subject: [PATCH] Try to append CUDA_VERSION to artifacts name

---
 .travis.yml             | 24 +++++++++++++++++++++++-
 tests/install_travis.sh |  9 +++++++++
 2 files changed, 32 insertions(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index 45295f7..524b8f6 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 0765fc1..859cdba 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
-- 
GitLab