-
Notifications
You must be signed in to change notification settings - Fork 33
102 lines (80 loc) · 3.28 KB
/
Copy pathci.yml
File metadata and controls
102 lines (80 loc) · 3.28 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
name: CI
on: [push, pull_request]
jobs:
run_tests:
name: Run Tests
runs-on: ${{ matrix.os }}
strategy:
# Don't let test failures on one platform block other platforms.
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
# Test against multiple patch versions as CinderX references internal
# CPython functions and structures which can lead to ABI problems. See
# cinderx/UpstreamBorrow for more details.
python-version: ['3.14.0', '3.14.1', '3.14.2', '3.14.3', '3.14.4']
steps:
- name: Checkout CinderX
uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Set up uv
uses: astral-sh/setup-uv@v7
- name: Create venv
run: uv venv --python ${{ matrix.python-version }}
- name: Build CinderX
run: uv build --wheel --python ${{ matrix.python-version }}
- name: Install CinderX
run: uv pip install cinderx --find-links dist --no-index
- name: Check CinderX loads successfully (Linux/Windows)
if: runner.os == 'Linux' || runner.os == 'Windows'
run: |
uv run python -c 'import cinderx ; print(cinderx.get_import_error()) ; assert cinderx.is_initialized()'
# On macOS the _cinderx native extension currently fails to load, so the
# cinderx Python package falls back to its pure-Python stubs. We only
# verify that `import cinderx` succeeds.
- name: Check CinderX loads successfully (macOS)
if: runner.os == 'macOS'
run: |
uv run python -c 'import cinderx ; print("import_error:", cinderx.get_import_error()) ; print("initialized:", cinderx.is_initialized())'
- name: Install pytest
if: runner.os == 'Linux' || runner.os == 'Windows'
run: uv pip install pytest
- name: Run Tests
if: runner.os == 'Linux' || runner.os == 'Windows'
run: uv run pytest cinderx/PythonLib/test_cinderx/ --ignore=cinderx/PythonLib/test_cinderx/test_cpython_overrides/test__opcode.py
build_wheels:
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
# Don't let build failures on one platform block other platforms.
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm]
steps:
- name: Checkout CinderX
uses: actions/checkout@v6
# cibuildwheel uses Python from a docker container. The Python version is
# controlled by selecting the docker image version in pyproject.toml.
- name: Set up Python
uses: actions/setup-python@v6
- name: Install cibuildwheel
run: python -m pip install cibuildwheel
- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- name: Checkout CinderX
uses: actions/checkout@v6
# An sdist is just source code and doesn't contain compiled artifacts, it
# doesn't need to be built per patch version.
- name: Set up Python
uses: actions/setup-python@v6
- name: Install build tools
run: python -m pip install build
- name: Build sdist
run: python -m build --sdist