Skip to content

Commit ca6b3bc

Browse files
chore: pre-build macos binary
1 parent ef8312d commit ca6b3bc

3 files changed

Lines changed: 10 additions & 6 deletions

File tree

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ jobs:
1919
arch: x86_64
2020
- runs-on: codspeedhq-arm64-ubuntu-24.04
2121
arch: aarch64
22+
- runs-on: macos-latest
23+
arch: arm64
2224

2325
runs-on: ${{ matrix.platform.runs-on }}
2426
steps:
@@ -34,7 +36,7 @@ jobs:
3436

3537
- uses: actions/upload-artifact@v4
3638
with:
37-
name: wheels-${{ matrix.platform.arch }}
39+
name: wheels-${{ matrix.platform.runs-on }}-${{ matrix.platform.arch }}
3840
path: wheelhouse/*.whl
3941

4042
build-py3-none-any:

pyproject.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ push = false
9898
]
9999

100100
[tool.cibuildwheel]
101-
build = "cp*manylinux*"
101+
build = "cp*{manylinux,macosx}*"
102102
test-extras = ["build", "test", "compat"]
103103
test-command = "pytest -v --ignore={project}/tests/benchmarks {project}/tests"
104104

@@ -108,6 +108,9 @@ manylinux-x86_64-image = "manylinux_2_28"
108108
manylinux-aarch64-image = "manylinux_2_28"
109109
before-all = "yum -y install valgrind-devel"
110110

111+
[tool.cibuildwheel.macos]
112+
environment = { PYTEST_CODSPEED_FORCE_EXTENSION_BUILD = "1" }
113+
111114
[tool.mypy]
112115
python_version = "3.12"
113116

setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,9 @@
1818

1919
print(f"System: {system} ({current_arch})")
2020

21-
IS_EXTENSION_BUILDABLE = system == "Linux" and current_arch in [
22-
"x86_64",
23-
"aarch64",
24-
]
21+
IS_EXTENSION_BUILDABLE = (
22+
system == "Linux" and current_arch in ["x86_64", "aarch64"]
23+
) or (system == "Darwin" and current_arch == "arm64")
2524

2625
IS_EXTENSION_REQUIRED = (
2726
os.environ.get("PYTEST_CODSPEED_FORCE_EXTENSION_BUILD") is not None

0 commit comments

Comments
 (0)