Repository navigation
115 lines (110 loc) · 5.28 KB
/
Copy pathpython-wheels.yml
File metadata and controls
115 lines (110 loc) · 5.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
103
104
105
106
107
108
109
110
111
112
113
114
115
name: Python wheel qualification
# Third-party actions are pinned to immutable commit SHAs; the trailing comment
# names the release the SHA was resolved from. `dtolnay/rust-toolchain`
# publishes no releases, so its SHA is the reviewed tip of the `stable` branch
# (the action installs `stable` when the `toolchain` input is omitted).
on:
workflow_dispatch:
push:
branches: [main]
paths:
- '.github/workflows/python-wheels.yml'
- 'crates/eggreplay-python/**'
- 'tools/python/**'
permissions:
contents: read
jobs:
wheel:
strategy:
fail-fast: false
matrix:
include:
- target: manylinux-x86_64
os: ubuntu-24.04
machine: x86_64
platform_tag: manylinux_2_34_x86_64
- target: manylinux-aarch64
os: ubuntu-24.04-arm
machine: aarch64
platform_tag: manylinux_2_34_aarch64
- target: macos-arm64
os: macos-15 # macOS 14 GitHub Actions runners retired on 2026-11-02 (actions/runner-images#15226).
machine: arm64
platform_tag: macosx_11_0_arm64
- target: macos-x86_64
os: macos-15-intel
machine: x86_64
platform_tag: macosx_10_12_x86_64
- target: windows-x86_64
os: windows-latest
machine: amd64
platform_tag: win_amd64
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '0.8.22'
- name: Verify native runner architecture
run: python -c "import platform; actual=platform.machine().lower(); expected='${{ matrix.machine }}'; print(actual); assert actual == expected, (actual, expected)"
- name: Build abi3 wheel
run: uv run --directory crates/eggreplay-python --python 3.11 --with maturin==1.14.1 maturin build --locked --release --compatibility pypi --out target/python-release/${{ matrix.target }}
- name: Inspect wheel contents and tags
run: python tools/python/inspect_wheel.py crates/eggreplay-python/target/python-release/${{ matrix.target }} ${{ matrix.platform_tag }}
- name: Clean install, replay, regression, and pytest plugin smoke
run: python tools/python/clean_wheel_smoke.py --wheel crates/eggreplay-python/target/python-release/${{ matrix.target }} --smoke-script tools/python/wheel_smoke.py
- name: Record artifact hash
run: python tools/python/write_artifact_manifest.py crates/eggreplay-python/target/python-release/${{ matrix.target }} --pattern '*.whl'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: eggreplay-${{ matrix.target }}
path: crates/eggreplay-python/target/python-release/${{ matrix.target }}
if-no-files-found: error
retention-days: 30
source-distribution:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: dtolnay/rust-toolchain@39008827e6b4319a349e9a42dfc90579dd25f1ca # stable
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: '3.11'
- uses: astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6.8.0
with:
version: '0.8.22'
- name: Build source distribution and wheel from the sdist
run: uv run --directory crates/eggreplay-python --python 3.11 --with maturin==1.14.1 maturin build --release --sdist --out target/python-sdist-verify
- name: Inspect source archive
run: python tools/python/inspect_sdist.py crates/eggreplay-python/target/python-sdist-verify/*.tar.gz
- name: Record source archive hash
run: python tools/python/write_artifact_manifest.py crates/eggreplay-python/target/python-sdist-verify --pattern '*.tar.gz'
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: eggreplay-sdist
path: |
crates/eggreplay-python/target/python-sdist-verify/*.tar.gz
crates/eggreplay-python/target/python-sdist-verify/SHA256SUMS.txt
if-no-files-found: error
retention-days: 30
abi3-interpreter-smoke:
needs: wheel
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python: ['3.11', '3.12', '3.13', '3.14']
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
with:
python-version: ${{ matrix.python }}
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
name: eggreplay-manylinux-x86_64
path: target/python-wheel-smoke
- name: Smoke the same abi3 wheel on this CPython version
run: python tools/python/clean_wheel_smoke.py --wheel target/python-wheel-smoke --smoke-script tools/python/wheel_smoke.py