Skip to content

Commit f4cad23

Browse files
committed
Add wheel builds for windows
1 parent b240942 commit f4cad23

File tree

1 file changed

+69
-29
lines changed

1 file changed

+69
-29
lines changed

.github/workflows/deploy.yml

Lines changed: 69 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,20 @@ permissions:
2323
contents: read
2424

2525
jobs:
26-
build-linux-py3-legacy:
27-
runs-on: ubuntu-24.04
28-
strategy:
26+
build-wheels-legacy:
27+
strategy:
2928
fail-fast: false
3029
matrix:
31-
wheel:
32-
- cp37-manylinux
33-
- cp37-musllinux
30+
include:
31+
# Linux glibc
32+
- wheel: cp37-manylinux
33+
os: ubuntu-24.04
34+
# Linux musllibc
35+
- wheel: cp37-musllinux
36+
os: ubuntu-24.04
37+
38+
name: Build wheels for ${{ matrix.wheel }}
39+
runs-on: ${{ matrix.os }}
3440

3541
steps:
3642
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
@@ -39,17 +45,20 @@ jobs:
3945
fetch-depth: 0
4046

4147
- name: Setup QEMU
48+
if: runner.os == 'Linux'
4249
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # 3.6.0
50+
with:
51+
platforms: arm64
4352

4453
- name: Build Wheels
4554
uses: pypa/cibuildwheel@8d945475ac4b1aac4ae08b2fd27db9917158b6ce # 2.17.0
4655
env:
47-
CIBW_PLATFORM: linux
56+
CIBW_PLATFORM: auto
4857
CIBW_BUILD: "${{ matrix.wheel }}*"
4958
CIBW_ARCHS_LINUX: x86_64 aarch64
50-
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
59+
CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
5160
CIBW_TEST_REQUIRES: pytest
52-
CIBW_TEST_COMMAND: "PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx"
61+
CIBW_TEST_COMMAND_LINUX: "export PYTHONPATH={project}/tests; pytest {project}/tests/agent_unittests -vx"
5362

5463
- name: Upload Artifacts
5564
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
@@ -59,24 +68,43 @@ jobs:
5968
if-no-files-found: error
6069
retention-days: 1
6170

62-
build-linux-py3:
63-
runs-on: ubuntu-24.04
71+
build-wheels:
6472
strategy:
6573
fail-fast: false
6674
matrix:
67-
wheel:
68-
- cp38-manylinux
69-
- cp38-musllinux
70-
- cp39-manylinux
71-
- cp39-musllinux
72-
- cp310-manylinux
73-
- cp310-musllinux
74-
- cp311-manylinux
75-
- cp311-musllinux
76-
- cp312-manylinux
77-
- cp312-musllinux
78-
- cp313-manylinux
79-
- cp313-musllinux
75+
include:
76+
# Linux glibc
77+
- wheel: cp38-manylinux
78+
os: ubuntu-24.04
79+
- wheel: cp39-manylinux
80+
os: ubuntu-24.04
81+
- wheel: cp310-manylinux
82+
os: ubuntu-24.04
83+
- wheel: cp311-manylinux
84+
os: ubuntu-24.04
85+
- wheel: cp312-manylinux
86+
os: ubuntu-24.04
87+
- wheel: cp313-manylinux
88+
os: ubuntu-24.04
89+
# Linux musllibc
90+
- wheel: cp38-musllinux
91+
os: ubuntu-24.04
92+
- wheel: cp39-musllinux
93+
os: ubuntu-24.04
94+
- wheel: cp310-musllinux
95+
os: ubuntu-24.04
96+
- wheel: cp311-musllinux
97+
os: ubuntu-24.04
98+
- wheel: cp312-musllinux
99+
os: ubuntu-24.04
100+
- wheel: cp313-musllinux
101+
os: ubuntu-24.04
102+
# Windows
103+
- wheel: cp313-win
104+
os: windows-2025
105+
106+
name: Build wheels for ${{ matrix.wheel }}
107+
runs-on: ${{ matrix.os }}
80108

81109
steps:
82110
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
@@ -85,17 +113,26 @@ jobs:
85113
fetch-depth: 0
86114

87115
- name: Setup QEMU
116+
if: runner.os == 'Linux'
88117
uses: docker/setup-qemu-action@29109295f81e9208d7d86ff1c6c12d2833863392 # 3.6.0
118+
with:
119+
platforms: arm64
89120

90121
- name: Build Wheels
91122
uses: pypa/cibuildwheel@faf86a6ed7efa889faf6996aa23820831055001a # 2.23.3
92123
env:
93-
CIBW_PLATFORM: linux
124+
CIBW_PLATFORM: auto
94125
CIBW_BUILD: "${{ matrix.wheel }}*"
95126
CIBW_ARCHS_LINUX: x86_64 aarch64
96-
CIBW_ENVIRONMENT: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
127+
CIBW_ARCHS_MACOS: native
128+
CIBW_ARCHS_WINDOWS: AMD64 ARM64
129+
CIBW_ENVIRONMENT_LINUX: "LD_LIBRARY_PATH=/opt/rh/devtoolset-8/root/usr/lib64:/opt/rh/devtoolset-8/root/usr/lib:/opt/rh/devtoolset-8/root/usr/lib64/dyninst:/opt/rh/devtoolset-8/root/usr/lib/dyninst:/usr/local/lib64:/usr/local/lib"
97130
CIBW_TEST_REQUIRES: pytest
98-
CIBW_TEST_COMMAND: "PYTHONPATH={project}/tests pytest {project}/tests/agent_unittests -vx"
131+
CIBW_TEST_COMMAND_LINUX: "export PYTHONPATH={project}/tests; pytest {project}/tests/agent_unittests -vx"
132+
CIBW_TEST_COMMAND_MACOS: "export PYTHONPATH={project}/tests; pytest {project}/tests/agent_unittests -vx"
133+
CIBW_TEST_COMMAND_WINDOWS: "set PYTHONPATH={project}/tests; pytest {project}/tests/agent_unittests -vx"
134+
# Windows ARM64 tests won't run when using cross compilation. Skip unless we can move to a native windows-arm runner.
135+
CIBW_TEST_SKIP: "*-win_arm64"
99136

100137
- name: Upload Artifacts
101138
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # 4.6.2
@@ -106,7 +143,9 @@ jobs:
106143
retention-days: 1
107144

108145
build-sdist:
146+
name: Build sdist
109147
runs-on: ubuntu-24.04
148+
110149
steps:
111150
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # 5.0.0
112151
with:
@@ -143,6 +182,7 @@ jobs:
143182
retention-days: 1
144183

145184
publish:
185+
name: Publish
146186
runs-on: ubuntu-24.04
147187
environment: pypi
148188
permissions:
@@ -151,8 +191,8 @@ jobs:
151191
attestations: write
152192

153193
needs:
154-
- build-linux-py3-legacy
155-
- build-linux-py3
194+
- build-wheels-legacy
195+
- build-wheels
156196
- build-sdist
157197

158198
steps:

0 commit comments

Comments
 (0)