diff options
Diffstat (limited to 'Tools/ci-run.sh')
-rw-r--r-- | Tools/ci-run.sh | 29 |
1 files changed, 24 insertions, 5 deletions
diff --git a/Tools/ci-run.sh b/Tools/ci-run.sh index 4309fd4ad..0fde602fd 100644 --- a/Tools/ci-run.sh +++ b/Tools/ci-run.sh @@ -68,14 +68,18 @@ if [[ $PYTHON_VERSION == "2.7"* ]]; then elif [[ $PYTHON_VERSION == "3."[45]* ]]; then python -m pip install wheel || exit 1 python -m pip install -r test-requirements-34.txt || exit 1 +elif [[ $PYTHON_VERSION == "pypy-2.7" ]]; then + pip install wheel || exit 1 + pip install -r test-requirements-pypy27.txt || exit 1 else python -m pip install -U pip "setuptools<60" wheel || exit 1 if [[ $PYTHON_VERSION != *"-dev" || $COVERAGE == "1" ]]; then python -m pip install -r test-requirements.txt || exit 1 - if [[ $PYTHON_VERSION != "pypy"* && $PYTHON_VERSION != "3."[1]* ]]; then python -m pip install -r test-requirements-cpython.txt || exit 1 + elif [[ $PYTHON_VERSION == "pypy-2.7" ]]; then + python -m pip install -r test-requirements-pypy27.txt || exit 1 fi fi fi @@ -108,11 +112,23 @@ export PATH="/usr/lib/ccache:$PATH" # Most modern compilers allow the last conflicting option # to override the previous ones, so '-O0 -O3' == '-O3' # This is true for the latest msvc, gcc and clang -CFLAGS="-O0 -ggdb -Wall -Wextra" +if [[ $OSTYPE == "msys" ]]; then # for MSVC cl + # /wd disables warnings + # 4711 warns that function `x` was selected for automatic inline expansion + # 4127 warns that a conditional expression is constant, should be fixed here https://github.com/cython/cython/pull/4317 + # (off by default) 5045 warns that the compiler will insert Spectre mitigations for memory load if the /Qspectre switch is specified + # (off by default) 4820 warns about the code in Python\3.9.6\x64\include ... + CFLAGS="-Od /Z7 /MP /W4 /wd4711 /wd4127 /wd5045 /wd4820" +else + CFLAGS="-O0 -ggdb -Wall -Wextra" +fi if [[ $NO_CYTHON_COMPILE != "1" && $PYTHON_VERSION != "pypy"* ]]; then BUILD_CFLAGS="$CFLAGS -O2" + if [[ $CYTHON_COMPILE_ALL == "1" && $OSTYPE != "msys" ]]; then + BUILD_CFLAGS="$CFLAGS -O3 -g0 -mtune=generic" # make wheel sizes comparable to standard wheel build + fi if [[ $PYTHON_SYS_VERSION == "2"* ]]; then BUILD_CFLAGS="$BUILD_CFLAGS -fno-strict-aliasing" fi @@ -132,16 +148,19 @@ if [[ $NO_CYTHON_COMPILE != "1" && $PYTHON_VERSION != "pypy"* ]]; then # COVERAGE can be either "" (empty or not set) or "1" (when we set it) # STACKLESS can be either "" (empty or not set) or "true" (when we set it) - # CYTHON_COMPILE_ALL can be either "" (empty or not set) or "1" (when we set it) if [[ $COVERAGE != "1" && $STACKLESS != "true" && $BACKEND != *"cpp"* && - $CYTHON_COMPILE_ALL != "1" && $LIMITED_API == "" && $EXTRA_CFLAGS == "" ]]; then + $LIMITED_API == "" && $EXTRA_CFLAGS == "" ]]; then python setup.py bdist_wheel || exit 1 + ls -l dist/ || true fi + + echo "Extension modules created during the build:" + find Cython -name "*.so" -ls | sort -k11 fi if [[ $TEST_CODE_STYLE == "1" ]]; then make -C docs html || exit 1 -elif [[ $PYTHON_VERSION != "pypy"* ]]; then +elif [[ $PYTHON_VERSION != "pypy"* && $OSTYPE != "msys" ]]; then # Run the debugger tests in python-dbg if available # (but don't fail, because they currently do fail) PYTHON_DBG=$(python -c 'import sys; print("%d.%d" % sys.version_info[:2])') |