fix: byte-order bugs and little-endian test assumptions on big-endian hosts #2
Workflow file for this run
This file contains hidden or 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
| # Run the byte-order-sensitive tests on a big-endian host: s390x, emulated with QEMU. | |
| # Emulation makes the full suite take about 40 minutes, so this job runs only the tests | |
| # that exercise data types, codecs and metadata, and only when that code changes (plus | |
| # a weekly run to catch anything the path filter misses). | |
| name: Big-endian | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| paths: | |
| - "src/zarr/codecs/**" | |
| - "src/zarr/core/buffer/**" | |
| - "src/zarr/core/dtype/**" | |
| - "src/zarr/core/metadata/**" | |
| - "src/zarr/metadata/**" | |
| - "tests/test_codecs/**" | |
| - "tests/test_dtype/**" | |
| - "tests/test_metadata/**" | |
| - "ci/big-endian/**" | |
| - ".github/workflows/big-endian.yml" | |
| schedule: | |
| - cron: "0 3 * * 1" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| s390x: | |
| name: s390x (QEMU) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 90 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| fetch-depth: 0 # hatch-vcs needs the tags to resolve a version | |
| persist-credentials: false | |
| - uses: docker/setup-qemu-action@99012661954931238ded8c8b007157a8430204e1 # v4.4.0 | |
| with: | |
| platforms: s390x | |
| - uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4.4.1 | |
| - name: Build test image | |
| uses: docker/build-push-action@c3c9e263c25d99ce0380d002d59b67737d91b0dc # v7.4.0 | |
| with: | |
| context: ci/big-endian | |
| platforms: linux/s390x | |
| tags: zarr-big-endian | |
| load: true | |
| cache-from: type=gha,scope=big-endian | |
| cache-to: type=gha,scope=big-endian,mode=max | |
| - name: Run tests | |
| run: | | |
| docker run --rm --platform linux/s390x -v "$PWD":/src:ro zarr-big-endian bash -euc ' | |
| cp -r /src /work && cd /work | |
| pip install -q --no-deps --no-build-isolation . | |
| python -c "import sys; assert sys.byteorder == \"big\", sys.byteorder" | |
| python -m pytest -p no:cacheprovider --hypothesis-profile ci -n auto \ | |
| tests/test_dtype tests/test_dtype_registry.py \ | |
| tests/test_codecs tests/test_metadata \ | |
| tests/test_array.py tests/test_v2.py tests/test_info.py \ | |
| tests/test_pipeline_parity.py tests/test_cli/test_migrate_v3.py | |
| ' |