mirror of https://github.com/abinit/abipy.git
117 lines
3.6 KiB
YAML
117 lines
3.6 KiB
YAML
language: python
|
|
#cache: pip
|
|
|
|
#dist: precise
|
|
sudo: false
|
|
|
|
env:
|
|
global:
|
|
- ABINIT_VERSION=8.10.1
|
|
- ABIPY_PYTEST=yes
|
|
- OPENBLAS_NUM_THREADS=1
|
|
- OMP_NUM_THREADS=1
|
|
|
|
matrix:
|
|
include:
|
|
- os: linux
|
|
python: 3.6
|
|
env:
|
|
- ABIPY_INSTALLER=pip ABIPY_PYTEST=no
|
|
- os: linux
|
|
python: 3.7
|
|
env:
|
|
- ABIPY_INSTALLER=conda ABIPY_COVERALLS=yes
|
|
- os: linux
|
|
python: 3.7
|
|
# https://github.com/travis-ci/travis-ci/issues/9815
|
|
dist: xenial
|
|
sudo: true
|
|
env:
|
|
- ABIPY_INSTALLER=pip ABIPY_SPHINX=yes
|
|
|
|
install:
|
|
#- set -ev # exit on first error, print each command
|
|
- env
|
|
#- ulimit -s unlimited
|
|
|
|
- |
|
|
if [ "${ABIPY_INSTALLER}" == "pip" ]; then
|
|
# pip-based installation.
|
|
source dev_scripts/conda_get.sh # Needed for Abinit
|
|
conda config --add channels conda-forge
|
|
echo "Installing abinit from abinit channel ..."
|
|
conda install -y -c abinit abinit=${ABINIT_VERSION}
|
|
abinit --version
|
|
abinit --build
|
|
|
|
sed -i '/pymatgen/d' requirements.txt
|
|
# https://github.com/pypa/pipenv/issues/2596
|
|
#pipenv lock --clear
|
|
travis_wait pip install -r requirements.txt
|
|
travis_wait pip install -r requirements-optional.txt
|
|
conda install -y -c conda-forge graphviz python-graphviz
|
|
#pip install graphviz
|
|
#travis_wait pip uninstall -y pymatgen
|
|
|
|
elif [ "${ABIPY_INSTALLER}" == "conda" ]; then
|
|
# Install conda https://conda.io/docs/travis.html
|
|
source dev_scripts/conda_get.sh
|
|
#sed -i '/pymatgen/d' requirements.txt
|
|
source dev_scripts/conda_install.sh
|
|
conda uninstall -y pymatgen
|
|
fi
|
|
|
|
- if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mock; fi
|
|
- pip install coverage>=4.4 -U --upgrade-strategy=eager
|
|
|
|
# Mayavi (optional requirement)
|
|
#- if [[ "${TRAVIS_PYTHON_VERSION}" == "2.7" ]]; then conda install mayavi; fi
|
|
#- if [[ "${TRAVIS_PYTHON_VERSION}" == "3.6" ]]; then conda install vtk && pip install mayavi; fi
|
|
|
|
# Use gmatteo's pymatgen fork
|
|
#- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
|
|
|
|
- git clone --depth=50 https://github.com/gmatteo/pymatgen.git && cd pymatgen && python setup.py install && cd ../
|
|
|
|
# Use pymatgen master
|
|
#- git clone --depth=50 https://github.com/materialsproject/pymatgen.git && cd pymatgen && pip install -r requirements.txt && pip install -r requirements-optional.txt && python setup.py install && cd ../
|
|
|
|
- python setup.py install
|
|
- mkdir -p ${HOME}/.abinit/abipy
|
|
- cp abipy/data/managers/travis_scheduler.yml ${HOME}/.abinit/abipy/scheduler.yml
|
|
- cp abipy/data/managers/travis_manager.yml ${HOME}/.abinit/abipy/manager.yml
|
|
- ./dev_scripts/pyclean.py .
|
|
|
|
before_script:
|
|
# This to run tests requiring a graphical user e.g. mayavi
|
|
# https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI
|
|
- "export DISPLAY=:99.0"
|
|
- if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head || true; fi
|
|
|
|
# command to run tests
|
|
script: ./dev_scripts/runtests.sh
|
|
|
|
branches:
|
|
only:
|
|
- master
|
|
- develop
|
|
|
|
after_success:
|
|
- if [[ "${ABIPY_COVERALLS}" == "yes" ]]; then coveralls; fi
|
|
|
|
notifications:
|
|
email:
|
|
recipients:
|
|
- gmatteo@gmail.com
|
|
on_success: change
|
|
on_failure: always
|
|
|
|
# https://docs.travis-ci.com/user/deployment/pages/
|
|
#deploy:
|
|
# provider: pages
|
|
# skip_cleanup: true
|
|
# github_token: $GITHUB_TOKEN # Set in travis-ci.org dashboard
|
|
# local_dir: ${TRAVIS_BUILD_DIR}/yourfolder
|
|
# on:
|
|
# branch: master
|