-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (58 loc) · 1.83 KB
/
python.yml
File metadata and controls
62 lines (58 loc) · 1.83 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
name: Python
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
jobs:
tests:
name: Run tests on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Build and install
run: pip install --verbose .[tests]
- name: Run tests with pytest
run: pytest
build_wheels:
name: Build wheels on ${{ matrix.config.os }}
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- os: ubuntu-24.04 # using manylinux/musllinux images
- os: ubuntu-24.04-arm # using manylinux/musllinux images
- os: windows-latest
- os: macos-15
steps:
- uses: actions/checkout@v4
- name: Build wheels
env:
# <memory_resource> requires 14.0: https://developer.apple.com/xcode/cpp/
# https://cibuildwheel.pypa.io/en/stable/cpp_standards/#macos-and-deployment-target-versions
MACOSX_DEPLOYMENT_TARGET: "14.0"
CIBW_ARCHS_MACOS: "x86_64 arm64" # https://cibuildwheel.pypa.io/en/stable/faq/#cross-compiling
uses: pypa/cibuildwheel@v2.23.0
- uses: actions/upload-artifact@v4
with:
name: cibw-wheels-${{ matrix.config.os }}-${{ strategy.job-index }}
path: ./wheelhouse/*.whl
build_sdist:
name: Build source distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build sdist
run: pipx run build --sdist
- uses: actions/upload-artifact@v4
with:
name: cibw-sdist
path: ./dist/*.tar.gz