-
Notifications
You must be signed in to change notification settings - Fork 111
173 lines (143 loc) · 4.57 KB
/
ci.yaml
File metadata and controls
173 lines (143 loc) · 4.57 KB
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
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.12", "3.13", "3.14"]
# macos-15-large is an intel runner, macos-14 is an arm64 runner
platform: [ubuntu-latest, ubuntu-22.04-arm, windows-latest, macos-15-large, macos-14]
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0 # required for version resolution
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.2.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: |
# TODO: Remove this conditional when pcodec supports Python 3.14
if [[ "${{ matrix.python-version }}" == "3.14" ]]; then
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,zfpy]"
else
python -m pip install -v ".[test,test_extras,msgpack,google_crc32c,crc32c,pcodec,zfpy]"
fi
- 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
test-crc32c:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- name: google-crc32c
extras: "google_crc32c"
- name: crc32c
extras: "crc32c"
- name: no-crc32c
extras: ""
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.2.0
with:
channels: conda-forge
miniforge-version: latest
python-version: "3.13"
- name: Install compilers
run: conda install -y c-compiler cxx-compiler
- name: Install numcodecs
run: |
if [[ -n "${{ matrix.extras }}" ]]; then
python -m pip install -v ".[${{ matrix.extras }},test]"
else
python -m pip install -v ".[test]"
fi
- name: List installed packages
run: python -m pip list
- name: Run checksum tests
run: pytest -v tests/test_checksum32.py
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
test-zarr:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- zarr-version: "308"
zarr-pkg: "zarr==3.0.8"
- zarr-version: "316"
zarr-pkg: "zarr==3.1.6"
- zarr-version: "main"
zarr-pkg: "zarr @ git+https://github.com/zarr-developers/zarr-python.git@main"
defaults:
run:
shell: bash -el {0}
steps:
- name: Checkout source
uses: actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0 # required for version resolution
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3.2.0
with:
channels: conda-forge
miniforge-version: latest
python-version: "3.13"
- name: Install compilers
run: conda install -y c-compiler cxx-compiler
- name: Install numcodecs and Zarr
run: |
python -m pip install -v ".[test,test_extras]" "${{ matrix.zarr-pkg }}" crc32c
- name: List installed packages
run: python -m pip list
- name: Run Zarr integration tests
run: pytest tests/test_zarr3.py tests/test_zarr3_import.py
- uses: codecov/codecov-action@v5
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true