Skip to content

Commit 61dfda8

Browse files
committed
Merge remote-tracking branch 'upstream/main' into fail_slow
2 parents 88827ea + 713bce9 commit 61dfda8

File tree

368 files changed

+20114
-21365
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

368 files changed

+20114
-21365
lines changed

.github/workflows/array_api.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,9 @@ jobs:
9191
export OMP_NUM_THREADS=2
9292
# expand as new modules are added
9393
python dev.py --no-build test -b all -s cluster -- --durations 3 --timeout=60
94+
python dev.py --no-build test -b all -s constants -- --durations 3 --timeout=60
9495
python dev.py --no-build test -b all -s fft -- --durations 3 --timeout=60
9596
python dev.py --no-build test -b all -t scipy.special.tests.test_support_alternative_backends -- --durations 3 --timeout=60
9697
python dev.py --no-build test -b all -t scipy._lib.tests.test_array_api
98+
python dev.py --no-build test -b all -t scipy._lib.tests.test__util -- --durations 3 --timeout=60
9799
python dev.py --no-build test -b all -t scipy.stats.tests.test_stats -- --durations 3 --timeout=60

.github/workflows/lint.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,8 @@ jobs:
4747
python tools/lint.py --diff-against origin/$GITHUB_BASE_REF
4848
python tools/unicode-check.py
4949
python tools/check_test_name.py
50+
51+
- name: Check that Python.h is first in any file including it.
52+
shell: bash
53+
run: |
54+
python tools/check_python_h_first.py

.github/workflows/linux_meson.yml renamed to .github/workflows/linux.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Linux Meson tests
1+
name: Linux tests
22

33
on:
44
push:
@@ -26,7 +26,7 @@ jobs:
2626
uses: ./.github/workflows/commit_message.yml
2727

2828
test_meson:
29-
name: Meson build
29+
name: mypy (py3.10) & dev deps (py3.12), fast, dev.py
3030
needs: get_commit_message
3131
# If using act to run CI locally the github object does not exist and
3232
# the usual skipping should not be enforced
@@ -118,7 +118,7 @@ jobs:
118118
if: matrix.python-version == '3.10'
119119
run: |
120120
# Packages that are only needed for their annotations
121-
python -m pip install mypy==1.0.0 types-psutil typing_extensions
121+
python -m pip install mypy==1.10.0 types-psutil typing_extensions
122122
python -m pip install pybind11 sphinx
123123
124124
python -u dev.py mypy
@@ -130,7 +130,7 @@ jobs:
130130
131131
#################################################################################
132132
test_venv_install:
133-
name: Pip install into venv
133+
name: Install into venv, cluster only, pyAny/npAny, pip+cluster.test()
134134
needs: get_commit_message
135135
if: >
136136
needs.get_commit_message.outputs.message == 1
@@ -189,7 +189,7 @@ jobs:
189189
#################################################################################
190190
python_debug:
191191
# also uses the vcs->sdist->wheel route.
192-
name: Python-debug & ATLAS
192+
name: Python-debug & ATLAS & sdist+wheel, fast, py3.10/npMin, pip+pytest
193193
needs: get_commit_message
194194
if: >
195195
needs.get_commit_message.outputs.message == 1
@@ -217,14 +217,14 @@ jobs:
217217
python3-dbg -m pytest --pyargs scipy -n2 --durations=10 -m "not slow"
218218
219219
#################################################################################
220-
gcc8:
220+
gcc9:
221221
# Purpose is to examine builds with oldest-supported gcc and test with pydata/sparse.
222-
name: Build with gcc-8
222+
name: Oldest GCC & pydata/sparse, fast, py3.10/npMin, pip+pytest
223223
needs: get_commit_message
224224
if: >
225225
needs.get_commit_message.outputs.message == 1
226226
&& (github.repository == 'scipy/scipy' || github.repository == '')
227-
runs-on: ubuntu-20.04 # 22.04 doesn't support gcc-8
227+
runs-on: ubuntu-22.04
228228
steps:
229229
- uses: actions/[email protected]
230230
with:
@@ -238,7 +238,7 @@ jobs:
238238
- name: Setup system dependencies
239239
run: |
240240
sudo apt-get -y update
241-
sudo apt install -y g++-8 gcc-8 gfortran-8
241+
sudo apt install -y g++-9 gcc-9 gfortran-9
242242
sudo apt install -y libatlas-base-dev liblapack-dev libgmp-dev \
243243
libmpfr-dev libmpc-dev pkg-config libsuitesparse-dev liblapack-dev
244244
@@ -252,7 +252,7 @@ jobs:
252252
export PYTHONOPTIMIZE=2
253253
254254
# specify which compilers to use using environment variables
255-
CC=gcc-8 CXX=g++-8 FC=gfortran-8 python -m build --wheel --no-isolation -Csetup-args=-Dblas=blas-atlas -Csetup-args=-Dlapack=lapack-atlas -Ccompile-args=-j2
255+
CC=gcc-9 CXX=g++-9 FC=gfortran-9 python -m build --wheel --no-isolation -Csetup-args=-Dblas=blas-atlas -Csetup-args=-Dlapack=lapack-atlas -Ccompile-args=-j2
256256
python -m pip install dist/scipy*.whl
257257
258258
- name: Install test dependencies
@@ -271,7 +271,7 @@ jobs:
271271
#################################################################################
272272
prerelease_deps_coverage_64bit_blas:
273273
# TODO: re-enable ILP64 build.
274-
name: Prerelease deps, coverage and 64-bit BLAS
274+
name: Prerelease deps & coverage report, full, py3.10/npMin & py3.11/npPre, dev.py
275275
needs: get_commit_message
276276
if: >
277277
needs.get_commit_message.outputs.message == 1
@@ -357,7 +357,7 @@ jobs:
357357
358358
#################################################################################
359359
linux_32bit:
360-
name: Linux - 32 bit
360+
name: 32-bit, fast, py3.10/npMin, dev.py
361361
needs: get_commit_message
362362
if: >
363363
needs.get_commit_message.outputs.message == 1

