-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add pypi deployment via Travis #3
Conversation
.travis.yml
Outdated
jobs: | ||
include: | ||
- stage: build | ||
after_script: skip |
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.
Do you need after_script: skip
here?
.travis.yml
Outdated
- cd build | ||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 .. | ||
install: | ||
- . .travis.setup |
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.
Better .travis.install
.travis.yml
Outdated
- mkdir build | ||
- cd build | ||
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 .. | ||
install: |
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.
Move it to the "build" stage. I know that not necessary but still will be more explicit
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.
if I move it here deploy fails:
subprocess.CalledProcessError: Command '('cmake', '-DCMAKE_BUILD_TYPE=Release', '-DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0', '.')' returned non-zero exit status 1
...
auditwheel: command not found
...
twine: command not found
...
and it looks like install
does not run for this stage.
See full logs: https://api.travis-ci.org/v3/job/346796133/log.txt
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.
You need to debug this because it works perfectly and I did it multiple times, e.g. https://github.com/vmarkovtsev/ggmbox/blob/master/.travis.yml
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.
but you do not use stages in your example...
@vmarkovtsev, Also I find one more problem:
in case of error, twine returns the error message instead of 1 code (https://github.com/pypa/twine/blob/master/twine/__main__.py#L27). |
And this is not outdated. #3 (comment) |
.travis.yml
Outdated
|
||
jobs: | ||
include: | ||
- stage: build |
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 don't see much changes...
Also script
should run the tests, not install.
And be aware that this project is actually C++. There are python bindings, but there can be other bindings too. Don't nail it to Python.
dist: trusty
sudo: required
matrix:
include:
- language: python
python:
- 3.4
- 3.5
- 3.6
env:
- CUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0
install: . .python.install
deploy:
- if tag
- twine upload dist/*manylinux* -u $PYPI_LOGIN -p $PYPI_PASS
language: cpp
install:
- mkdir build
- cd build
- cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 ..
notifications:
email: false |
@vmarkovtsev I adopt your script.
does not work at all. and any modifications of this code.
But It should be the same as I share earlier #3 (comment). You should add PyPI login and password to Travis settings to |
@zurk If setting several python versions do not work - grow the matrix and use YAML pointers to be DRY. |
I will add the login and password as soon as we merge this. |
I think I did exactly what you are saying |
.travis.yml
Outdated
tags: true | ||
- language: python | ||
python: 3.5 | ||
before_install: |
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.
You don't need virtualenv in this ephemeral environment, nothing to isolate from. Each job runs in a separate instance.
@zurk Almost there |
Signed-off-by: Konstantin Slavnov [email protected]
Yes, now it works without virtualenv activation. Before I have some troubles. Looks like artifact while searching how to make it work. |
Signed-off-by: Konstantin Slavnov [email protected]