diff --git a/.travis.yml b/.travis.yml index c69885d5..e911d7dc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,8 +18,9 @@ addons: - libx11-dev - libxtst-dev -# install any dependencies -install: "pip install -r packaging/pip_requirements.txt" +# install any dependencies and build package +install: + - if [[ $INSTALL_VARIANT == "pip" ]]; then travis_retry pip install -r packaging/pip_requirements.txt; fi before_script: - export DISPLAY=:99.0 @@ -28,6 +29,7 @@ before_script: # run tests script: + - if [[ $INSTALL_VARIANT != "pip" ]]; then cd packaging && bash packager_docker.sh && cd ..; fi - python tests/test_calibrator.py - python tests/test_desktopcontrol.py - python tests/test_finder.py diff --git a/packaging/packager_deb.sh b/packaging/packager_deb.sh new file mode 100644 index 00000000..8c3cbfc3 --- /dev/null +++ b/packaging/packager_deb.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exit 0 diff --git a/packaging/packager_docker.sh b/packaging/packager_docker.sh new file mode 100644 index 00000000..e508fbe9 --- /dev/null +++ b/packaging/packager_docker.sh @@ -0,0 +1,13 @@ +#!/bin/bash + +readonly install_variant="${INSTALL_VARIANT:-pip}" + +if [ "$install_variant" == "rpm" ]; then + sudo docker run \ + -v $(pwd)/..:/guibot:rw fedora:latest \ + /bin/bash /guibot/packaging/packager_rpm.sh +elif [ "$install_variant" == "deb" ]; then + sudo docker run \ + -v $(pwd)/..:/guibot:rw ubuntu:latest \ + /bin/bash /guibot/packaging/packager_deb.sh +fi diff --git a/packaging/packager_rpm.sh b/packaging/packager_rpm.sh new file mode 100644 index 00000000..8c3cbfc3 --- /dev/null +++ b/packaging/packager_rpm.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +exit 0