| 1 |
name: bitshuffle-ci-build |
| 2 |
on: |
| 3 |
pull_request: |
| 4 |
branches: |
| 5 |
- master |
| 6 |
push: |
| 7 |
branches: |
| 8 |
- master |
| 9 |
|
| 10 |
jobs: |
| 11 |
run-tests: |
| 12 |
|
| 13 |
strategy: |
| 14 |
matrix: |
| 15 |
python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 16 |
os: [ubuntu-latest, macos-latest] |
| 17 |
|
| 18 |
runs-on: ${{ matrix.os }} |
| 19 |
steps: |
| 20 |
- uses: actions/checkout@v4 |
| 21 |
|
| 22 |
- name: Install apt dependencies |
| 23 |
if: ${{ matrix.os == 'ubuntu-latest' }} |
| 24 |
run: | |
| 25 |
sudo apt-get update |
| 26 |
sudo apt-get install -y libhdf5-serial-dev hdf5-tools pkg-config |
| 27 |
|
| 28 |
- name: Install homebrew dependencies |
| 29 |
if: ${{ matrix.os == 'macos-latest' }} |
| 30 |
run: | |
| 31 |
brew update |
| 32 |
brew install hdf5 pkg-config |
| 33 |
|
| 34 |
- name: Set up Python ${{ matrix.python-version }} |
| 35 |
uses: actions/setup-python@v5 |
| 36 |
with: |
| 37 |
python-version: ${{ matrix.python-version }} |
| 38 |
|
| 39 |
- name: Install h5py |
| 40 |
if: ${{ matrix.os == 'macos-latest' }} |
| 41 |
run: | |
| 42 |
pip install h5py |
| 43 |
|
| 44 |
- name: Install pip dependencies |
| 45 |
run: | |
| 46 |
pip install Cython |
| 47 |
pip install -r requirements.txt |
| 48 |
pip install pytest |
| 49 |
|
| 50 |
# Pull in ZSTD repo |
| 51 |
git submodule update --init |
| 52 |
|
| 53 |
# Installing the plugin to arbitrary directory to check the install script. |
| 54 |
python setup.py install --h5plugin --h5plugin-dir ~/hdf5/lib --zstd |
| 55 |
|
| 56 |
- name: Run tests |
| 57 |
run: pytest -v . |