Skip to content

Include 3.13 and numpy 2 support in binaries #775

Include 3.13 and numpy 2 support in binaries

Include 3.13 and numpy 2 support in binaries #775

Workflow file for this run

name: Test
on:
pull_request:
paths-ignore:
- 'doc/**'
- 'README.*'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
# Python version number must be string, otherwise 3.10 becomes 3.1
# Disable Windows for now, as long as numpy is buggy on Windows
# - os: windows-latest
# python-version: "3.12"
# installs: "numpy==1.26.4"
- os: macos-14
python-version: "3.12"
installs: "numpy>=2"
- os: ubuntu-latest
python-version: "3.13"
installs: "numpy>=2"
fail-fast: false
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 3
# must come after checkout
- uses: hendrikmuhs/ccache-action@v1.2
with:
key: ${{ github.job }}-${{ matrix.os }}-${{ matrix.python-version }}
- uses: astral-sh/setup-uv@v3
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- uses: awvwgk/setup-fortran@main
id: setup-fortran
with:
compiler: gcc
version: 13
- run: python -m pip install --upgrade pip
- if: ${{ matrix.os != 'windows-latest' }}
run: uv pip install --system .[test] ${{ matrix.installs }}
- if: ${{ matrix.os == 'windows-latest' }}
run: python -m pip install --prefer-binary -v .[test] ${{ matrix.installs }}
env:
CMAKE_GENERATOR: "MinGW Makefiles"
FC: ${{ steps.setup-fortran.outputs.fc }}
# graphviz is needed for tests, only install it when compilation succeed
- uses: tlylt/install-graphviz@v1
# Tests run in parallel, but data download is currently not thread-safe.
# We work around this by downloading all data files upfront.
- run: python download_data.py
- run: python -m pytest -vv -n 3
env:
no_proxy: '*'
# always() ensures upload even if pytest ends with failures
- if: always()
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.os }}-${{ matrix.python-version }}
path: "fig/**"