-
Notifications
You must be signed in to change notification settings - Fork 4
Add wheels building for all platforms #7
Changes from 33 commits
9c51a57
45f4b78
069f1f8
9bbcad3
f1c708e
561811b
deede57
5581ce5
66c0a43
8419612
9af740d
0e8684a
4eb8437
9b7e139
a04219d
cb74048
3cecaae
e0f0612
153d37e
87c7392
e9981b5
c437827
005f3b4
b46098d
0b78990
027cd20
40f9b2e
d54b84e
616d43a
6ce1a19
bed0e6e
84ffd3e
934db10
1c703cb
e079db2
42be28f
32d102c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[submodule "terryfy"] | ||
path = terryfy | ||
url = https://github.com/MacPython/terryfy.git | ||
[submodule "gensim"] | ||
path = gensim | ||
url = https://github.com/piskvorky/gensim.git | ||
[submodule "multibuild"] | ||
path = multibuild | ||
url = https://github.com/matthew-brett/multibuild.git |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,100 @@ | ||
language: | ||
- objective-c | ||
os: osx | ||
osx_image: xcode8.1 | ||
env: | ||
global: | ||
- REPO_DIR=gensim | ||
#- BUILD_COMMIT=latest-tag # comment out to build version in submodule | ||
matrix: | ||
# 2.7, 3.5 and 3.6 | ||
# can't download - VERSION=2.6.8 | ||
- VERSION=2.7.12 | ||
- VERSION=3.5.2 | ||
- VERSION=3.6.0 | ||
global: | ||
- REPO_DIR=gensim | ||
- BUILD_COMMIT=1980109764f67513ef9740d39f2763aba6519ba2 | ||
- BUILD_DEPENDS="numpy==1.11.3 scipy==0.18.1 six smart_open" | ||
- TEST_DEPENDS="pytest pytest-rerunfailures cython pyemd testfixtures scikit-learn Morfessor==2.0.2a4" | ||
|
||
- WHEELHOUSE_UPLOADER_USERNAME="Lev.Konstantinovskiy" | ||
# generated by 'gem install travis; travis encrypt -r MacPython/gensim-wheels WHEELHOUSE_UPLOADER_SECRET=<the api key>' | ||
- secure: "L99GHXSsHwj2P+lfJPTeLCIDMpRomj8yhhH2TuFJ9wP36rkVtewpy6ExVey/jae1dwMaRyoMbdXZwbMTNs0cUuvDvniBwQM8PRNxy3VdOxLNVGFbCtj6+/iOl6rxok6TPkhwlrhzQy2hq9vyZjeNsFZCkGiTFm7Idgd1dWUPDeBowR3X6ucIFK7fR5qDgNfFVVBUPKMmGOyvLy1nUB9FV7mdAK8VQCrIKk5BMVcovAsnYBgUF2eAMemgeFUtHMF9KbpXPRgjPyMZfdKhjIvqz5qbOGDhbrTn5sD1oPWx0IkA5gVazlng8EeyasiRg87br2TxknHLHHP8TEiVnj0wTJ7yYQK6zAwz6RM1ZFOQ1JI0YY4kgw1TRZpTqelehlvQYtHiwDxJXQfb/Nt2dxC0cJPjs5NMMrQKWyP5yHRP/RX4CKSRMF/48pF2kROg1gkc+i68mKKrPpckq0QXEzxTJwjuLLFq4Nos4JAQhs+3rxm4yFExpgdkfbtutRv3/I/HNW9il/aQltGgih65KCYkkJx6uFfENQnXnvLMoR16vJ94RghCKh4cnC6w4h4HRjVZgm34FZ00fe9Z30H/5FKb1/VoGm0edz56o5zOvdKEpzxoGS3wI5IrVGCh348heUFRzjxLNmWtkpOJgm3b9FZgb6h72cflq5NwbgeQtF4ld+U=" | ||
|
||
|
||
language: python | ||
# The travis Python version is unrelated to the version we build and test | ||
# with. This is set with the MB_PYTHON_VERSION variable. | ||
python: 3.5 | ||
sudo: required | ||
dist: trusty | ||
services: docker | ||
|
||
matrix: | ||
exclude: | ||
# Exclude the default Python 3.5 build | ||
- python: 3.5 | ||
include: | ||
|
||
# Linux | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
- PLAT=x86_64 | ||
|
||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
- PLAT=i686 | ||
|
||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.5 | ||
- PLAT=x86_64 | ||
|
||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.5 | ||
- PLAT=i686 | ||
|
||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
- PLAT=x86_64 | ||
|
||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
- PLAT=i686 | ||
|
||
# MacOS | ||
- os: osx | ||
language: generic | ||
env: | ||
- MB_PYTHON_VERSION=2.7 | ||
|
||
- os: osx | ||
language: generic | ||
env: | ||
- MB_PYTHON_VERSION=3.5 | ||
|
||
- os: osx | ||
language: generic | ||
env: | ||
- MB_PYTHON_VERSION=3.6 | ||
|
||
|
||
before_install: | ||
- source multibuild/common_utils.sh | ||
- source multibuild/travis_steps.sh | ||
- before_install | ||
|
||
install: | ||
- source terryfy/travis_tools.sh | ||
- get_python_environment macpython $VERSION venv | ||
- pip install numpy scipy sklearn | ||
- pip install -U cython wheel six | ||
- if [ -n "$BUILD_COMMIT" ]; then | ||
checkout_commit $REPO_DIR $BUILD_COMMIT; | ||
fi | ||
- cd $REPO_DIR | ||
- python setup.py bdist_wheel | ||
- rename_wheels dist | ||
- pip install dist/*.whl | ||
- cd .. | ||
- clean_code $REPO_DIR $BUILD_COMMIT | ||
- build_wheel $REPO_DIR $PLAT | ||
|
||
script: | ||
# - if [ "${VERSION:0:3}" != "3.3" ]; then pip install -U numpy; fi | ||
- pip install nose pyemd testfixtures unittest2 morfessor==2.0.2a4 sklearn | ||
|
||
- mkdir tmp_for_test | ||
- cd tmp_for_test | ||
# make sure we test the wheel | ||
- nosetests --exe -v gensim | ||
# setup.py doesn't test wheel, just the local files: - python ../setup.py test | ||
- cd .. | ||
before_deploy: cd $REPO_DIR/dist | ||
deploy: | ||
provider: cloudfiles | ||
username: travis-worker | ||
api_key: | ||
secure: "lZW7U67gVsceiI+Ofi2n+X3BRyou8D/ul5BuJK0OBtt4aiccKzrUAb8vraHy6ED0l1t/j3GWfrg8jaP9G9BRGIfoDQROJ5w+BZ/pTL0p+OnJrqZkNNiG82qvEOSmlVrE+afl2YMeLKDou+uX1wuXp6xYaN9W/lJJW0qskS6D/aiPY7KwagFWv+QsUF07SpomMBiZ/EE4FsMJBhg9q7sUg/tG4mbiTgZY2jGx+R2u5ktq3zPr6MIzIqz+7vswMR/BTg2WJTDvxQTMpWGYihi3vOxX9ty0vIUKti0zHIcj6B8RYgiDoAC6P2OUtk2J1qHiyvAooi9Vm+WkPnxQqF+8EOXkbajvsuniwPwenmy6xYh7fmNxs4huxFb3H8FYC6qI1256cMXd9CssFCroeLuQoUa7sn1X+cmb2IjrE1mOyboIF6iQ5M31xcQBUzIuauONnx4xz58ASovYDfHc1RkhatBtaW2nKhjiti6uvs8kVgok/dzoGOExRblbN1IjpjmCvhDQh6WQryMupoUmjJWjIsgs1MfaMaT7jW8AM1as5beHoEJiB445KJTBIb61BHxyfXcneuUJrRmlM7F8Tw56Gpilwl7hE/ufd3teabJDdxV0J18r4Rq/HI8N5vh4YFvV3h+p4drEnZYPHV3narMj8nGnud65qXAFfp0e25cLY3c=" | ||
region: ORD | ||
container: wheels | ||
skip_cleanup: true | ||
- install_run $PLAT | ||
|
||
after_success: | ||
- pip install wheelhouse-uploader | ||
- echo ${TRAVIS_BUILD_DIR}/wheelhouse/ | ||
- ls -laht ${TRAVIS_BUILD_DIR}/wheelhouse/ | ||
# This uploads the wheels to a Rackspace container owned by the | ||
# scikit-learn team, available at http://wheels.scipy.org. See above | ||
# for information on using this account or choosing another. | ||
- python -m wheelhouse_uploader upload --local-folder ${TRAVIS_BUILD_DIR}/wheelhouse/ --no-ssl-check gensim-wheels | ||
|
||
notifications: | ||
email: | ||
- [email protected] | ||
on_success: always | ||
on_failure: always |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
environment: | ||
global: | ||
BUILD_COMMIT: 1980109764f67513ef9740d39f2763aba6519ba2 | ||
# SDK v7.0 MSVC Express 2008's SetEnv.cmd script will fail if the | ||
# /E:ON and /V:ON options are not enabled in the batch script intepreter | ||
# See: http://stackoverflow.com/a/13751649/163740 | ||
CMD_IN_ENV: "cmd /E:ON /V:ON /C ..\\appveyor\\run_with_env.cmd" | ||
WHEELHOUSE_UPLOADER_USERNAME: "Lev.Konstantinovskiy" | ||
WHEELHOUSE_UPLOADER_SECRET: | ||
secure: qXqY3dFmLOqvxa3Om2gQi/BjotTOK+EP2IPLolBNo0c61yDtNWxbmE4wH3up72Be | ||
|
||
matrix: | ||
- PYTHON: "C:\\Python27" | ||
PYTHON_VERSION: "2.7.12" | ||
PYTHON_ARCH: "32" | ||
|
||
- PYTHON: "C:\\Python27-x64" | ||
PYTHON_VERSION: "2.7.12" | ||
PYTHON_ARCH: "64" | ||
|
||
- PYTHON: "C:\\Python35" | ||
PYTHON_VERSION: "3.5.2" | ||
PYTHON_ARCH: "32" | ||
|
||
- PYTHON: "C:\\Python35-x64" | ||
PYTHON_VERSION: "3.5.2" | ||
PYTHON_ARCH: "64" | ||
|
||
- PYTHON: "C:\\Python36" | ||
PYTHON_VERSION: "3.6.0" | ||
PYTHON_ARCH: "32" | ||
|
||
- PYTHON: "C:\\Python36-x64" | ||
PYTHON_VERSION: "3.6.0" | ||
PYTHON_ARCH: "64" | ||
|
||
|
||
matrix: | ||
fast_finish: true | ||
|
||
|
||
install: | ||
# Install Python (from the official .msi of http://python.org) and pip when | ||
# not already installed. | ||
- "powershell ./appveyor/install.ps1" | ||
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" | ||
- "python -m pip install -U pip setuptools wheel wheelhouse_uploader" | ||
|
||
# Check that we have the expected version and architecture for Python | ||
- "python --version" | ||
- "python -c \"import struct; print(struct.calcsize('P') * 8)\"" | ||
- "git submodule update --init --recursive" | ||
- "cd gensim" | ||
- "git checkout %BUILD_COMMIT%" | ||
- "git clean -fxd" | ||
- "git reset --hard" | ||
|
||
|
||
# Install the build and runtime dependencies of the project. | ||
- "%CMD_IN_ENV% pip install --timeout=60 --trusted-host 28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com --find-links http://28daf2247a33ed269873-7b1aad3fab3cc330e1fd9d109892382a.r6.cf2.rackcdn.com/ numpy==1.11.3 scipy==0.18.1 smart_open pytest pytest-rerunfailures cython pyemd testfixtures scikit-learn Morfessor==2.0.2a4" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use normal pip / pypi for these wheels? You'd need to start at scipy 1.0 but otherwise, as far as I know, you'd be alright. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unfortunately, we need to test with There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you test that on travis / linux + OSX, and test scipy 1.0 on Windows? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you do need these packages, probably better to use the https address : https://8003f898b26602186ccc-7b1aad3fab3cc330e1fd9d109892382a.ssl.cf2.rackcdn.com |
||
- "%CMD_IN_ENV% python setup.py bdist_wheel bdist_wininst" | ||
- ps: "ls dist" | ||
|
||
# Install the generated wheel package to test it | ||
- "pip install --pre --no-index --force-reinstall --find-links dist/ gensim" | ||
|
||
|
||
build: false | ||
|
||
|
||
test_script: | ||
# Change to a non-source folder to make sure we run the tests on the | ||
# installed library. | ||
- "cd .." | ||
- "mkdir empty_folder" | ||
- "cd empty_folder" | ||
- "pytest -rfxEXs --durations=20 --showlocals --rerun 3 --pyargs gensim" | ||
- "cd ../gensim/dist" | ||
- "ls" | ||
|
||
|
||
artifacts: | ||
# Archive the generated wheel package in the ci.appveyor.com build report. | ||
- path: "gensim\\dist\\*" | ||
|
||
|
||
on_success: | ||
# Upload the generated wheel package to Rackspace | ||
# On Windows, Apache Libcloud cannot find a standard CA cert bundle so we | ||
# disable the ssl checks. | ||
- "python -m wheelhouse_uploader upload --no-ssl-check --local-folder=. gensim-wheels" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you need to add the container name - in this case (for a release) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But |
||
|
||
|
||
notifications: | ||
- provider: Email | ||
to: [email protected] | ||
on_build_success: true | ||
on_build_failure: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you don't need this - Python should already be installed for the all versions you need.