Skip to content

Replace WAF with CMake #249

Replace WAF with CMake

Replace WAF with CMake #249

Workflow file for this run

name: test
on:
push:
branches:
- master
- '*.x'
tags:
- '*'
pull_request:
schedule:
# Weekly Monday 7AM build
- cron: "0 7 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CODECOV: $(codecov)
jobs:
test:
name: test (Python ${{ matrix.python }}, numpy ${{ matrix.numpy }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- python: '3.9'
numpy: '1.20.*'
os: ubuntu-latest
- python: '3.9'
numpy: '1.20.*'
os: macos-13
- python: '3.10'
numpy: '1.21.*'
os: ubuntu-latest
- python: '3.11'
numpy: '1.26.*'
os: macos-latest
- python: '3.12'
numpy: '1.26.*'
os: ubuntu-latest
- python: '3.12'
numpy: '2.0.*'
os: macos-latest
- python: '3.13'
numpy: '2.0.*'
os: ubuntu-latest
- python: '3.13'
numpy: '2.0.*'
os: macos-latest
# - python: '3.13'
# numpy: '2.0.*'
# os: windows-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: ${{ matrix.python }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- run: pip install -e ".[test]"
- run: cmake -S . -B ./build -DENABLE_TESTING=ON && cmake --build ./build
- run: pip install "numpy==${{ matrix.numpy }}"
- run: pip freeze
- run: pytest -rsv
test_with_coverage:
name: run tests with coverage
needs: [ test ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
with:
fetch-depth: 0
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: '3.11'
cache: 'pip'
cache-dependency-path: pyproject.toml
- run: pip install -e ".[test]"
- run: cmake -S . -B ./build -DENABLE_TESTING=ON && cmake --build ./build
- run: pip freeze
- run: pytest -rsv --cov=./ --cov-report=xml --cov-report term-missing
- uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
files: ./coverage.xml
fail_ci_if_error: true