-
Notifications
You must be signed in to change notification settings - Fork 70
135 lines (114 loc) · 3.03 KB
/
test_python.yml
File metadata and controls
135 lines (114 loc) · 3.03 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
name: Python
on: # yamllint disable-line rule:truthy
push:
pull_request:
workflow_call:
workflow_dispatch:
jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: 3
pip-install: build twine
- name: Build sdist
run: python -m build --sdist
- name: Check sdist
run: python -m twine check dist/*.tar.gz
- name: Upload sdist
uses: actions/upload-artifact@v7
with:
name: sdist
path: dist/*.tar.gz
retention-days: 1
wheel:
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-15
- macos-15-intel
python:
- "cp310"
- "cp311"
- "cp312"
env:
pysabi: ${{ matrix.python == 'cp312' && matrix.python || '' }}
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: 3
pip-install: abi3audit
- name: Setup environment
run: |
# Reproducible Builds
echo SOURCE_DATE_EPOCH=$(git log -1 --pretty=%at) >> $GITHUB_ENV
if [ ${{ runner.os }} = macOS ]; then
echo ZERO_AR_DATE=YES >> $GITHUB_ENV; fi
# macOS Deployment Target
if [ ${{ runner.os }}-${{ runner.arch }} = macOS-X64 ]; then
echo MACOSX_DEPLOYMENT_TARGET=10.13 >> $GITHUB_ENV; fi
- name: Build wheel
uses: pypa/cibuildwheel@v3.4.0
with:
extras: uv
output-dir: dist
env:
CIBW_BUILD: "${{ matrix.python }}-*"
CIBW_SKIP: "*musllinux*"
CIBW_BUILD_FRONTEND: "build[uv]"
CIBW_ENVIRONMENT: >-
SKBUILD_WHEEL_PY_API=${{ env.pysabi }}
- name: Check wheel
run: python -m abi3audit -Ss dist/*.whl
if: ${{ env.pysabi != '' }}
- name: Upload wheel
uses: actions/upload-artifact@v7
with:
name: wheel-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python }}
path: dist/*.whl
retention-days: 1
test:
needs: [wheel]
runs-on: ${{ matrix.runner }}
strategy:
fail-fast: false
matrix:
runner:
- ubuntu-24.04
- ubuntu-24.04-arm
- macos-15
- macos-15-intel
python:
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
- "3.x"
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python }}
pip-install: pytest
- name: Download wheel
uses: actions/download-artifact@v7
with:
path: dist
pattern: wheel-${{ runner.os }}-${{ runner.arch }}-*
merge-multiple: true
- name: Install wheel
run: python -m pip install mutationpp --find-links=dist
- name: Test wheel
run: pytest