Skip to content

docs: add documentation link to README badge and PyPI #113

docs: add documentation link to README badge and PyPI

docs: add documentation link to README badge and PyPI #113

Workflow file for this run

name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
workflow_call:
inputs:
run_asan:
description: "Run ASAN job"
type: boolean
default: false
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test (Ubuntu)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install system deps
run: |
sudo apt-get update
sudo apt-get install -y libopenblas-dev meson ninja-build
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install Python package
run: uv pip install --system ".[test]"
- name: Run tests
run: pytest tests/python/ -v -n auto --reruns 2 --only-rerun "worker .* crashed"
test-macos:
name: Test (macOS)
runs-on: macos-14
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Install deps and package
run: |
uv pip install --system scipy-openblas32 meson ninja
mkdir -p /tmp/openblas
python -c "import scipy_openblas32 as sc; open('/tmp/openblas/openblas.pc','w').write(sc.get_pkg_config())"
PKG_CONFIG_PATH=/tmp/openblas uv pip install --system ".[test]"
- name: Run quick test
run: pytest tests/python/test_ab01md.py -v
asan:
name: Full Test (ASAN)
if: >-
github.event_name == 'pull_request' ||
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_call' && inputs.run_asan)
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/devcontainers/cpp:ubuntu
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install system dependencies
run: |
apt-get update
apt-get install -y \
libblas-dev \
liblapack-dev \
gfortran \
ninja-build \
python3-dev
- name: Install uv
uses: astral-sh/setup-uv@v4
- name: Setup venv
run: |
uv venv venv
. venv/bin/activate
uv pip install ".[test]"
- name: Build with sanitizers
run: |
. venv/bin/activate
meson setup build -Db_sanitize=address,undefined -Db_lundef=false --buildtype=debug
meson compile -C build
uv pip install . --reinstall --no-deps
- name: Run tests
run: |
. venv/bin/activate
export LD_PRELOAD=$(gcc -print-file-name=libasan.so)
pytest tests/python/ -v -n auto --reruns 2 --only-rerun "worker .* crashed"
env:
ASAN_OPTIONS: detect_leaks=0:symbolize=1:abort_on_error=1:verify_asan_link_order=0
UBSAN_OPTIONS: print_stacktrace=1:halt_on_error=1