-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy path.travis.yml
96 lines (87 loc) · 4.77 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
language: python
matrix:
include:
- os: linux
language: python
python: 3.6
env: PYTHONVER=3.6
- os: linux
language: python
python: 3.7
env: PYTHONVER=3.7
- os: linux
language: python
python: 3.8
env: PYTHONVER=3.8
- os: osx
language: generic
python: 3.6
env: PYTHONVER=3.6
- os: osx
language: generic
python: 3.7
env: PYTHONVER=3.7
- os: osx
language: generic
python: 3.8
env: PYTHONVER=3.8
install:
- if [[ ${TRAVIS_OS_NAME} == "osx" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi;
echo "DONE"
- bash miniconda.sh -b -p ${HOME}/miniconda
- export PATH="${HOME}/miniconda/bin:${PATH}"
- conda config --set show_channel_urls true
- conda config --set always_yes yes --set changeps1 no
- conda update -q --all
- conda create -n test python=${PYTHONVER}
- source activate test
- conda update -q --all
- conda install -q numba>=0.50
- conda install -q -c conda-forge numpy>=1.0 pandas>=1.0.5 networkx>=2.0 matplotlib>=3.0 pytest>=5.0 seaborn>=0.10 sympy>=1.5 pytables>=3.6 PyYAML>=3.0
- conda install -q -c conda-forge coveralls coverage pytest pytest-cov
- if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TRAVIS_PULL_REQUEST} == false ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH} == "" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]; then
conda install -q -c conda-forge sphinx sphinx_rtd_theme ply pandoc pypandoc nbsphinx ipython;
conda install -q conda-build conda-verify anaconda-client twine;
pip install travis-sphinx;
fi
- python setup.py develop
script:
- export PYTHONDONTWRITEBYTECODE=1
- pytest --doctest-modules -v --cov coveralls --cov-report term --cov=exa --cov-report xml
- if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TRAVIS_PULL_REQUEST} == false ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH} == "" ]] && [[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${PYTHONVER} == "3.8" ]]; then
rm -rf docs/source/*.txt;
SPHINX_APIDOC_OPTIONS=members,undoc-members,show-inheritance sphinx-apidoc -eM -s txt -o docs/source/ exa *test*;
travis-sphinx build;
fi
after_success:
- coveralls
- bash <(curl -Ls https://coverage.codacy.com/get.sh) report --language Python -r coverage.xml
- bash <(curl -Ls https://coverage.codacy.com/get.sh) final
- if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TRAVIS_PULL_REQUEST} == false ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH} == "" ]] && [[ ${TRAVIS_BRANCH} == "master" ]] && [[ ${PYTHONVER} == "3.8" ]]; then
travis-sphinx deploy;
fi
- if [[ ${TRAVIS_OS_NAME} == "linux" ]] && [[ ${TRAVIS_PULL_REQUEST} == false ]] && [[ ${TRAVIS_PULL_REQUEST_BRANCH} == "" ]] && [[ ${TRAVIS_BRANCH} == "master" ]]; then
export pyver="py${PYTHONVER/./}";
export ver=`cat exa/static/version.txt`;
git remote set-url origin https://${GH_TOKEN}@github.com/exa-analytics/exa.git;
git tag ${ver};
git push --tags;
sed -i "s/version = .* /version = \"${ver}\"/" meta.yaml;
cat meta.yaml;
printf "[distutils]\nindex-servers =\n pypi\n testpypi\n\n[pypi]\nrepository = https://upload.pypi.org/legacy/\nusername = __token__\npassword = ${pypi}\n\n[testpypi]\nrepository = https://test.pypi.org/legacy/\nusername = __token__\npassword = ${testpypi}" > ${HOME}/.pypirc;
python setup.py sdist;
python -m twine upload --repository pypi dist/*;
conda build --no-include-recipe .;
conda convert -f -p osx-64 ${HOME}/miniconda/envs/test/conda-bld/linux-64/exa-${ver}-${pyver}_0.tar.bz2 -o dist1/;
conda convert -f -p linux-32 ${HOME}/miniconda/envs/test/conda-bld/linux-64/exa-${ver}-${pyver}_0.tar.bz2 -o dist1/;
conda convert -f -p win-32 ${HOME}/miniconda/envs/test/conda-bld/linux-64/exa-${ver}-${pyver}_0.tar.bz2 -o dist1/;
conda convert -f -p win-64 ${HOME}/miniconda/envs/test/conda-bld/linux-64/exa-${ver}-${pyver}_0.tar.bz2 -o dist1/;
ls -lisah dist1;
anaconda login --username ${anaconda_username} --password ${anaconda_password};
anaconda upload --no-progress ${HOME}/miniconda/envs/test/conda-bld/linux-64/exa-${ver}-${pyver}_0.tar.bz2;
for i in $(ls -d dist1/*/); do echo "${i}exa-${ver}-${pyver}_0.tar.bz2"; anaconda upload --no-progress ${i}exa-${ver}-${pyver}_0.tar.bz2; done;
fi