Richard Burton | dc0c6ed | 2020-04-08 16:39:05 +0100 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | set -e |
| 3 | |
| 4 | JENKINS_BUILD=0 |
| 5 | while getopts ":j" opt; do |
| 6 | case "$opt" in |
| 7 | j) JENKINS_BUILD=1 ;; |
| 8 | esac |
| 9 | done |
| 10 | |
| 11 | python3.6 -m venv toxenv |
| 12 | source toxenv/bin/activate |
| 13 | pip install virtualenv==16.3.0 tox |
| 14 | |
| 15 | export ARMNN_INCLUDE=$(pwd)/../../include |
| 16 | python ./swig_generate.py |
| 17 | |
| 18 | tox -e devenv |
| 19 | # If jenkins build, also run unit tests, generate docs, etc |
| 20 | if [ $JENKINS_BUILD == 1 ]; then |
| 21 | tox |
| 22 | tox -e doc |
| 23 | fi |
| 24 | |
| 25 | deactivate |
| 26 | rm -rf toxenv |
| 27 | |
| 28 | source env/bin/activate |