BLD: prefer to use bdist_wheel from setuptools rather than wheel #295
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
pull_request: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
tests: | |
name: ${{ matrix.name }} [ ${{ matrix.os }} ] | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ubuntu-latest, macos-latest, windows-latest] | |
python: ['3.11'] | |
toxenv: [test] | |
toxargs: [-v] | |
include: | |
- name: Test with oldest supported versions of our dependencies | |
os: ubuntu-20.04 | |
python: 3.9 | |
toxenv: test-oldestdeps | |
toxargs: -v | |
- name: Test with medium old supported versions of our dependencies | |
# Test that we do not have a problem with some specific version (gh-101). | |
# Comment out if not needed. | |
os: ubuntu-22.04 | |
python: 3.9 | |
toxenv: test-olddeps | |
toxargs: -v | |
- name: Test with development versions of our dependencies | |
os: ubuntu-latest | |
python: '3.12-dev' | |
toxenv: test-devdeps | |
toxargs: -v | |
- name: Code style checks | |
os: ubuntu-latest | |
python: 3.x | |
toxenv: codestyle | |
toxargs: -v | |
- name: Documentation build | |
os: ubuntu-latest | |
python: 3.x | |
toxenv: build_docs | |
toxargs: -v | |
apt_packages: graphviz | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install APT packages | |
if: matrix.apt_packages | |
run: sudo apt-get install ${{ matrix.apt_packages }} | |
- name: Install packages for macOS | |
if: matrix.os == 'macos-latest' | |
run: brew install autoconf automake | |
- name: Install Python dependencies | |
run: python -m pip install --upgrade tox | |
- name: Run tests | |
run: | | |
pip freeze | |
tox ${{ matrix.toxargs }} -e ${{ matrix.toxenv }} -- ${{ matrix.toxposargs }} | |
tests_external_liberfa: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
env: | |
PYERFA_USE_SYSTEM_LIBERFA: 1 | |
strategy: | |
fail-fast: true | |
matrix: | |
include: | |
- name: Tests with external liberfa | |
os: ubuntu-latest | |
python: 3.9 | |
toxenv: test | |
toxargs: -v | |
apt_packages: python3-venv python3-pip liberfa-dev python3-numpy | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install APT packages | |
if: matrix.apt_packages | |
run: sudo apt-get install ${{ matrix.apt_packages }} | |
- name: Run tests | |
run: | | |
python -m venv --system-site-packages tests | |
source tests/bin/activate | |
python -m pip install --editable .[test] | |
(nm -u erfa/ufunc.*.so | grep eraA2af) || exit 1 | |
(python -c 'import erfa' 2>&1 | grep -n 'too old') > /dev/null && (echo 'liberfa too old, skipping tests'; exit 0) || python -m pytest | |
build_against_numpy_1: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
# this is mainly meant to be useful on old or exotic archs | |
# so we use our oldest-supported Python | |
python-version: '3.9' | |
- name: Install build-time dependencies | |
run: | | |
python -m pip install --upgrade wheel setuptools setuptools_scm jinja2 'numpy<2.0' | |
- run: python -m pip list | |
- name: Build | |
# using --no-build-isolation allows us to skip pass build-system metadata | |
# from pyproject.toml | |
# In particular this allows us to use an older version of numpy than we | |
# normally require. | |
# building in --editable mode to avoid PYTHONPATH issues | |
run: | | |
python -m pip install --editable . --no-build-isolation | |
- name: Check | |
run: python -c "import erfa" |