Skip to content

pyproject.toml: use dynamic version with setuptools-scm #72

pyproject.toml: use dynamic version with setuptools-scm

pyproject.toml: use dynamic version with setuptools-scm #72

Workflow file for this run

name: Tests
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.type }}
cancel-in-progress: true
on:
push:
jobs:
packages:
name: Test on ${{ matrix.os }} (${{ matrix.python }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v3
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install libhdf4-dev (macos-latest)
if: matrix.os == 'macos-latest'
run: |
brew install ninja jpeg
export PATH="/opt/homebrew/opt/jpeg/bin:$PATH"
export LDFLAGS="-L/opt/homebrew/opt/jpeg/lib"
export CPPFLAGS="-I/opt/homebrew/opt/jpeg/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/jpeg/lib/pkgconfig"
echo 'LIBRARY_DIRS=/opt/homebrew/opt/jpeg/lib' >> $GITHUB_ENV
echo 'INCLUDE_DIRS=/opt/homebrew/opt/jpeg/include' >> $GITHUB_ENV
cd /tmp &&
git clone --depth 1 --branch hdf4.3.0 https://github.com/HDFGroup/hdf4.git &&
mkdir build && cd build &&
../hdf4/configure --enable-hdf4-xdr --enable-shared --disable-static --disable-fortran --disable-netcdf --enable-java --enable-production --with-zlib --prefix=/usr/local &&
sudo make install
- name: Install libhdf4-dev (ubuntu-latest)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install libhdf4-dev
- name: Setup conda (windows-latest)
if: matrix.os == 'windows-latest'
uses: s-weigand/setup-conda@v1
- name: Install libhdf4-dev (windows-latest)
if: matrix.os == 'windows-latest'
run: |
conda config --set always_yes yes --set changeps1 no --set auto_update_conda no --set safety_checks disabled
conda install -q hdf4
echo "LIBRARY_DIRS=C:\Miniconda\Library\lib;C:\Miniconda\Library\bin" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "INCLUDE_DIRS=C:\Miniconda\Library\include" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Install requirements
run: |
echo LIBRARY_DIRS is $LIBRARY_DIRS
echo INCLUDE_DIRS is $INCLUDE_DIRS
python -m pip install -U pip
python -m pip install numpy pytest
- name: Run tests
run: |
pip install -e .
pytest
python examples/runall.py