598 lines
23 KiB
YAML
598 lines
23 KiB
YAML
name: Linux tests
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- maintenance/**
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- maintenance/**
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
env:
|
|
CCACHE_DIR: "${{ github.workspace }}/.ccache"
|
|
INSTALLDIR: "build-install"
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
get_commit_message:
|
|
name: Get commit message
|
|
uses: ./.github/workflows/commit_message.yml
|
|
|
|
test_meson:
|
|
name: mypy (py3.12) & dev deps (py3.14), fast, spin
|
|
needs: get_commit_message
|
|
# If using act to run CI locally the github object does not exist and
|
|
# the usual skipping should not be enforced
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-22.04
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.12', '3.14-dev'] # this run will use python dev versions when available
|
|
maintenance-branch:
|
|
- ${{ contains(github.ref, 'maintenance/') || contains(github.base_ref, 'maintenance/') }}
|
|
exclude:
|
|
- maintenance-branch: true
|
|
python-version: '3.14-dev'
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
allow-prereleases: true
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
# NOTE: not the same OpenBLAS version as in upstream CI (I'm being lazy here)
|
|
sudo apt-get update
|
|
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev
|
|
|
|
- name: Install Python packages
|
|
if: matrix.python-version == '3.12'
|
|
run: |
|
|
python -m pip install numpy cython pytest pytest-xdist pytest-timeout pybind11 mpmath gmpy2 pythran ninja meson pooch hypothesis spin "click<8.3.0"
|
|
|
|
- name: Install Python packages from repositories
|
|
if: matrix.python-version == '3.14-dev' # this run will use python dev versions when available
|
|
run: |
|
|
python -m pip install git+https://github.com/numpy/numpy.git
|
|
python -m pip install ninja cython pytest pybind11 pytest-xdist pytest-timeout spin pooch hypothesis "setuptools<67.3" meson "click<8.3.0"
|
|
python -m pip install git+https://github.com/serge-sans-paille/pythran.git
|
|
# Disable Meson master testing until upstream option handling is fixed, see scipy#22534
|
|
# python -m pip install git+https://github.com/mesonbuild/meson.git
|
|
|
|
- name: Prepare compiler cache
|
|
id: prep-ccache
|
|
shell: bash
|
|
run: |
|
|
mkdir -p "${CCACHE_DIR}"
|
|
echo "dir=$CCACHE_DIR" >> $GITHUB_OUTPUT
|
|
NOW=$(date -u +"%F-%T")
|
|
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup compiler cache
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
id: cache-ccache
|
|
# Reference: https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows#matching-a-cache-key
|
|
# NOTE: The caching strategy is modeled in a way that it will always have a unique cache key for each workflow run
|
|
# (even if the same workflow is run multiple times). The restore keys are not unique and for a partial match, they will
|
|
# return the most recently created cache entry, according to the GitHub Action Docs.
|
|
with:
|
|
path: ${{ steps.prep-ccache.outputs.dir }}
|
|
# Restores ccache from either a previous build on this branch or on main
|
|
key: ${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-${{ steps.prep-ccache.outputs.timestamp }}
|
|
# This evaluates to `Linux Tests-3.12-ccache-linux-` which is not unique. As the CI matrix is expanded, this will
|
|
# need to be updated to be unique so that the cache is not restored from a different job altogether.
|
|
restore-keys: |
|
|
${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-
|
|
|
|
- name: Setup build and install scipy
|
|
run: |
|
|
spin build --release
|
|
|
|
- name: Ccache performance
|
|
shell: bash -l {0}
|
|
run: ccache -s
|
|
|
|
- name: Check installation
|
|
run: |
|
|
pushd tools
|
|
python check_installation.py ${{ env.INSTALLDIR }}
|
|
./check_pyext_symbol_hiding.sh ../build
|
|
popd
|
|
|
|
- name: Check usage of install tags
|
|
run: |
|
|
rm -r ${{ env.INSTALLDIR }}
|
|
spin build --tags=runtime,python-runtime,devel
|
|
python tools/check_installation.py ${{ env.INSTALLDIR }} --no-tests
|
|
rm -r ${{ env.INSTALLDIR }}
|
|
spin build --tags=runtime,python-runtime,devel,tests
|
|
python tools/check_installation.py ${{ env.INSTALLDIR }}
|
|
|
|
- name: Check build-internal dependencies
|
|
run: ninja -C build -t missingdeps
|
|
|
|
- name: Mypy
|
|
if: matrix.python-version == '3.12'
|
|
run: |
|
|
# Packages that are only needed for their annotations
|
|
python -m pip install mypy==1.10.0 types-psutil typing_extensions
|
|
python -m pip install pybind11 sphinx
|
|
|
|
spin mypy
|
|
|
|
- name: Test SciPy
|
|
run: |
|
|
export OMP_NUM_THREADS=2
|
|
spin test -j3 -- --durations 10 --timeout=60
|
|
|
|
#################################################################################
|
|
test_venv_install:
|
|
name: Install into venv, cluster only, pyAny/npAny, pip+cluster.test()
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
# We're not running the full test suite here, only testing the install
|
|
# into a venv is working, so leave out optional dependencies. That's
|
|
# also why we can get away with an old version of OpenBLAS from Ubuntu
|
|
sudo apt-get update
|
|
sudo apt-get install -y python3-dev libopenblas-dev pkg-config gfortran
|
|
|
|
- name: Create venv, install SciPy
|
|
run: |
|
|
python -m venv ../venvs/scipy-venv
|
|
source ../venvs/scipy-venv/bin/activate
|
|
# Note that this uses build isolation. That's why we don't need build
|
|
# dependencies to be installed in the venv itself.
|
|
python -m pip install . -vv -Csetup-args=--werror
|
|
|
|
- name: Basic imports and tests
|
|
run: |
|
|
source ../venvs/scipy-venv/bin/activate
|
|
cd ..
|
|
python -c "import scipy"
|
|
python -c "import scipy.linalg"
|
|
python -m pip install pytest hypothesis
|
|
python -c "from scipy import cluster; cluster.test()"
|
|
|
|
- name: Create venv inside source tree
|
|
# This is a regression test for gh-16312
|
|
run: |
|
|
python -m venv .venv
|
|
source .venv/bin/activate
|
|
# Install build dependencies. Use meson-python from its main branch,
|
|
# most convenient to test in this job because we're using pip without
|
|
# build isolation here.
|
|
python -m pip install numpy pybind11 pythran cython pytest ninja hypothesis
|
|
python -m pip install git+https://github.com/mesonbuild/meson-python.git
|
|
# Non-isolated build, so we use dependencies installed inside the source tree
|
|
python -m pip install -U pip # need pip >=23 for `--config-settings`
|
|
python -m pip install . -v --no-build-isolation
|
|
|
|
# Basic tests
|
|
cd ..
|
|
python -c "import scipy"
|
|
python -c "import scipy.linalg"
|
|
python -c "from scipy import cluster; cluster.test()"
|
|
|
|
#################################################################################
|
|
python_debug:
|
|
# also uses the vcs->sdist->wheel route.
|
|
name: Python-debug & ATLAS & sdist+wheel, fast, py3.12/npMin, pip+pytest
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-24.04 # provides python3.12-dbg
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Configuring Test Environment
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt install python3-dbg python3-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libmpc-dev
|
|
python3-dbg --version # just to check
|
|
python3-dbg -c 'import sys; print("Python debug build:", hasattr(sys, "gettotalrefcount"))'
|
|
- name: Build SciPy
|
|
run: |
|
|
python3-dbg -m pip install build
|
|
python3-dbg -m build -Csetup-args=-Dbuildtype=debugoptimized -Csetup-args=-Dblas=blas-atlas -Csetup-args=-Dlapack=lapack-atlas
|
|
python3-dbg -m pip install dist/scipy*.whl
|
|
- name: Testing SciPy
|
|
run: |
|
|
cd doc
|
|
python3-dbg -m pip install pytest pytest-xdist pytest-timeout mpmath gmpy2 threadpoolctl pooch hypothesis
|
|
python3-dbg -m pytest --pyargs scipy -n4 --durations=10 -m "not slow"
|
|
|
|
#################################################################################
|
|
gcc9:
|
|
# Purpose is to examine builds with oldest-supported gcc and test with pydata/sparse.
|
|
name: Oldest GCC & pydata/sparse, full, py3.12/npMin, pip+pytest
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Setup system dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt install -y g++-9 gcc-9 gfortran-9
|
|
sudo apt install -y libatlas-base-dev liblapack-dev libgmp-dev \
|
|
libmpfr-dev libmpc-dev pkg-config libsuitesparse-dev liblapack-dev
|
|
|
|
- name: Setup Python build deps
|
|
run: |
|
|
pip install build meson-python ninja pythran pybind11 cython numpy
|
|
|
|
- name: Build wheel and install
|
|
run: |
|
|
set -euo pipefail
|
|
export PYTHONOPTIMIZE=2
|
|
|
|
# specify which compilers to use using environment variables
|
|
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
|
|
python -m pip install dist/scipy*.whl
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
# Downgrade numpy to oldest supported version
|
|
pip install gmpy2 threadpoolctl mpmath pooch pytest pytest-xdist==2.5.0 pytest-timeout hypothesis sparse "numpy==2.0.0"
|
|
|
|
- name: Run tests
|
|
run: |
|
|
# can't be in source directory
|
|
pushd $RUNNER_TEMP
|
|
export PYTHONOPTIMIZE=2
|
|
python -m pytest --pyargs scipy -n4 --durations=10
|
|
popd
|
|
|
|
#################################################################################
|
|
prerelease_deps_coverage_64bit_blas:
|
|
# TODO: re-enable ILP64 build.
|
|
name: Prerelease deps & coverage report, full, py3.12/npMin & py3.13/npPre, spin, SCIPY_ARRAY_API=1
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: ['3.12']
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgmp-dev libmpfr-dev libmpc-dev ccache gfortran lcov
|
|
|
|
- name: Install Python packages
|
|
run: |
|
|
python -m pip install cython pythran ninja meson-python pybind11 spin "click<8.3.0"
|
|
python -m pip install --pre --upgrade pytest pytest-cov pytest-xdist mpmath gmpy2 threadpoolctl pooch hypothesis matplotlib
|
|
python -m pip install -r requirements/openblas.txt
|
|
python -m pip install --pre --upgrade --timeout=60 -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple numpy
|
|
|
|
- name: Prepare compiler cache
|
|
id: prep-ccache
|
|
shell: bash
|
|
run: |
|
|
mkdir -p "${CCACHE_DIR}"
|
|
echo "dir=$CCACHE_DIR" >> $GITHUB_OUTPUT
|
|
NOW=$(date -u +"%F-%T")
|
|
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
|
|
|
|
- name: Setup compiler cache
|
|
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
|
id: cache-ccache
|
|
with:
|
|
path: ${{ steps.prep-ccache.outputs.dir }}
|
|
# Restores ccache from either a previous build on this branch or on main
|
|
key: ${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-prerelease-${{ steps.prep-ccache.outputs.timestamp }}
|
|
restore-keys: |
|
|
${{ github.workflow }}-${{ matrix.python-version }}-ccache-linux-prerelease-
|
|
|
|
- name: Build and install SciPy
|
|
run: |
|
|
spin build --gcov --with-scipy-openblas --release
|
|
|
|
- name: Ccache performance
|
|
shell: bash -l {0}
|
|
run: ccache -s
|
|
|
|
- name: Downgrade NumPy to lowest supported
|
|
run: |
|
|
python -m pip install "numpy==2.0.0"
|
|
|
|
- name: Test SciPy
|
|
run: |
|
|
export OPENBLAS_NUM_THREADS=1
|
|
export SCIPY_ARRAY_API=1
|
|
spin test --no-build --coverage -j2 --mode full -- --cov --cov-report term-missing
|
|
|
|
#################################################################################
|
|
linux_32bit:
|
|
name: 32-bit, fast, py3.12/npMin, spin
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-latest
|
|
# I tried running directly in a container:, using the image: and options:
|
|
# entries. Unfortunately at this time options: does not seem to listen to
|
|
# --platform linux/i386.
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: build + test
|
|
run: |
|
|
set -exuo pipefail
|
|
docker pull quay.io/pypa/manylinux2014_i686
|
|
docker run -v $(pwd):/scipy --platform=linux/i386 quay.io/pypa/manylinux2014_i686 /bin/bash -c "cd /scipy && \
|
|
uname -a && \
|
|
python3.12 -m venv test && \
|
|
source test/bin/activate && \
|
|
python -m pip install spin 'click<8.3.0' meson ninja && \
|
|
python -m pip install -r requirements/openblas.txt && \
|
|
# Ensure that scipy-openblas is picked up by the numpy<1.26 build
|
|
cat > \$HOME/.numpy-site.cfg <<EOL
|
|
[openblas]
|
|
libraries = \$(python -c 'import scipy_openblas32; print(scipy_openblas32.get_library())')
|
|
library_dirs = \$(python -c 'import scipy_openblas32; print(scipy_openblas32.get_lib_dir())')
|
|
include_dirs = \$(python -c 'import scipy_openblas32; print(scipy_openblas32.get_include_dir())')
|
|
runtime_library_dirs = \$(python -c 'import scipy_openblas32; print(scipy_openblas32.get_lib_dir())')
|
|
symbol_prefix = scipy_
|
|
EOL
|
|
python -m pip install numpy==2.0.0 cython pybind11 pytest pytest-timeout pytest-xdist pytest-env mpmath pythran pooch meson hypothesis && \
|
|
python -c 'import numpy as np; np.show_config()' && \
|
|
spin build --with-scipy-openblas && \
|
|
spin test"
|
|
|
|
#################################################################################
|
|
distro_multiple_pythons:
|
|
# Purpose is to build for a non-default Python interpreter in a Linux distro
|
|
# For such a build config, `python`/`python3` executables may not have
|
|
# build dependencies like Cython or NumPy installed.
|
|
name: non-default Python interpreter, fast, py3.12/npMin, pip+pytest
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup system dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
sudo apt install software-properties-common
|
|
sudo add-apt-repository ppa:deadsnakes/ppa
|
|
sudo apt update -y
|
|
sudo apt install -y python3.12-dev ninja-build pkg-config libatlas-base-dev liblapack-dev
|
|
|
|
- name: Setup Python build deps
|
|
run: |
|
|
python3.12 -m pip install build pythran pybind11 cython numpy meson-python
|
|
|
|
- name: Build wheel and install
|
|
run: |
|
|
python3.12 -m build -wnx -Csetup-args=-Dblas=blas-atlas -Csetup-args=-Dlapack=lapack-atlas
|
|
python3.12 -m pip install dist/*.whl
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
python3.12 -m pip install pytest hypothesis
|
|
|
|
- name: Run tests
|
|
run: |
|
|
# Just a small subset of tests; this will be fine if the build
|
|
# succeeds (that's the real purpose of this job)
|
|
pushd $RUNNER_TEMP
|
|
python3.12 -m pytest --pyargs scipy.cluster
|
|
python3.12 -m pytest --pyargs scipy.linalg
|
|
popd
|
|
|
|
free-threaded:
|
|
needs: get_commit_message
|
|
strategy:
|
|
matrix:
|
|
parallel: ['0', '1']
|
|
|
|
runs-on: ubuntu-latest
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
|
|
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: '3.14t-dev'
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y gfortran
|
|
|
|
- name: Install Python dependencies
|
|
run: |
|
|
pip install -r requirements/build.txt
|
|
pip install -r requirements/openblas.txt
|
|
pip install spin pytest pytest-xdist threadpoolctl pooch hypothesis "click<8.3.0"
|
|
|
|
- name: Install pytest-run-parallel
|
|
if: ${{ matrix.parallel == '1'}}
|
|
run: |
|
|
pip install pytest-run-parallel
|
|
pip uninstall --yes pytest-xdist
|
|
|
|
- name: Build SciPy
|
|
run: |
|
|
spin build --with-scipy-openblas
|
|
|
|
- name: Run tests (full)
|
|
if: ${{ matrix.parallel == '0'}}
|
|
run: |
|
|
spin test -j4 -m full --durations=10
|
|
|
|
- name: Run tests (fast, with pytest-run-parallel)
|
|
if: ${{ matrix.parallel == '1'}}
|
|
env:
|
|
# Excluded modules:
|
|
# - scipy.spatial has multiple issues in kdtree/qhull, and gh-20655 is pending.
|
|
TEST_SUBMODULES: >-
|
|
scipy._lib
|
|
scipy.cluster
|
|
scipy.constants
|
|
scipy.datasets
|
|
scipy.differentiate
|
|
scipy.fft
|
|
scipy.fftpack
|
|
scipy.integrate
|
|
scipy.interpolate
|
|
scipy.io
|
|
scipy.linalg
|
|
scipy.misc
|
|
scipy.ndimage
|
|
scipy.odr
|
|
scipy.optimize
|
|
scipy.signal
|
|
scipy.sparse
|
|
scipy.special
|
|
scipy.stats
|
|
run: |
|
|
# Note: Only fast tests; full test suite is unlikely to uncover anything more,
|
|
# and it'll be quite slow with pytest-run-parallel. Also skip
|
|
# tests that won't run in parallel, those are covered by the
|
|
# parallel == 0 run.
|
|
spin test -t $TEST_SUBMODULES -- --parallel-threads=4 --skip-thread-unsafe=true
|
|
|
|
#################################################################################
|
|
clang-17-build-only:
|
|
# Purpose is to check for warnings in builds with latest clang.
|
|
# We do not run the test suite here.
|
|
name: Clang-17 build-only (-Werror)
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: "3.12"
|
|
|
|
- name: Setup system dependencies
|
|
run: |
|
|
sudo apt-get -y update
|
|
wget https://apt.llvm.org/llvm.sh
|
|
chmod u+x llvm.sh
|
|
sudo ./llvm.sh 17
|
|
sudo apt install -y libopenblas-dev liblapack-dev
|
|
|
|
- name: Setup Python build deps
|
|
run: |
|
|
pip install -r requirements/build.txt
|
|
pip install build
|
|
|
|
- name: Build wheel, check for compiler warnings
|
|
run: |
|
|
# specify which compilers to use using environment variables
|
|
CC=clang-17 CXX=clang++-17 FC=gfortran python -m build -wnx -Csetup-args=--werror
|
|
|
|
#################################################################################
|
|
test_aarch64:
|
|
name: aarch64, fast, fail slow, py3.12/npAny, pip+pytest
|
|
needs: get_commit_message
|
|
if: >
|
|
needs.get_commit_message.outputs.message == 1
|
|
&& (github.repository == 'scipy/scipy' || github.repository == '')
|
|
runs-on: ubuntu-24.04-arm
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
submodules: recursive
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
|
with:
|
|
python-version: '3.12'
|
|
|
|
- name: Install Ubuntu dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev
|
|
|
|
- name: Install Python packages
|
|
run: |
|
|
python -m pip install -r requirements/build.txt -r requirements/test.txt
|
|
# We want to check for test timing only in a single job, on Linux, running the
|
|
# fast test suite. This is that job. See gh-20806 for previous issues
|
|
# after running this job on Windows and in multiple jobs.
|
|
python -m pip install pytest-fail-slow
|
|
|
|
- name: Install SciPy
|
|
run: |
|
|
python -m pip install . --no-build-isolation
|
|
|
|
- name: Test SciPy
|
|
run: |
|
|
export OMP_NUM_THREADS=2
|
|
cd ..
|
|
pytest --pyargs scipy -m 'not slow' --durations=0 --durations-min=0.5 --fail-slow=1.0
|