Skip to content

Commit 1c69ba1

Browse files
committed
Add pypi deployment via Travis
Signed-off-by: Konstantin Slavnov [email protected]
1 parent 81e5ec5 commit 1c69ba1

File tree

2 files changed

+54
-11
lines changed

2 files changed

+54
-11
lines changed

.travis.setup renamed to .travis.install

+6-2
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,9 @@ sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
44
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/cuda-repo-ubuntu1404_8.0.44-1_amd64.deb
55
sudo dpkg -i cuda-repo-ubuntu1404_8.0.44-1_amd64.deb
66
sudo apt-get update
7-
sudo apt-get install -y --no-install-suggests --no-install-recommends g++-5 python3-dev python3-numpy cuda-cudart-dev-8-0 cuda-core-8-0 cuda-misc-headers-8-0 cuda-curand-dev-8-0
8-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
7+
sudo apt-get install -y --no-install-suggests --no-install-recommends \
8+
g++-5 cuda-cudart-dev-8-0 cuda-core-8-0 cuda-misc-headers-8-0 cuda-curand-dev-8-0 \
9+
python-numpy autoconf
10+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 1 --slave /usr/bin/g++ g++ /usr/bin/g++-5
11+
wget https://github.com/NixOS/patchelf/archive/0.9.zip && unzip 0.9.zip
12+
cd patchelf-0.9/ && ./bootstrap.sh && ./configure && make && sudo make install && cd ..

.travis.yml

+48-9
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,56 @@
1-
language: cpp
21
dist: trusty
32
sudo: required
43

5-
before_install:
6-
- . .travis.setup
4+
env:
5+
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0
76

8-
before_script:
9-
- mkdir build
10-
- cd build
11-
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 ..
7+
_install: &_install
8+
- . .travis.install
9+
- pip install numpy auditwheel==1.5 setuptools twine
10+
- python3 setup.py bdist_wheel
11+
12+
_deploy: &_deploy
13+
provider: script
14+
script:
15+
- auditwheel repair -w dist dist/*
16+
- twine upload dist/*manylinux* -u $PYPI_LOGIN -p $PYPI_PASS
17+
skip_cleanup: true
18+
on:
19+
tags: true
20+
21+
matrix:
22+
include:
23+
- language: cpp
24+
install:
25+
- . .travis.install
26+
- mkdir build
27+
- cd build
28+
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCUDA_TOOLKIT_ROOT_DIR=$CUDA_TOOLKIT_ROOT_DIR ..
29+
- make -j2
30+
script: skip
31+
- language: python
32+
python: 3.4
33+
install: *_install
34+
script: skip
35+
deploy:
36+
provider: script
37+
script:
38+
- auditwheel repair -w dist dist/*
39+
- twine upload dist/*manylinux* -u $PYPI_LOGIN -p $PYPI_PASS
40+
skip_cleanup: true
41+
on:
42+
tags: true
43+
- language: python
44+
python: 3.5
45+
install: *_install
46+
script: skip
47+
deploy: *_deploy
48+
- language: python
49+
python: 3.6
50+
install: *_install
51+
script: skip
52+
deploy: *_deploy
1253

13-
script:
14-
- make -j2 VERBOSE=1
1554

1655
notifications:
1756
email: false

0 commit comments

Comments
 (0)