Skip to content

Backport 0.15 zstd fixes #1564

Backport 0.15 zstd fixes

Backport 0.15 zstd fixes #1564

Workflow file for this run

name: Tests
on: [push, pull_request]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
# macos-15-large is an intel runner, macos-14 is a arm64 runner
platform: [ubuntu-latest, windows-latest, macos-15-large, macos-14]
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # required for version resolution
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.1.0
with:
channels: conda-forge
miniforge-version: latest
python-version: ${{ matrix.python-version }}
- name: Install compilers
run: conda install -y c-compiler cxx-compiler
- name: Install clang
if: matrix.platform == 'macos-15-large'
run: conda install -y 'clang>=12.0.1,<17'
- name: Show conda environment info
run: |
conda info
conda config --show-sources
conda list --show-channel-urls
- name: Install numcodecs
run: |
export DISABLE_NUMCODECS_AVX2=""
python -m pip install -v -e .[test,test_extras,msgpack,crc32c,pcodec,zfpy]
- name: Deduplicate LC_RPATH entries
# The conda-forge compilers inject -Wl,-rpath,$PREFIX/lib multiple
# times, producing duplicate LC_RPATH load commands. macOS 15's dyld
# rejects duplicate LC_RPATH at load time, so strip the extras.
if: runner.os == 'macOS'
run: |
rpaths() { otool -l "$1" | awk '/ LC_RPATH$/{getline; getline; print $2}'; }
for so in numcodecs/*.so; do
for rp in $(rpaths "$so" | sort | uniq -d); do
while [ "$(rpaths "$so" | grep -cx "$rp")" -gt 1 ]; do
echo "Removing duplicate LC_RPATH '$rp' from $so"
install_name_tool -delete_rpath "$rp" "$so"
done
done
done
- name: Install zarr-python
# Since zarr v3 requires numpy >= 1.25, on Python 3.11 leave it out
# so we can have some tests of our minimum version of numpy (1.24)
if: matrix.python-version != '3.11'
# numcodecs.zarr3 in this branch targets the zarr 3.0.x API; zarr 3.1+
# moved these codecs into zarr itself and changed internal APIs.
run: python -m pip install "zarr>=3.0,<3.1"
- name: List installed packages
run: python -m pip list
- name: Run tests
shell: "bash -l {0}"
run: pytest -v
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true