diff --git a/.travis.yml b/.travis.yml index 6161593c088245c0b9211207418e5d58bb320005..62d55ebc9e9ca1196a795d00298a31e8d909b3bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,25 +1,26 @@ os: osx env: - - PYENV_PYTHON_VERSION=3.5.0 +- PYENV_PYTHON_VERSION=3.5.0 +cache: + directories: + - "$HOME/.pyenv" before_install: - # Install and configure pyenv - - ci/travis/before_install.sh - +- alias enable_pyenv=eval "$(pyenv virtualenv-init -)" +- ci/travis/before_install.sh install: - - pyenv activate sakia-env - - pip install coveralls cx_Freeze - - pip install -r requirements.txt - - python gen_resources.py - - python gen_translations.py - - python setup.py build - +- ci/travis/build.sh script: - - coverage run --source=sakia.core,sakia.gui,sakia.models run_tests.py - +- ci/travis/test.sh after_success: - - coverage -rm - - coveralls +- ci/travis/after_success.sh -cache: - directories: - - $HOME/.pyenv \ No newline at end of file +before_deploy: zip -r sakia-${TRAVIS_OS_NAME}.zip build/ + +deploy: + provider: releases + api_key: + secure: MUdvTDBeCxO9d/EpzIhr+QYra/KxgYkXX6177SjqWCWDqw9xB3fwSUj8I9ht9DGtwVdadtveumtvLw3pbtVIR0GtIPC9pyvtNz4j6T4Ei3TSE6+StXdMK4NnInvPeTRlobGL+9sZt9MwheJwZ8YGewhBcR0F5UzVfxWeSSrxmyk= + file: sakia-${TRAVIS_OS_NAME}.zip + skip_cleanup: true + on: + tags: true diff --git a/ci/travis/before_install.sh b/ci/travis/before_install.sh index d2aa248fc20b1887a2e76ed85136ab6ffed28e8f..9fe61b7dbbc97c7ffe9020ce4ff58a78a52be364 100755 --- a/ci/travis/before_install.sh +++ b/ci/travis/before_install.sh @@ -1,3 +1,4 @@ +#!/usr/bin/env bash brew update brew install libsodium @@ -12,7 +13,7 @@ eval "$(pyenv virtualenv-init -)" pyenv activate sakia-env if [ $? -ne 0 ] then - echo "Installing pyenv" + echo "Sakia env cache cleared, rebuilding it..." env PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install $PYENV_PYTHON_VERSION pyenv shell $PYENV_PYTHON_VERSION @@ -35,7 +36,7 @@ then cd PyQt-gpl-5.5.1/ pyenv activate sakia-env python configure.py --verbose --confirm-license - make && make install + make -j 2 && make install pyenv rehash cd $HOME/sakia diff --git a/ci/travis/build.sh b/ci/travis/build.sh index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..07c77ae22d98dba5c627ab9a2bcf7e212669e505 100755 --- a/ci/travis/build.sh +++ b/ci/travis/build.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash +eval "$(pyenv virtualenv-init -)" + +pyenv activate sakia-env +pip install coveralls cx_Freeze +pip install -r requirements.txt +python gen_resources.py +python gen_translations.py +python setup.py bdist_dmg \ No newline at end of file