Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
105 lines (95 sloc) 3.92 KB
cache: pip
matrix:
include:
- os: linux
sudo: required
language: python
python: 2.7
env: "TOXENV=pep8 ARTIFACTS_BUCKET=pyfa.builds ARTIFACTS_PATHS=\"$TRAVIS_BUILD_DIR/pyfa_linux.zip:/$TRAVIS_BUILD_DIR/pyfa_linux_debug.zip:$TRAVIS_BUILD_DIR/build/pyfa/warnpyfa.txt\""
- os: osx
language: generic
python: 2.7
env: "TOXENV=pep8 ARTIFACTS_BUCKET=pyfa.builds ARTIFACTS_PATHS=\"$TRAVIS_BUILD_DIR/pyfa_mac.zip:$TRAVIS_BUILD_DIR/pyfa_mac_debug.zip:$TRAVIS_BUILD_DIR/build/pyfa/warnpyfa.txt\""
addons:
apt:
packages:
before_install:
- pip install tox
# We're not actually installing Tox, but have to run it before we install wxPython via Conda. This is fugly but vOv
- tox
# Update the environment
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get install libatk-adaptor libgail-common;
sudo apt-get install libatk-adaptor:i386 libgail-common:i386;
sudo apt-get install gtk2-engines;
sudo apt-get install gtk2-engines-*;
sudo apt-get install libfreetype6-dev;
sudo apt-get install fonts-cantarell lmodern ttf-aenigma ttf-georgewilliams ttf-bitstream-vera ttf-sjfonts ttf-tuffy tv-fonts;
sudo apt-get install ubuntustudio-font-meta;
sudo apt-get update && sudo apt-get --reinstall install -qq language-pack-en language-pack-ru language-pack-he language-pack-zh-hans;
fi
# Disabling brew for now to try and trim down build time
# - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# brew update;
# brew install graphviz;
# fi
# Conda Install
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
# Useful for debugging any issues with conda
# - conda info -a
install:
# install wxPython 3.0.0.0
# - conda install -c https://conda.anaconda.org/travis wxpython
- conda install -c anaconda wxpython=3.0.0.0
# Not sure why this only works on OS X, but it fixes an issue with matplotlib
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
conda install matplotlib;
fi
before_script:
- pip install -r requirements.txt
- pip install -r requirements_test.txt
script:
- py.test --cov=./
after_success:
# Upload coverage data
- bash <(curl -s https://codecov.io/bash)
# Install requirements to build the package
- pip install -r requirements_build.txt
# copy pyinstaller build files into place
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cp $TRAVIS_BUILD_DIR/dist_assets/linux/pyfa.spec $TRAVIS_BUILD_DIR/pyfa.spec;
cp $TRAVIS_BUILD_DIR/dist_assets/linux/pyfa_debug.spec $TRAVIS_BUILD_DIR/pyfa_debug.spec;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa.spec $TRAVIS_BUILD_DIR/pyfa.spec;
cp $TRAVIS_BUILD_DIR/dist_assets/mac/pyfa_debug.spec $TRAVIS_BUILD_DIR/pyfa_debug.spec;
fi
# Run build
- cd $TRAVIS_BUILD_DIR
- pyinstaller --clean --noconfirm --windowed $TRAVIS_BUILD_DIR/pyfa.spec
- pyinstaller --clean --noconfirm --windowed $TRAVIS_BUILD_DIR/pyfa_debug.spec
# zip builds
- cd $TRAVIS_BUILD_DIR/dist/;
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
zip -r $TRAVIS_BUILD_DIR/pyfa_linux.zip $TRAVIS_BUILD_DIR/dist/pyfa;
zip -r $TRAVIS_BUILD_DIR/pyfa_linux_debug.zip $TRAVIS_BUILD_DIR/dist/pyfa_debug;
fi
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
zip -r $TRAVIS_BUILD_DIR/pyfa_mac.zip $TRAVIS_BUILD_DIR/dist/pyfa;
zip -r $TRAVIS_BUILD_DIR/pyfa_mac_debug.zip $TRAVIS_BUILD_DIR/dist/pyfa_debug;
fi
# Debugging
- ls $TRAVIS_BUILD_DIR
addons:
artifacts:
s3_region: "us-west-2"
You can’t perform that action at this time.