-
Notifications
You must be signed in to change notification settings - Fork 88
97 lines (81 loc) · 2.58 KB
/
ci.yaml
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
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.10", "3.11", "3.12", "3.13.0"]
# macos-12 is an intel runner, macos-14 is a arm64 runner
platform: [ubuntu-latest, windows-latest, macos-12, macos-14]
steps:
- name: Checkout source
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Conda
uses: conda-incubator/[email protected]
with:
channels: conda-forge
miniforge-version: latest
python-version: ${{ matrix.python-version }}
- name: Show info about `base` environment
shell: "bash -l {0}"
run: |
conda info
conda config --show-sources
conda list --show-channel-urls
- name: Set up `env`
shell: "bash -l {0}"
run: >
conda create -n env
c-compiler cxx-compiler
python=${{matrix.python-version}} wheel pip
- name: Install clang
shell: "bash -l {0}"
if: matrix.platform == 'macos-12'
run: |
conda activate env
conda install -y 'clang>=12.0.1,<17'
- name: Show info about `env` environment
shell: "bash -l {0}"
run: |
conda list --show-channel-urls -n env
- name: Install numcodecs
shell: "bash -l {0}"
run: |
conda activate env
export DISABLE_NUMCODECS_AVX2=""
# TODO: put back zfpy import when it supports numpy 2.0
python -m pip install -v -e .[test,test_extras,msgpack]
- name: Install pcodec
if: matrix.python-version != '3.13.0'
shell: "bash -l {0}"
run: |
conda activate env
python -m pip install -v pcodec
# This is used to test with zfpy, which does not yet support numpy 2.0
- name: Install older numpy and zfpy
if: matrix.python-version == '3.10'
shell: "bash -l {0}"
run: |
conda activate env
python -m pip install "zfpy>=1" "numpy<2"
- name: List installed packages
shell: "bash -l {0}"
run: |
conda activate env
python -m pip list
- name: Run tests
shell: "bash -l {0}"
run: |
conda activate env
pytest -v
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true