diff --git a/.github/workflows/cygwin.yml b/.github/workflows/cygwin.yml new file mode 100644 index 000000000000..aff99434b8ed --- /dev/null +++ b/.github/workflows/cygwin.yml @@ -0,0 +1,75 @@ +name: Cygwin Tests + +on: + push: + branches: + - main + - maintenance/** + pull_request: + branches: + - main + - maintenance/** + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + cygwin: + name: Cygwin tests + runs-on: windows-latest + env: + SHELLOPTS: igncr + CHERE_INVOKING: 1 + CYGWIN_NOWINPATH: 1 + PYTHONPATH: /usr/local/lib/python3.9/site-packages + steps: + - run: git config --global core.autocrlf input + - uses: actions/checkout@v3 + with: + submodules: recursive + - uses: cygwin/cygwin-install-action@v2 + with: + packages: >- + gcc-g++ gcc-fortran liblapack-devel libopenblas libmpfr-devel ccache swig libmpc-devel + libumfpack-devel libsliplu-devel libldl-devel libklu-devel libcxsparse-devel libcholmod-devel libamd-devel + python39-devel python39-pip python39-setuptools python39-wheel python39-numpy python39-cython + python39-pytest + meson ninja cmake make git + - name: Fix git config + shell: bash.exe -eo pipefail -o igncr "{0}" + run: /usr/bin/git config --system --add safe.directory /cygdrive/d/a/*/scipy + - name: pip cache + uses: actions/cache@v4 + with: + path: 'C:\cygwin\home\runneradmin\.cache\pip' + key: ${{ runner.os }}-cygwin-pip3.9-${{ hashFiles('.github/workflows/cygwin.yml') }} + restore-keys: | + ${{ runner.os }}-cygwin-pip3.9- + + - name: Install Python dependencies + shell: bash.exe -eo pipefail -o igncr "{0}" + run: | + mkdir builds + cd builds + python3.9 -m pip install --upgrade pip 'setuptools<60' wheel + python3.9 -m pip install --upgrade numpy cython pytest pytest-xdist pytest-timeout pybind11 + python3.9 -m pip install --upgrade mpmath gmpy2 pythran threadpoolctl pooch click doit rich-click pydevtool + python3.9 -m pip uninstall -y nose + cd .. + - name: Check NumPy import + shell: bash.exe -eo pipefail -o igncr "{0}" + run: /usr/bin/env PATH="/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" python3.9 -c "import numpy as np; print(np.__version__)" + - name: Building SciPy + shell: bash.exe -eo pipefail -o igncr "{0}" + run: /usr/bin/env PATH="/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" python3.9 -u dev.py build --show-build-log + - name: Check SciPy installs + shell: bash.exe -eo pipefail -o igncr "{0}" + if: false + run: /usr/bin/env PATH="/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" python3.9 -m pip install -e . + - name: Testing SciPy + shell: bash.exe -eo pipefail -o igncr "{0}" + run: | + /usr/bin/env PATH="/bin:/usr/bin:/usr/local/bin:/usr/lib/lapack" python3.9 -u dev.py test --durations=10 -j2 -m fast -b numpy -- -rfEX --timeout=60 2>&1 | tee runtests.log + python3.8 tools/validate_runtests_log.py fast < runtests.log diff --git a/scipy/special/_gufuncs.cpp b/scipy/special/_gufuncs.cpp index 205ca839b3e7..8fe2ef1ce56f 100644 --- a/scipy/special/_gufuncs.cpp +++ b/scipy/special/_gufuncs.cpp @@ -1,7 +1,8 @@ +#include +#include "ufunc.h" #include "special/bessel.h" #include "special/legendre.h" #include "special/sph_harm.h" -#include "ufunc.h" using namespace std; diff --git a/scipy/special/_special_ufuncs.cpp b/scipy/special/_special_ufuncs.cpp index 688c6b2bd6bc..657ccb6949d9 100644 --- a/scipy/special/_special_ufuncs.cpp +++ b/scipy/special/_special_ufuncs.cpp @@ -1,4 +1,8 @@ +#include +#include "ufunc.h" + #include +#include #include "sf_error.h" #include "special/airy.h" @@ -22,7 +26,6 @@ #include "special/trig.h" #include "special/wright_bessel.h" #include "special/zeta.h" -#include "ufunc.h" // This is the extension module for the NumPy ufuncs in SciPy's special module. To create such a ufunc, call // "SpecFun_NewUFunc" with a braced list of kernel functions that will become the ufunc overloads. There are diff --git a/scipy/special/_wright.cxx b/scipy/special/_wright.cxx index 68ba3fc4ba45..4669232c321d 100644 --- a/scipy/special/_wright.cxx +++ b/scipy/special/_wright.cxx @@ -1,7 +1,7 @@ -#include - #include "_wright.h" +#include + using namespace std; extern "C" { diff --git a/scipy/special/ufunc.h b/scipy/special/ufunc.h index 62781e2b8987..7faf9e387b7e 100644 --- a/scipy/special/ufunc.h +++ b/scipy/special/ufunc.h @@ -1,13 +1,14 @@ +#define PY_SSIZE_T_CLEAN +#include + #include +#include #include #include #include #include #include -#define PY_SSIZE_T_CLEAN -#include - #include #include #include