summaryrefslogtreecommitdiff
path: root/tools/travis-ci/run.sh
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-07-01 02:53:55 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-07-01 10:00:57 +0200
commitf194ff32ac3fd5bab88607ea6bf09a73adb99758 (patch)
tree9f9322b2b93962081bbbfd7e88ae05424f03a717 /tools/travis-ci/run.sh
parent69a001819c9ac36bb3210e475d099cc2abbbf89f (diff)
appveyor.yml: add a /arch:AVX2 config on Windows
Try running the tests if the CPU supports AVX2.
Diffstat (limited to 'tools/travis-ci/run.sh')
-rwxr-xr-xtools/travis-ci/run.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/travis-ci/run.sh b/tools/travis-ci/run.sh
index ac21dfe7..5118657b 100755
--- a/tools/travis-ci/run.sh
+++ b/tools/travis-ci/run.sh
@@ -142,6 +142,15 @@ elif [ "${TRAVIS_OS_NAME}" == "windows" ]; then
OPJ_CC_VERSION=vs????
fi
fi
+ if [ "${OPJ_CI_INSTRUCTION_SETS-:}" == "/arch:AVX2" ]; then
+ cl $PWD/tools/travis-ci/detect-avx2.c
+ if ./detect-avx2.exe; then
+ echo "AVX2 available on CPU"
+ else
+ echo "AVX2 not available on CPU. Disabling tests"
+ export OPJ_CI_SKIP_TESTS=1
+ fi
+ fi
else
echo "OS not supported: ${TRAVIS_OS_NAME}"; exit 1
fi