-
Notifications
You must be signed in to change notification settings - Fork 55
103 lines (85 loc) · 3.02 KB
/
Copy pathcibuildwheel.yml
File metadata and controls
103 lines (85 loc) · 3.02 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: build-wheels
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master, unstuck-vmprof ]
pull_request:
branches: [ master, unstuck-vmprof ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build_binary_wheels:
name: Build binary wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-latest]
steps:
# Note: the action happens inside a docker image
- uses: actions/checkout@v7
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v4
with:
platforms: all
- name: Build wheels
uses: pypa/cibuildwheel@v4.2.1
env:
CIBW_MANYLINUX_X86_64_IMAGE: manylinux_2_28
CIBW_MANYLINUX_AARCH64_IMAGE: manylinux_2_28
CIBW_ARCHS_LINUX: auto aarch64
# cp3*t-*: free-threaded CPython is built by default since
# cibuildwheel 4, but vmprof does not support it
CIBW_SKIP: "cp3*t-* *-win32 *-manylinux_i686 *musllinux*"
CIBW_BEFORE_BUILD_LINUX: dnf install -y libunwind-devel
CIBW_TEST_GROUPS: test
CIBW_TEST_COMMAND: cd {package} && pytest vmprof jitlog -vv
CIBW_TEST_COMMAND_WINDOWS: cd /d {package} && pytest vmprof jitlog -vv
CIBW_TEST_SKIP: "*-*linux_{aarch64,ppc64le,s390x}"
- uses: actions/upload-artifact@v7
with:
name: ${{ matrix.os }}
path: ./wheelhouse/*.whl
build_pypy_wheels:
name: Build pypy wheels
runs-on: ubuntu-24.04
strategy:
fail-fast: false
steps:
# Note: not inside a docker
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: 'pypy-3.11'
- name: Install system libraries
run: sudo apt install -y libunwind-dev libelf-dev libdwarf-dev rename
- name: Build wheel
run: |
pypy -m pip install wheel
pypy -m pip wheel .
- name: Install wheel
run: pypy -m pip install vmprof*.whl
- name: Test wheel
run: |
FAILED=false
pypy -m pip install --upgrade pip
pypy -m pip install --group test build
pypy -m pytest vmprof -v || FAILED=true
pypy -m pytest jitlog -v || FAILED=true
if [ "$FAILED" == true ]; then exit 1; fi
# The wheel is pure python and comes out as
# vmprof-*-py3-none-any.whl
# which pip would also pick on CPython. Tag it for this PyPy
# version instead
TAG=$(pypy -c "import sys; print('pp%d%d' % sys.version_info[:2])")
rename "s/py3-none-any/$TAG-none-any/" vmprof-*.whl
- name: Build sdist
run: |
pypy -m build --sdist .
- uses: actions/upload-artifact@v7
with:
path: |
vmprof*.whl
dist/*.tar.gz