forked from PyTables/PyTables
-
Notifications
You must be signed in to change notification settings - Fork 0
172 lines (156 loc) · 4.81 KB
/
ci.yml
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
name: CI
concurrency:
group: ${{ github.workflow }}-${{ github.event.number }}-${{ github.event.ref }}
cancel-in-progress: true
on: [push, pull_request]
permissions:
contents: read
jobs:
sdist:
name: Create sdist
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v5
name: Install Python
with:
python-version: 3.x
- name: Ubuntu library headers
run: |
sudo apt update
# Keep in sync with "Prerequisites" in User's Guide.
sudo apt install libblosc-dev libbz2-dev libhdf5-dev liblz4-dev liblzo2-dev libsnappy-dev libzstd-dev zlib1g-dev
- name: Source distribution
run: |
pip install build
python -m build --sdist
- name: Save source distribution
uses: actions/upload-artifact@v4
with:
name: tables-sdist
path: dist/*.tar.gz
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Install lint dependencies
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install flake8
if [ -f requirements-lint.txt ]; then pip install -r requirements-lint.txt; fi
- name: Lint (flake8)
run: |
python -m flake8 --count --show-source --statistics tables
build:
name: ${{ matrix.os }} ${{ matrix.python }} ${{ matrix.numpy }} ${{ matrix.name }}
runs-on: ${{ matrix.os }}
needs: sdist
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
# macos-13 is Intel, macos-latest is Apple Silicon
os: [ubuntu-latest, macos-13, macos-latest, windows-latest]
# Keep in sync with ``project.classifiers`` in ``pyproject.toml``.
python: ['3.11', '3.12', '3.13']
numpy: ['numpy']
include:
- os: ubuntu-latest
python: '3.12'
numpy: 'numpy>=2.2.dev0'
- os: ubuntu-latest
python: '3.12'
numpy: 'numpy<2'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python ${{ matrix.python }}
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python }}
auto-update-conda: true
channels: conda-forge
channel-priority: strict
- name: Install compilers
if: runner.os != 'Linux'
run: |
conda install c-compiler cxx-compiler
- name: Install dependencies
run: |
# Keep in sync with
# "Prerequisites" in User's Guide,
# ``build-system.requires`` in ``pyproject.toml``.
conda install -q bzip2 hdf5 lzo zlib pip
python -m pip install --require-hashes -r requirements.txt
python -m pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple '${{ matrix.numpy }}'
- name: Get source distribution
uses: actions/download-artifact@v4
with:
name: tables-sdist
- name: Installation
run: |
python -m pip install -v tables-*.tar.gz
- name: 'Run test'
run: |
cd .. && python -m tables.tests.test_all -v
pt2to3 -h
ptrepack -h
ptdump -h
pttree -h
build_cblosc:
name: Sdist with cblosc2
runs-on: ubuntu-latest
needs: sdist
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Set up Python
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
channels: conda-forge
channel-priority: strict
- name: Install compilers
if: runner.os != 'Linux'
run: |
conda install c-compiler cxx-compiler
- name: Install dependencies
run: |
# Keep in sync with "Prerequisites" in User's Guide,
# ``build-system.requires`` in ``pyproject.toml``.
conda install bzip2 hdf5 lzo zlib blosc c-blosc2 pip setuptools wheel packaging py-cpuinfo "numpy>=2" cython numexpr 'typing_extensions>=4.4.0'
- name: Get source distrubtion
uses: actions/download-artifact@v4
with:
name: tables-sdist
- name: Installation
run: |
python -m pip install -v tables-*.tar.gz --no-deps
- name: Python blosc2 wheel or conda pkg is not installed
run: |
! conda list | grep -E '^(python-)?blosc2'
- name: 'Run test'
run: |
cd .. && python -m tables.tests.test_all -v
pt2to3 -h
ptrepack -h
ptdump -h
pttree -h