-
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
136 lines (127 loc) · 6.39 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
notifications:
email: false
webhooks: https://coveralls.io/webhook?repo_token=COVERALLS_REPO_TOKEN
language: python # this works for Linux but is an error on macOS or Windows
jobs:
include:
- name: "Xenial Linux"
python: 3.8 # this works for Linux but is ignored on macOS or Windows
services:
- xvfb # activate xvfb for tests that require a GUI
before_install:
- python3 -c "exec(\"import tkinter\\nprint(tkinter.TkVersion)\")"
- name: "macOS"
os: osx
osx_image: xcode11.4
language: shell # 'language: python' is an error on Travis CI macOS
before_install:
- export HOMEBREW_NO_AUTO_UPDATE=1 # skip brew's time-consuming auto-update
- brew reinstall python@3.8
- echo 'export PATH="/usr/local/Cellar/python@3.8/3.8.2/bin:$PATH"' >> ~/.zshrc
- brew install tcl-tk
- python3 --version
- python3 -c "exec(\"import tkinter\\nprint(tkinter.TkVersion)\")"
- name: "Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell # 'language: python' is an error on Travis CI Windows
before_install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
- choco install advanced-installer --version=17.0.0
- choco install make
- python -c "exec(\"import tkinter\\nprint(tkinter.TkVersion)\")"
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
# install dependencies
install:
- pip3 install --upgrade pip # all three OSes agree about 'pip3'
- sudo pip3 install -r requirements.txt || pip3 install -r requirements.txt
- python3 setup.py install || python setup.py install
- pip3 install sphinx
- pip3 install codecov
- pip3 install coveralls
- pip3 install pyinstaller==3.6
# workaround for pyinstaller issue #5004
- if [ "$TRAVIS_OS_NAME" != "osx" ]; then
pip3 install -Iv matplotlib==3.2.2;
fi
# commands to run tests
script:
# compile docs (that will be distributed with bundle)
- cd docs
- make html
- cd ..
- travis_wait 30 sleep 1200 &
# linux bundling (with wheel upload to pypi)
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
python3 -m coverage run tests/unit_test_all.py;
bash plenopticam/scripts/bundling/py2bin.sh;
export RELEASE_PKG_FILE=$(ls dist/*.tar.gz);
pip3 install --upgrade twine;
python3 setup.py sdist bdist_wheel;
twine upload -r testpypi dist/* -u __token__ -p $TEST_PYPI;
pip3 uninstall -y plenopticam;
pip3 install -i https://test.pypi.org/simple/ plenopticam;
export RELEASE_WHL_FILE=$(ls dist/*.whl);
fi
# osx bundling
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
python3 -m coverage run tests/unit_test_all.py;
npm install --global create-dmg;
bash plenopticam/scripts/bundling/pyinst2app.sh;
sleep 1;
export RELEASE_PKG_FILE=$(ls dist/*.dmg);
fi
# win bundling
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then
python -m coverage run tests/unit_test_all.py;
pip3 install pypiwin32;
pip3 install pyinstaller --upgrade;
plenopticam/scripts/bundling/py2exe.bat;
sleep 1;
plenopticam/scripts/bundling/msi_auto-gen.bat;
export RELEASE_PKG_FILE=$(ls dist/*.msi);
fi
after_success:
#- python3 tests/unit_test_exe.py || python tests/unit_test_exe.py # open up executable file
- coveralls
before_deploy:
- echo "deploying $RELEASE_PKG_FILE to GitHub releases"
deploy:
# upload bundled apps to GitHub
- provider: releases
name: PlenoptiCam $TRAVIS_TAG
skip_cleanup: true
api_key:
secure: mgks1YLiAjZzv+qEccnmm33AQP427IOr2k/fK5mezI5Ye+NzfO+vPrlSgbkO7SoqtTlApWqSOzU8UFm/1wI13T8zuo6+AJcBCv7dQAOBZNrN4eAW6yWepirHgZ7JKMwMNIUKCM2GejCi6KvA/7lQrIf7KUNZBU4QjQ5sZGKEeSudwJ+uMfnvMZvznGvunySrA6CvPXoAcZ1Xa8GwvBZPP+FZNLpfnQIZ9/xnirJyc36w69z4BhlTjnbK/VIQ6e1UqnCIIv0LjbQHLjPGRyhkU/NPRHjKmz7nlqule+Xp1iJhDrdvkXoRo0EPTmV2hjk0vjUzcWC3hqAgs7AmasbLt0nG7J9AB2SkRfMsNEN8aikixNkiyZ6zid6fiTc8ZeYGFukfxXH1rBcEJ4WCwfzBpaSjSqP6aCuZw5FRS6W45i4So+Em5TguqqlC+Hg4+K8iLdhFenZiSmzhUzZDY+nRQFqZNpc2HimEPTDM6z/+2c3pDYOMhchY5ZWxnWJ5A/m39yCgWi/zo1MPQNfsak4zN/Ymt7TTm4bUwCSlbCxQ9G9kMxntwKJhczOteLwUFMHaTrLBMflIpU6rMKetVh+dC7EtoVPkNBvfixYOXq7tgmi2T5LTLsgzSLxcZt4tzrP+lNC+Ek9Tk7wo/DWr3y8Wu+2goLjn4x+SEI6AxoiMNcU=
file:
- "${RELEASE_PKG_FILE}"
draft: true
on:
repo: hahnec/plenopticam
tags: false
all_branches: true
# upload wheel file to GitHub
- provider: releases
name: PlenoptiCam $TRAVIS_TAG
skip_cleanup: true
api_key:
secure: mgks1YLiAjZzv+qEccnmm33AQP427IOr2k/fK5mezI5Ye+NzfO+vPrlSgbkO7SoqtTlApWqSOzU8UFm/1wI13T8zuo6+AJcBCv7dQAOBZNrN4eAW6yWepirHgZ7JKMwMNIUKCM2GejCi6KvA/7lQrIf7KUNZBU4QjQ5sZGKEeSudwJ+uMfnvMZvznGvunySrA6CvPXoAcZ1Xa8GwvBZPP+FZNLpfnQIZ9/xnirJyc36w69z4BhlTjnbK/VIQ6e1UqnCIIv0LjbQHLjPGRyhkU/NPRHjKmz7nlqule+Xp1iJhDrdvkXoRo0EPTmV2hjk0vjUzcWC3hqAgs7AmasbLt0nG7J9AB2SkRfMsNEN8aikixNkiyZ6zid6fiTc8ZeYGFukfxXH1rBcEJ4WCwfzBpaSjSqP6aCuZw5FRS6W45i4So+Em5TguqqlC+Hg4+K8iLdhFenZiSmzhUzZDY+nRQFqZNpc2HimEPTDM6z/+2c3pDYOMhchY5ZWxnWJ5A/m39yCgWi/zo1MPQNfsak4zN/Ymt7TTm4bUwCSlbCxQ9G9kMxntwKJhczOteLwUFMHaTrLBMflIpU6rMKetVh+dC7EtoVPkNBvfixYOXq7tgmi2T5LTLsgzSLxcZt4tzrP+lNC+Ek9Tk7wo/DWr3y8Wu+2goLjn4x+SEI6AxoiMNcU=
file:
- "${RELEASE_WHL_FILE}"
draft: true
on:
repo: hahnec/plenopticam
tags: false
condition: $TRAVIS_OS_NAME = linux
# upload wheel file to PyPi
- provider: pypi
skip_existing: true
cleanup: true
distributions: sdist bdist_wheel
server: https://upload.pypi.org/legacy/
user: __token__
password:
secure: LNQN75z48lArJ+sCwVvpqnF36kkn1AiLF3oswSgS/fDuc3HyQLv87n1zsye9E4a7TxiJuizt2fwgQRioKtBowKoNTptAJtCuLfPD2N8TVF1WbdT1hkdNvUay30YU/eTK5LFDvaoVj7wyMLoc9FuOnhDZ7UDXslf7+5bTDLcT/LfLBNiFAibt8Wr+7xGvdPaq1h8Oo7adSOSaKNLWHlHFWxj+Sp78U+Lyzr+Y/6IsMJ1k9OI/o4KQswM8V9TieVhbxDnhbmQRbBuvN+uA+2Dc3jGaV9b+qwj4GefQB9kB2UXXPrbdUjGJqQweOyhANTZiiIgmass8SDSjgs2KRj1SZs5lrsMuSItY94pKa5eS0h5YGzwQoHS/K6aD8vsf8hky7XMXJ+2iNH1p+9l7vYDZ+Ve/0hV4skNfga1Z6o/131KFx43oLN4TJc52Ty+VH/fJka2fi4f92xGrPJyUyL5ELSwdPftqH+7FrFPk9Z6QXF24km2QtYpvxhORmHZoVPRYZczkBmnLE2LWdO1HCZpKgflp3Od4QCNRDETQJ3uS99iwl9C1+gJSFuJjD5cfi6GQkyu2h+OUKsSauQWZm6tRzpSQoXCylaigclCxRbNOsbDKLVZktPd30GVOtywAaFwrejsIq4F1o4PTLn+BgHrd+mlZOLnGP7tg5ixvr9I5wpI=
on:
condition: ($TRAVIS_OS_NAME = linux) && ($TRAVIS_BRANCH = master)
tags: false