File: ci-i386.yml

package info (click to toggle)
numcodecs 0.16.5%2Bds-3
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 968 kB
  • sloc: python: 3,938; makefile: 42
file content (80 lines) | stat: -rw-r--r-- 2,327 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Tests on i386

on: [push, pull_request]

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  build-i386:
    runs-on: ubuntu-latest

    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: Setup Alpine Linux environment
        uses: jirutka/setup-alpine@v1.3.0
        with:
          arch: x86
          packages: >
            build-base
            cargo
            cmake
            cython
            git
            meson
            pkgconf
            rust
            sed
            sudo
            uv
            zstd
            python3
            python3-dev
            py3-numpy
            py3-numpy-dev
            py3-pip
            py3-pytest

      - name: Install zfp
        run: |
          uv venv
          PYTHON_INCLUDE=$(uv run python -c 'from sysconfig import get_paths; print(get_paths()["include"])');
          PYTHON_LIB=$(uv run python -c 'import sysconfig; print(sysconfig.get_config_var("LIBDIR"))');
          git clone https://github.com/LLNL/zfp
          sed -i "s/distutils.sysconfig/sysconfig/g" zfp/python/scikit-build-cmake/FindPythonExtensions.cmake
          mkdir zfp/build;
          uv run cmake zfp -B zfp/build -DBUILD_ZFPY=ON -DBUILD_TESTING=OFF -DPYTHON_LIBRARY=$PYTHON_LIB -DPYTHON_INCLUDE_DIR=$PYTHON_INCLUDE
          uv run make -j -C zfp/build
          uv run sudo make -C zfp/build install
          uv add "zfpy @ ./zfp"
        shell: alpine.sh {0}

      - name: Install numcodecs
        run: |
          export DISABLE_NUMCODECS_AVX2=""
          uv venv
          # TODO: Remove this conditional when pcodec supports Python 3.14
          if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
            uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]
          else
            uv pip install -v -e .[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]
          fi
        shell: alpine.sh {0}

      - name: List installed packages
        run: uv pip list
        shell: alpine.sh {0}

      - name: Run tests
        run: uv run pytest -v
        shell: alpine.sh {0}