forked from nikolasibalic/ARC-Alkali-Rydberg-Calculator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
68 lines (66 loc) · 1.99 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
language: generic
env:
global:
- TWINE_USERNAME=nikolasibalic
matrix:
include:
- os: linux
sudo: required
env: TOXENV=py27
- os: linux
sudo: required
env: TOXENV=py3
- os: osx
language: generic
env: TOXENV=py3
- os: osx
language: generic
env: TOXENV=py37
- os: osx
language: generic
env: TOXENV=py36
before_script:
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
if [[ "$TOXENV" == "py27" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
fi;
else
if [[ "$TOXENV" == "py27" ]]; then
wget https://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh;
else
wget https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh -O miniconda.sh;
fi;
fi
- chmod +x miniconda.sh
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH=$HOME/miniconda/bin:$PATH
script:
- if [[ "$TOXENV" == "py36" ]]; then
conda create --yes -n py36 python=3.6;
source activate py36;
fi;
- if [[ "$TOXENV" == "py37" ]]; then
conda create --yes -n py37 python=3.7;
source activate py37;
fi;
- conda update -n base --yes conda
- pip install --user -r requirements.txt
- pip install --user wheel
- python -m compileall -f arc/*.py
- python setup.py build
- rm -rf build
- |
if [[ $TRAVIS_TAG ]]; then
conda install --yes twine;
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
python setup.py sdist bdist_wheel;
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*.whl;
else
if [[ "$TOXENV" == "py3" ]]; then
python setup.py sdist
python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*.tar.gz;
fi;
fi;
fi