summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-07-01 01:46:55 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-07-01 02:14:27 +0200
commit69a001819c9ac36bb3210e475d099cc2abbbf89f (patch)
tree1700ac217c803b7d5138df017ffa8702e2e16b47 /tools
parent8fa405ee15b5151df40d8d96460257ee5b510135 (diff)
.travis.yml: try to run tests in -mavx2 mode if the CPU supports it
And modify settings so as to hae a AVX2 compatible CPU
Diffstat (limited to 'tools')
-rwxr-xr-xtools/travis-ci/run.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh
index 950a0ee9..ac21dfe7 100755
--- a/tools/travis-ci/run.sh
+++ b/tools/travis-ci/run.sh
@@ -111,6 +111,17 @@ elif [ "${TRAVIS_OS_NAME}" == "linux" ]; then
else
echo "Compiler not supported: ${CC}"; exit 1
fi
+ if [ "${OPJ_CI_INSTRUCTION_SETS-:}" == "-mavx2" ]; then
+ AVX2_AVAIL=1
+ cat /proc/cpuinfo | grep avx2 >/dev/null || AVX2_AVAIL=0
+ if [[ "${AVX2_AVAIL}" == "1" ]]; then
+ echo "AVX2 available on CPU"
+ else
+ echo "AVX2 not available on CPU. Disabling tests"
+ cat /proc/cpuinfo | grep flags | head -n 1
+ export OPJ_CI_SKIP_TESTS=1
+ fi
+ fi
elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then
OPJ_OS_NAME=windows
if which cl > /dev/null; then