Skip to content

Commit 13fd32a

Browse files
committed
update travis
1 parent d38af58 commit 13fd32a

11 files changed

+184
-33
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
dataset/*
99
!dataset/*.sh
1010
!dataset/test_dataset.txt
11+
!scripts/*.sh
1112
html
1213
latex
1314
logs

.travis.yml

Lines changed: 67 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,67 @@
1-
branches:
2-
only: master
3-
language: cpp
4-
compiler:
5-
- gcc
6-
before_script:
7-
- sudo apt-get install libeigen3-dev
8-
- mkdir build
9-
- cd build
10-
- cmake -DUSE_CUDA=OFF -DUSE_EIGEN=ON -DBUILD_TESTS=ON ..
11-
script: cmake --build . --target runtest
1+
jobs:
2+
include:
3+
- name: ubuntu-cuda8.0
4+
env:
5+
- CUDA=8.0.61-1
6+
- CUDA_SHORT=8.0
7+
- UBUNTU_VERSION=ubuntu1604
8+
- BUILD_TAG=-cuda8.0
9+
dist: xenial
10+
language: python
11+
before_deploy:
12+
- ./scripts/build_gpu_wheel.sh
13+
- name: ubuntu-cuda9.2
14+
env:
15+
- CUDA=9.2.148-1
16+
- CUDA_SHORT=9.2
17+
- UBUNTU_VERSION=ubuntu1604
18+
- BUILD_TAG=-cuda9.2
19+
dist: xenial
20+
language: python
21+
before_deploy:
22+
- ./scripts/build_gpu_wheel.sh
23+
- name: ubuntu-cuda10.1
24+
env:
25+
- CUDA=10.1.105-1
26+
- CUDA_SHORT=10.1
27+
- UBUNTU_VERSION=ubuntu1804
28+
- BUILD_TAG=-cuda10.1
29+
dist: bionic
30+
language: python
31+
before_deploy:
32+
- ./scripts/build_gpu_wheel.sh
33+
- name: windows-cuda10.1
34+
os: windows
35+
language: bash
36+
env:
37+
- MSBUILD_PATH="/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
38+
- PATH=/c/Python36:/c/Python36/Scripts:$PATH
39+
- BUILD_TAG=-cuda10.1
40+
before_deploy:
41+
- ./scripts/build_gpu_wheel.sh
42+
- name: ubuntu-cpu
43+
env:
44+
- BUILD_TAG=-cpu
45+
dist: bionic
46+
language: python
47+
before_deploy:
48+
- ./scripts/build_cpu_wheel.sh
49+
- name: windows-cpu
50+
os: windows
51+
language: bash
52+
env:
53+
- MSBUILD_PATH="/c/Program Files (x86)/Microsoft Visual Studio/2017/BuildTools/MSBuild/15.0/Bin"
54+
- PATH=/c/Python36:/c/Python36/Scripts:$PATH
55+
- BUILD_TAG=-cpu
56+
before_deploy:
57+
- ./scripts/build_cpu_wheel.sh
58+
script:
59+
- ./scripts/build_cputest.sh
60+
deploy:
61+
provider: releases
62+
api_key: ${GITHUB_API_TOKEN}
63+
file: "python/dist/*"
64+
file_glob: true
65+
skip_cleanup: true
66+
on:
67+
tags: true

python/dist/thundersvm-0.3.3-py3-none-linux_amd64.whl

Whitespace-only changes.
-221 KB
Binary file not shown.
-470 KB
Binary file not shown.
-663 KB
Binary file not shown.
-488 KB
Binary file not shown.

python/setup.py

Lines changed: 33 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,34 +2,45 @@
22
import setuptools
33
from shutil import copyfile
44
from sys import platform
5+
import os
56

67

8+
from wheel.bdist_wheel import bdist_wheel as _bdist_wheel
9+
10+
11+
class bdist_wheel(_bdist_wheel):
12+
def finalize_options(self):
13+
_bdist_wheel.finalize_options(self)
14+
self.root_is_pure = False
15+
716
dirname = path.dirname(path.abspath(__file__))
817

918
if platform == "linux" or platform == "linux2":
10-
lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.so'))
19+
lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.so'))
1120
elif platform == "win32":
12-
lib_path = path.abspath(path.join(dirname, '../build/bin/Debug/thundersvm.dll'))
21+
lib_path = path.abspath(path.join(dirname, '../build/bin/Debug/thundersvm.dll'))
1322
elif platform == "darwin":
14-
lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.dylib'))
15-
else :
16-
raise EnvironmentError("OS not supported!")
23+
lib_path = path.abspath(path.join(dirname, '../build/lib/libthundersvm.dylib'))
24+
else:
25+
raise EnvironmentError("OS not supported!")
1726

1827
if not path.exists(path.join(dirname, "thundersvm", path.basename(lib_path))):
19-
copyfile(lib_path, path.join(dirname, "thundersvm", path.basename(lib_path)))
20-
setuptools.setup(name="thundersvm",
21-
version="0.3.3",
22-
packages=["thundersvm"],
23-
package_dir={"python": "thundersvm"},
24-
description="A Fast SVM Library on GPUs and CPUs",
25-
long_description="The mission of ThunderSVM is to help users easily and efficiently apply SVMs to solve problems. ThunderSVM exploits GPUs and multi-core CPUs to achieve high efficiency",
26-
long_description_content_type="text/plain",
27-
url="https://github.com/zeyiwen/thundersvm",
28-
package_data = {"thundersvm": [path.basename(lib_path)]},
29-
install_requires=['numpy','scipy','scikit-learn'],
30-
classifiers=[
31-
"Programming Language :: Python :: 3",
32-
"License :: OSI Approved :: Apache Software License",
33-
],
34-
python_requires=">=3"
35-
)
28+
copyfile(lib_path, path.join(dirname, "thundersvm", path.basename(lib_path)))
29+
setuptools.setup(name="thundersvm" + os.environ['BUILD_TAG'],
30+
version="0.3.3",
31+
packages=["thundersvm"],
32+
package_dir={"python": "thundersvm"},
33+
description="A Fast SVM Library on GPUs and CPUs",
34+
long_description="The mission of ThunderSVM is to help users easily and efficiently apply SVMs to solve problems. ThunderSVM exploits GPUs and multi-core CPUs to achieve high efficiency",
35+
long_description_content_type="text/plain",
36+
url="https://github.com/zeyiwen/thundersvm",
37+
package_data={"thundersvm": [path.basename(lib_path)]},
38+
setup_requires=['wheel'],
39+
install_requires=['numpy', 'scipy', 'scikit-learn'],
40+
classifiers=[
41+
"Programming Language :: Python :: 3",
42+
"License :: OSI Approved :: Apache Software License",
43+
],
44+
python_requires=">=3",
45+
cmdclass={'bdist_wheel': bdist_wheel},
46+
)

scripts/build_cpu_wheel.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
mkdir build
6+
cd build
7+
8+
case ${TRAVIS_OS_NAME} in
9+
linux)
10+
cmake -DUSE_CUDA=OFF -DUSE_EIGEN=ON ..
11+
;;
12+
osx)
13+
;;
14+
windows)
15+
export PATH=${MSBUILD_PATH}:$PATH
16+
cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE -DUSE_CUDA=OFF -DUSE_EIGEN=ON -G "Visual Studio 14 2015 Win64" ..
17+
choco install python --version=3.6.3
18+
python -m pip install --upgrade pip
19+
pip install wheel
20+
;;
21+
esac
22+
23+
cmake --build .
24+
cd ../python
25+
python setup.py bdist_wheel

scripts/build_cputest.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -x
4+
5+
mkdir build_cputest
6+
cd build_cputest
7+
8+
case ${TRAVIS_OS_NAME} in
9+
linux)
10+
cmake -DBUILD_TESTS=ON -DUSE_CUDA=OFF -DUSE_EIGEN=ON ..
11+
;;
12+
osx)
13+
;;
14+
windows)
15+
export PATH=${MSBUILD_PATH}:$PATH
16+
cmake -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=TRUE -DBUILD_SHARED_LIBS=TRUE -DUSE_CUDA=OFF -DUSE_EIGEN=ON -DBUILD_TESTS=ON -G "Visual Studio 14 2015 Win64" ..
17+
;;
18+
esac
19+
20+
cmake --build . --target runtest

0 commit comments

Comments
 (0)