diff options
author | Sayed Adel <seiko@imavr.com> | 2022-06-16 14:24:45 +0200 |
---|---|---|
committer | Sayed Adel <seiko@imavr.com> | 2022-06-16 21:36:26 +0200 |
commit | 24d937546d09e5b7ed9b1075d52dfe63a0acd167 (patch) | |
tree | e9e743076da4eeb01bfa908e1df307c38c72a379 /tools | |
parent | 88d373cc5734e8cf47253f98c94403f124f1c017 (diff) | |
download | numpy-24d937546d09e5b7ed9b1075d52dfe63a0acd167.tar.gz |
CI: add workflow for non-optimized builds
since the support of zsystem, all current overflows have SIMD
support which leaves no room for testing pure C code that runs
on non-supported architectures.
note: smoke test no longer build with SIMD support
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/travis-test.sh | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/tools/travis-test.sh b/tools/travis-test.sh index 9cac1e9fa..063f0ff6e 100755 --- a/tools/travis-test.sh +++ b/tools/travis-test.sh @@ -36,11 +36,21 @@ setup_base() sysflags="$($PYTHON -c "from distutils import sysconfig; \ print (sysconfig.get_config_var('CFLAGS'))")" export CFLAGS="$sysflags $werrors -Wlogical-op -Wno-sign-compare" - # SIMD extensions that need to be tested on both runtime and compile-time via (test_simd.py) - # any specified features will be ignored if they're not supported by compiler or platform - # note: it almost the same default value of --simd-test execpt adding policy `$werror` to treat all - # warnings as errors - simd_test="\$werror BASELINE SSE2 SSE42 XOP FMA4 (FMA3 AVX2) AVX512F AVX512_SKX VSX VSX2 VSX3 NEON ASIMD VX VXE VXE2" + + build_args=() + # Strictly disable all kinds of optimizations + if [ -n "$WITHOUT_OPT" ]; then + build_args+=("--disable-optimization") + # only disable SIMD optimizations + elif [ -n "$WITHOUT_SIMD" ]; then + build_args+=("--cpu-baseline=none" "--cpu-dispatch=none") + else + # SIMD extensions that need to be tested on both runtime and compile-time via (test_simd.py) + # any specified features will be ignored if they're not supported by compiler or platform + # note: it almost the same default value of --simd-test execpt adding policy `$werror` to treat all + # warnings as errors + build_args+=("--simd-test=\$werror BASELINE SSE2 SSE42 XOP FMA4 (FMA3 AVX2) AVX512F AVX512_SKX VSX VSX2 VSX3 NEON ASIMD VX VXE VXE2") + fi # We used to use 'setup.py install' here, but that has the terrible # behaviour that if a copy of the package is already installed in the # install location, then the new copy just gets dropped on top of it. @@ -58,11 +68,11 @@ setup_base() # #if !HAVE_FFI_PREP_CIF_VAR && defined(__arm64__) && defined(__APPLE__) # export CFLAGS="$CFLAGS -Werror=undef" - $PYTHON setup.py build --simd-test "$simd_test" install 2>&1 | tee log + $PYTHON setup.py build "${build_args[@]}" install 2>&1 | tee log else # The job run with USE_DEBUG=1 on travis needs this. export CFLAGS=$CFLAGS" -Wno-maybe-uninitialized" - $PYTHON setup.py build --simd-test "$simd_test" build_src --verbose-cfg build_ext --inplace 2>&1 | tee log + $PYTHON setup.py build "${build_args[@]}" build_src --verbose-cfg build_ext --inplace 2>&1 | tee log fi grep -v "_configtest" log \ | grep -vE "ld returned 1|no files found matching" \ |