Drop dependency from typing-extension #362
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 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
pull_request: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
permissions: | |
contents: read | |
env: | |
PACKAGE: tables | |
jobs: | |
sdist: | |
name: Create sdist | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: actions/setup-python@v5 | |
name: Install Python | |
with: | |
python-version: 3.x | |
- name: Ubuntu library headers | |
run: | | |
sudo apt update | |
# Keep in sync with "Prerequisites" in User's Guide. | |
sudo apt install libblosc-dev libbz2-dev libhdf5-dev liblz4-dev liblzo2-dev libsnappy-dev libzstd-dev zlib1g-dev | |
- name: Source distribution | |
run: | | |
pip install build | |
python -m build --sdist | |
- name: Save source distribution | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tables-sdist | |
path: dist/*.tar.gz | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: "3.x" | |
- name: Install lint dependencies | |
shell: bash | |
run: | | |
python -m pip install --upgrade pip | |
python -m pip install flake8 isort black | |
if [ -f requirements-lint.txt ]; then pip install -r requirements-lint.txt; fi | |
- name: Lint (flake8) | |
run: | | |
python -m flake8 --count --show-source --statistics ${PACKAGE} | |
- name: Lint (isort) | |
run: | | |
python -m isort --check ${PACKAGE} | |
- name: Lint (black) | |
run: | | |
python -m black --check ${PACKAGE} | |
build: | |
name: ${{ matrix.os }} ${{ matrix.python }} ${{ matrix.numpy }} ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
needs: sdist | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
# macos-13 is Intel, macos-latest is Apple Silicon | |
os: [ubuntu-latest, macos-13, macos-latest, windows-latest] | |
# Keep in sync with ``project.classifiers`` in ``pyproject.toml``. | |
python: ['3.11', '3.12', '3.13'] | |
numpy: ['numpy'] | |
include: | |
- os: ubuntu-latest | |
python: '3.12' | |
numpy: 'numpy>=2.2.dev0' | |
- os: ubuntu-latest | |
python: '3.12' | |
numpy: 'numpy<2' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python ${{ matrix.python }} | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
python-version: ${{ matrix.python }} | |
auto-update-conda: true | |
channels: conda-forge | |
channel-priority: strict | |
- name: Install compilers | |
if: runner.os != 'Linux' | |
run: | | |
conda install c-compiler cxx-compiler | |
- name: Install dependencies | |
run: | | |
# Keep in sync with | |
# "Prerequisites" in User's Guide, | |
# ``build-system.requires`` in ``pyproject.toml``. | |
conda install -q bzip2 hdf5 lzo zlib pip | |
python -m pip install --require-hashes -r requirements.txt | |
python -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple '${{ matrix.numpy }}' | |
- name: Get source distribution | |
uses: actions/download-artifact@v4 | |
with: | |
name: tables-sdist | |
- name: Installation | |
run: | | |
python -m pip install -v tables-*.tar.gz | |
- name: 'Run test' | |
run: | | |
cd .. && python -m tables.tests.test_all -v | |
pt2to3 -h | |
ptrepack -h | |
ptdump -h | |
pttree -h | |
build_cblosc: | |
name: Sdist with cblosc2 | |
runs-on: ubuntu-latest | |
needs: sdist | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Set up Python | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
auto-update-conda: true | |
channels: conda-forge | |
channel-priority: strict | |
- name: Install compilers | |
if: runner.os != 'Linux' | |
run: | | |
conda install c-compiler cxx-compiler | |
- name: Install dependencies | |
run: | | |
# Keep in sync with "Prerequisites" in User's Guide, | |
# ``build-system.requires`` in ``pyproject.toml``. | |
conda install bzip2 hdf5 lzo zlib blosc c-blosc2 pip setuptools wheel packaging py-cpuinfo "numpy>=2" cython numexpr | |
- name: Get source distrubtion | |
uses: actions/download-artifact@v4 | |
with: | |
name: tables-sdist | |
- name: Installation | |
run: | | |
python -m pip install -v tables-*.tar.gz --no-deps | |
- name: Python blosc2 wheel or conda pkg is not installed | |
run: | | |
! conda list | grep -E '^(python-)?blosc2' | |
- name: 'Run test' | |
run: | | |
cd .. && python -m tables.tests.test_all -v | |
pt2to3 -h | |
ptrepack -h | |
ptdump -h | |
pttree -h |