.github/workflows/macos_meson.yml renamed to .github/workflows/macos.yml

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: macOS tests (meson)
1+
name: macOS tests
22

33
on:
44
push:
@@ -26,7 +26,7 @@ jobs:
2626
uses: ./.github/workflows/commit_message.yml
2727

2828
test_meson:
29-
name: Meson build
29+
name: Conda & umfpack/scikit-sparse, fast, py3.11/npAny, dev.py
3030
needs: get_commit_message
3131
# If using act to run CI locally the github object does not exist and
3232
# the usual skipping should not be enforced
@@ -137,7 +137,7 @@ jobs:
137137
138138
139139
test_scipy_openblas:
140-
name: M1 test - openblas
140+
name: M1 & OpenBLAS, fast, py3.11/npAny, dev.py
141141
needs: get_commit_message
142142
# If using act to run CI locally the github object does not exist and
143143
# the usual skipping should not be enforced
@@ -165,18 +165,62 @@ jobs:
165165
sudo xcode-select -s /Applications/Xcode_15.2.app
166166
167167
git submodule update --init
168-
# for some reason gfortran is not on the path
169-
GFORTRAN_LOC=$(brew --prefix gfortran)/bin/gfortran
168+
GFORTRAN_LOC=$(which gfortran-13)
170169
ln -s $GFORTRAN_LOC gfortran
171170
export PATH=$PWD:$PATH
172171
173-
# make sure we have openblas
172+
# make sure we have openblas and gfortran dylibs
174173
bash tools/wheels/cibw_before_build_macos.sh $PWD
175-
export DYLD_LIBRARY_PATH=/usr/local/gfortran/lib:/opt/arm64-builds/lib
174+
GFORTRAN_LIB=$(dirname `gfortran --print-file-name libgfortran.dylib`)
175+
export DYLD_LIBRARY_PATH=$GFORTRAN_LIB:/opt/arm64-builds/lib
176176
export PKG_CONFIG_PATH=/opt/arm64-builds/lib/pkgconfig
177177
178178
pip install click doit pydevtool rich_click meson cython pythran pybind11 ninja numpy
179179
python dev.py build
180180

