diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-11-26 09:16:30 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-26 09:16:30 +0000 |
commit | 8930130481f27502ecfc48b21d8eb13f49ba1353 (patch) | |
tree | e1b60d3ecd401c44e17a948c38e8c4b52c93bbe8 /Tools | |
parent | d13a5c4d4d93a0a5f09f34ffd50d6c923cf21ecc (diff) | |
download | cython-8930130481f27502ecfc48b21d8eb13f49ba1353.tar.gz |
Avoid triggering type-check assert for cyfuncs [0.29.x] (#5031)
* Avoid triggering type-check assert for cyfuncs
* Make some jobs run with debug assertions
Co-authored-by: Stefano Rivera <github@rivera.za.net>
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/ci-run.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Tools/ci-run.sh b/Tools/ci-run.sh index c55f115d8..09e9ae318 100644 --- a/Tools/ci-run.sh +++ b/Tools/ci-run.sh @@ -109,6 +109,16 @@ export PATH="/usr/lib/ccache:$PATH" # to override the previous ones, so '-O0 -O3' == '-O3' # This is true for the latest msvc, gcc and clang CFLAGS="-O0 -ggdb -Wall -Wextra" +# Trying to cover debug assertions in the CI without adding +# extra jobs. Therefore, odd-numbered minor versions of Python +# running C++ jobs get NDEBUG undefined, and even-numbered +# versions running C jobs get NDEBUG undefined. +ODD_VERSION=$(python3 -c "import sys; print(sys.version_info[1]%2)") +if [[ $BACKEND == *"cpp"* && $ODD_VERSION == "1" ]]; then + CFLAGS="$CFLAGS -UNDEBUG" +elif [[ $ODD_VERSION == "0" ]]; then + CFLAGS="$CFLAGS -UNDEBUG" +fi if [[ $NO_CYTHON_COMPILE != "1" && $PYTHON_VERSION != "pypy"* ]]; then |