-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ Test on master, develop, release-* branches + Test when a commit is tagged as v* + Test with tox on linux (py37), on windows (py36, py37, py38) + Deploy to GitHub Release only the tagged commits + Compile executable for Ubuntu18.04, Windows10
- Loading branch information
1 parent
61cdae5
commit 66aee5f
Showing
10 changed files
with
124 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,98 @@ | ||
# Config file for automatic testing at travis-ci.org | ||
|
||
language: python | ||
python: | ||
- 3.8 | ||
- 3.7 | ||
- 3.6 | ||
cache: | ||
- pip | ||
- directories: | ||
- $HOME/.pyenv | ||
# Would be great to cache Postgres here but dir names with spaces are split into two and escaping doesn't work | ||
# - "/c/Program\ Files/PostgreSQL" | ||
|
||
env: | ||
- EXE_NAME=cjdb DISTPATH=$TRAVIS_BUILD_DIR/dist | ||
os: | ||
- linux | ||
|
||
branches: | ||
only: | ||
- master | ||
- develop | ||
# Run on release-* branches. Case insensitive. | ||
- /^(?i:release)-.*$/ | ||
# A build is triggered with a tag push, in which case the branch name is | ||
# the tag name. Thus in order for on.tags:true to work, the tag-branch | ||
# must be safelisted | ||
- /^v.*$/ | ||
|
||
stages: | ||
- name: test | ||
- name: deploy | ||
# The executable is built only with python3.7 on the master branch | ||
if: branch = master AND env(TRAVIS_PYTHON_VERSION) = 3.7 | ||
|
||
jobs: | ||
include: | ||
- name: Python 3.7.5 on Bionic Ubuntu | ||
dist: bionic | ||
before_install: | ||
- export EXE_PKG="$EXE_NAME"_"$TRAVIS_CPU_ARCH"_ubuntu1804 | ||
- name: Python 3.7.5 with pyenv on Windows | ||
os: windows | ||
language: shell | ||
before_install: | ||
- export PATH="$HOME/.pyenv/pyenv-win/bin:$HOME/.pyenv/pyenv-win/shims:$HOME/.pyenv/pyenv-win/versions/3.7.5:$HOME/.pyenv/pyenv-win/versions/3.7.5/Scripts:$PATH" | ||
- export EXE_PKG="$EXE_NAME"_"$TRAVIS_CPU_ARCH"_windows10 | ||
- if [ -z "$(ls -A $HOME/.pyenv)" ]; then | ||
git clone /~https://github.com/pyenv-win/pyenv-win.git $HOME/.pyenv; | ||
pyenv install -q 3.6.7; | ||
pyenv install -q 3.7.5; | ||
pyenv install -q 3.8.1; | ||
fi | ||
- pyenv rehash | ||
- pyenv global 3.7.5 | ||
- pyenv local 3.7.5 | ||
- python --version | ||
- python -m pip install --upgrade pip | ||
- pip install pywin32 | ||
- choco install postgresql11 | ||
|
||
install: | ||
- pip install -U tox-travis | ||
|
||
# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors | ||
install: pip install -U tox-travis | ||
script: | ||
- tox | ||
|
||
# Command to run tests, e.g. python setup.py test | ||
script: tox | ||
before_deploy: | ||
- pip install pyinstaller | ||
- pip install -r requirements.txt | ||
- pyinstaller --name $EXE_NAME --onefile cjio_dbexport/cli.py --distpath $DISTPATH | ||
- sleep 1 | ||
- cat $TRAVIS_BUILD_DIR/build/cjdb/warn-cjdb.txt | ||
- ls -l $DISTPATH | ||
- $DISTPATH/$EXE_NAME || $DISTPATH/$EXE_NAME.exe | ||
- | | ||
case $TRAVIS_OS_NAME in | ||
windows) | ||
7z a -t7z $EXE_PKG.zip $DISTPATH/$EXE_NAME.exe | ||
rm $DISTPATH/$EXE_NAME.exe | ||
;; | ||
linux) | ||
zip -r $EXE_PKG.zip $DISTPATH/$EXE_NAME | ||
rm $DISTPATH/$EXE_NAME | ||
;; | ||
esac | ||
deploy: | ||
- provider: releases | ||
cleanup: false | ||
token: | ||
secure: nt4IH6uOIpATCz8BK15FCLMAXswJnnfJmRb6umP8NSB3J4zCIZPZ0p5k8jj9zXlcMCBpTDEONIhoN72DhRUXZ4jGruNfFAu+nHAsezKEjhm8i0lpqMkHrNjYmaTn5Wk+uXXKe5D1Dw9WwBgKvjkY/ADtS53fTusCS6LnmPLUkjPIKIJbRhVyShGexmc4V9J96atn93aETX2C+oShMxDnMHLABRrXaOuxJmXyjSfl3U9L+uf6mRCTUN9f0LS3XTUIgbDWTVa3nItFg+fQ1GYgNTFbCi7GhqKLEqm1VZ9ZgFv+yMFExWaDxtYXqPIr5AwwNl8PHQc+FmsZu0nzaYvmiZTddBqYivMu47wURGV07sY/jXcyi2hf9zswWxWS3oZmDYXK5h385V0v+0ZKVYj2Ux8w9s8XBQqE7nMbpFu/9PtVcm5A9vPw61ceuzTk9WMs7E91QUvvPujXg2Vl7FuvCoMtZlxODAgXiQ+Vr37TYVfxxOrXadzLRFNvkFVjHHr/uog8yiGszEZXi6mJER5cJpOyVqqaOm4r9LKSH556YpUckoqeODD2DjVAspBAzsklJWCHQAG758H+DnYaYLDzCKLFoCahY67m/e1VIGFhxdI1W3s7dMCrJDjID2H5MgqlArshyvXp50bKnDyKuU0FQ6A9nO3RFVi5xGAJBN8l5Ro= | ||
file_glob: true | ||
file: cjdb_*.zip | ||
on: | ||
repo: balazsdukai/cjio_dbexport | ||
tags: true | ||
edge: true | ||
|
||
notifications: | ||
email: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--index-url https://pypi.python.org/simple/ | ||
|
||
-e git+/~https://github.com/cityjson/cjio@develop#egg=cjio | ||
|
||
-e . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tox] | ||
envlist = py36, py37, py38, flake8 | ||
envlist = py36, py37, py38 | ||
|
||
[travis] | ||
python = | ||
|