181181
pip install pooch pytest hypothesis
182182
python dev.py -n test
183+
184+
185+
test_meson_accelerate:
186+
name: Accelerate, fast, py3.11/npAny, dev.py
187+
needs: get_commit_message
188+
# If using act to run CI locally the github object does not exist and
189+
# the usual skipping should not be enforced
190+
if: >
191+
needs.get_commit_message.outputs.message == 1
192+
&& (github.repository == 'scipy/scipy' || github.repository == '')
193+
runs-on: macos-14
194+
strategy:
195+
matrix:
196+
python-version: ["3.11"]
197+
198+
steps:
199+
- uses: actions/[email protected]
200+
with:
201+
submodules: recursive
202+
203+
- name: Setup Python
204+
uses: actions/setup-python@v4
205+
with:
206+
python-version: ${{ matrix.python-version }}
207+
cache: 'pip'
208+
209+
- name: Build and Install SciPy
210+
run: |
211+
sudo xcode-select -s /Applications/Xcode_15.2.app
212+
213+
git submodule update --init
214+
GFORTRAN_LOC=$(which gfortran-13)
215+
ln -s $GFORTRAN_LOC gfortran
216+
export PATH=$PWD:$PATH
217+
218+
# Ensure we have gfortran dylib
219+
GFORTRAN_LIB=$(dirname `gfortran --print-file-name libgfortran.dylib`)
220+
export DYLD_LIBRARY_PATH=$GFORTRAN_LIB
221+
222+
pip install click doit pydevtool rich_click meson cython pythran pybind11 ninja numpy
223+
python dev.py build -C-Dblas=accelerate
224+
225+
pip install pooch pytest hypothesis
226+
python dev.py -n test

.github/workflows/linux_musl.yml renamed to .github/workflows/musllinux.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ jobs:
2424
uses: ./.github/workflows/commit_message.yml
2525

2626
musllinux_x86_64:
27+
name: musl Ubuntu-latest, fast, py3.10/npAny, dev.py
2728
needs: get_commit_message
2829
runs-on: ubuntu-latest
2930
# If using act to run CI locally the github object does not exist and

.github/workflows/wheels.yml

Lines changed: 62 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ jobs:
5959
echo github.ref ${{ github.ref }}
6060
6161
build_wheels:
62-
name: Build wheel for ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }} ${{ matrix.buildplat[2] }}
62+
name: Wheel, ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
63+
${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }}
64+
${{ matrix.buildplat[4] }}
6365
needs: get_commit_message
6466
if: >-
6567
contains(needs.get_commit_message.outputs.message, '1') ||
@@ -77,11 +79,13 @@ jobs:
7779
# should also be able to do multi-archs on a single entry, e.g.
7880
# [windows-2019, win*, "AMD64 x86"]. However, those two require a different compiler setup
7981
# so easier to separate out here.
80-
- [ubuntu-22.04, manylinux, x86_64]
81-
- [ubuntu-22.04, musllinux, x86_64]
82-
- [macos-11, macosx, x86_64]
83-
- [macos-14, macosx, arm64]
84-
- [windows-2019, win, AMD64]
82+
- [ubuntu-22.04, manylinux, x86_64, "", ""]
83+
- [ubuntu-22.04, musllinux, x86_64, "", ""]
84+
- [macos-12, macosx, x86_64, openblas, "10.9"]
85+
- [macos-13, macosx, x86_64, accelerate, "14.0"]
86+
- [macos-14, macosx, arm64, openblas, "12.0"]
87+
- [macos-14, macosx, arm64, accelerate, "14.0"]
88+
- [windows-2019, win, AMD64, "", ""]
8589

8690
python: [["cp310", "3.10"], ["cp311", "3.11"], ["cp312", "3.12"]]
8791
# python[0] is used to specify the python versions made by cibuildwheel
@@ -112,63 +116,53 @@ jobs:
112116
if: ${{ runner.os == 'Windows' && env.IS_32_BIT == 'false' }}
113117

