Browse Source

Travis: allow multiple tasks

refactoring
Matthias Volk 5 years ago
parent
commit
ca5d901052
  1. 4
      .travis.yml
  2. 18
      travis/build-helper.sh

4
.travis.yml

@ -28,7 +28,7 @@ jobs:
# Docker Storm master # Docker Storm master
- os: linux - os: linux
compiler: gcc compiler: gcc
env: TASK=Test CONFIG=Release DOCKER=storm:travis PYTHON=python3
env: TASK=TestDocker CONFIG=Release DOCKER=storm:travis PYTHON=python3
script: script:
travis/build.sh travis/build.sh
deploy: deploy:
@ -38,7 +38,7 @@ jobs:
# Docker Storm master in debug mode # Docker Storm master in debug mode
- os: linux - os: linux
compiler: gcc compiler: gcc
env: TASK=Test CONFIG=Debug DOCKER=storm:travis-debug PYTHON=python3
env: TASK=TestDocker CONFIG=Debug DOCKER=storm:travis-debug PYTHON=python3
script: script:
travis/build.sh travis/build.sh
deploy: deploy:

18
travis/build-helper.sh

@ -58,27 +58,23 @@ run() {
esac esac
travis_fold end build_stormpy travis_fold end build_stormpy
# Perform task
case $TASK in
Test*)
# Perform tasks
if [[ "$TASK" == *Test* ]]
then
# Run tests # Run tests
set +e set +e
python setup.py test python setup.py test
;;
fi
Documentation*)
if [[ "$TASK" == *Documentation* ]]
then
# Generate documentation # Generate documentation
pip install sphinx sphinx_bootstrap_theme pip install sphinx sphinx_bootstrap_theme
cd doc cd doc
make html make html
touch build/html/.nojekyll touch build/html/.nojekyll
rm -r build/html/_sources rm -r build/html/_sources
;;
*)
echo "Unrecognized value of TASK: $TASK"
exit 1
esac
fi
} }

Loading…
Cancel
Save