114118
- name: Setup macOS
115-
if: matrix.buildplat[0] == 'macos-11' || matrix.buildplat[0] == 'macos-14'
119+
if: startsWith( matrix.buildplat[0], 'macos-' )
116120
run: |
117-
if [[ ${{ matrix.buildplat[2] }} == 'arm64' ]]; then
118-
# macosx_arm64
119-
120-
# use homebrew gfortran
121-
sudo xcode-select -s /Applications/Xcode_15.2.app
122-
# for some reason gfortran is not on the path
123-
GFORTRAN_LOC=$(brew --prefix gfortran)/bin/gfortran
124-
ln -s $GFORTRAN_LOC gfortran
121+
if [[ ${{ matrix.buildplat[3] }} == 'accelerate' ]]; then
122+
echo CIBW_CONFIG_SETTINGS=\"setup-args=-Dblas=accelerate\" >> "$GITHUB_ENV"
123+
# Always use preinstalled gfortran for Accelerate builds
124+
ln -s $(which gfortran-13) gfortran
125125
export PATH=$PWD:$PATH
126126
echo "PATH=$PATH" >> "$GITHUB_ENV"
127-
128-
# location of the gfortran's libraries
129-
GFORTRAN_LIB=$(dirname `gfortran --print-file-name libgfortran.dylib`)
130-
131-
CIBW="MACOSX_DEPLOYMENT_TARGET=12.0\
132-
MACOS_DEPLOYMENT_TARGET=12.0\
133-
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\
134-
_PYTHON_HOST_PLATFORM=macosx-12.0-arm64\
135-
PIP_PRE=1\
136-
PIP_NO_BUILD_ISOLATION=false\
137-
PKG_CONFIG_PATH=/opt/arm64-builds/lib/pkgconfig\
138-
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
139-
echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
140-
141-
CIBW="sudo xcode-select -s /Applications/Xcode_15.2.app"
142-
echo "CIBW_BEFORE_ALL=$CIBW" >> $GITHUB_ENV
143-
144-
echo "REPAIR_PATH=/opt/arm64-builds/lib" >> "$GITHUB_ENV"
145-
146-
CIBW="DYLD_LIBRARY_PATH=$GFORTRAN_LIB:/opt/arm64-builds/lib delocate-listdeps {wheel} &&\
147-
DYLD_LIBRARY_PATH=$GFORTRAN_LIB:/opt/arm64-builds/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
148-
echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=$CIBW" >> "$GITHUB_ENV"
149-
127+
LIB_PATH=$(dirname $(gfortran --print-file-name libgfortran.dylib))
128+
fi
129+
# Add libraries installed by cibw_before_build_macos.sh to path
130+
if [[ ${{ matrix.buildplat[2] }} == 'arm64' ]]; then
131+
LIB_PATH=$LIB_PATH:/opt/arm64-builds/lib
132+
else
133+
LIB_PATH=$LIB_PATH:/usr/local/lib
134+
fi
135+
if [[ ${{ matrix.buildplat[4] }} == '10.9' ]]; then
136+
# Newest version of Xcode that supports macOS 10.9
137+
XCODE_VER='13.4.1'
150138
else
151-
# macosx_x86_64 with OpenBLAS
152-
# setting SDKROOT necessary when using the gfortran compiler
153-
# installed in cibw_before_build_macos.sh
154-
# MACOS_DEPLOYMENT_TARGET is set because of
155-
# https://github.com/mesonbuild/meson-python/pull/309. Once
156-
# an update is released, then that environment variable can
157-
# be removed.
158-
CIBW="MACOSX_DEPLOYMENT_TARGET=10.9\
159-
MACOS_DEPLOYMENT_TARGET=10.9\
160-
SDKROOT=/Applications/Xcode_11.7.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk\
161-
LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH\
162-
_PYTHON_HOST_PLATFORM=macosx-10.9-x86_64\
163-
PIP_PRE=1\
164-
PIP_NO_BUILD_ISOLATION=false\
165-
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
166-
echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
167-
168-
CIBW="DYLD_LIBRARY_PATH=/usr/local/lib delocate-listdeps {wheel} &&\
169-
DYLD_LIBRARY_PATH=/usr/local/lib delocate-wheel --require-archs {delocate_archs} -w {dest_dir} {wheel}"
170-
echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=$CIBW" >> "$GITHUB_ENV"
139+
XCODE_VER='15.2'
140+
fi
141+
CIBW="sudo xcode-select -s /Applications/Xcode_${XCODE_VER}.app"
142+
echo "CIBW_BEFORE_ALL=$CIBW" >> $GITHUB_ENV
143+
# setting SDKROOT necessary when using the gfortran compiler
144+
# installed in cibw_before_build_macos.sh
145+
sudo xcode-select -s /Applications/Xcode_${XCODE_VER}.app
146+
CIBW="MACOSX_DEPLOYMENT_TARGET=${{ matrix.buildplat[4] }}\
147+
LD_LIBRARY_PATH=$LIB_PATH:$LD_LIBRARY_PATH\
148+
SDKROOT=$(xcrun --sdk macosx --show-sdk-path)\
149+
PIP_PRE=1\
150+
PIP_NO_BUILD_ISOLATION=false\
151+
PKG_CONFIG_PATH=$LIB_PATH/pkgconfig\
152+
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple"
153+
echo "CIBW_ENVIRONMENT_MACOS=$CIBW" >> "$GITHUB_ENV"
154+
155+
echo "REPAIR_PATH=$LIB_PATH" >> "$GITHUB_ENV"
156+
GFORTRAN_LIB="\$(dirname \$(gfortran --print-file-name libgfortran.dylib))"
157+
CIBW="DYLD_LIBRARY_PATH=$GFORTRAN_LIB:$LIB_PATH delocate-listdeps {wheel} &&\
158+
DYLD_LIBRARY_PATH=$GFORTRAN_LIB:$LIB_PATH delocate-wheel --require-archs \
159+
{delocate_archs} -w {dest_dir} {wheel}"
160+
# Rename x86 Accelerate wheel to test on macOS 13 runner
161+
if [[ ${{ matrix.buildplat[0] }} == 'macos-13' && ${{ matrix.buildplat[4] }} == '14.0' ]]; then
162+
CIBW+=" && mv {dest_dir}/\$(basename {wheel}) \
163+
{dest_dir}/\$(echo \$(basename {wheel}) | sed 's/14_0/13_0/')"
171164
fi
165+
echo "CIBW_REPAIR_WHEEL_COMMAND_MACOS=$CIBW" >> "$GITHUB_ENV"
172166
173167
- name: Build wheels
174168
uses: pypa/[email protected]
@@ -195,10 +189,18 @@ jobs:
195189
PIP_EXTRA_INDEX_URL=https://pypi.anaconda.org/scientific-python-nightly-wheels/simple
196190
PIP_NO_BUILD_ISOLATION=false
197191
192+
- name: Rename after test (macOS x86 Accelerate only)
193+
# Rename x86 Accelerate wheel back so it targets macOS >= 14
194+
if: matrix.buildplat[0] == 'macos-13' && matrix.buildplat[4] == '14.0'
195+
run: |
196+
mv ./wheelhouse/*.whl $(find ./wheelhouse -type f -name '*.whl' | sed 's/13_0/14_0/')
197+
198198
- uses: actions/upload-artifact@v4
199199
with:
200200
path: ./wheelhouse/*.whl
201-
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}-${{ matrix.buildplat[2] }}
201+
name: ${{ matrix.python[0] }}-${{ matrix.buildplat[1] }}
202+
${{ matrix.buildplat[2] }} ${{ matrix.buildplat[3] }}
203+
${{ matrix.buildplat[4] }}
202204

203205
- uses: conda-incubator/setup-miniconda@v3
204206
with:
@@ -209,6 +211,7 @@ jobs:
209211
# build and test the wheel
210212
auto-update-conda: true
211213
python-version: "3.10"
214+
miniconda-version: "latest"
212215

213216
- name: Upload wheels
214217
if: success()

0 commit comments

Comments
 (0)