Skip to content

Commit 1bb305f

Browse files
committed
Improve aarch64 and mac builds
1 parent 9fa2832 commit 1bb305f

File tree

2 files changed

+4
-13
lines changed

2 files changed

+4
-13
lines changed

.github/workflows/build_wheels.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323
- uses: actions/checkout@v4
2424

25-
- uses: pypa/cibuildwheel@v2.21.2
25+
- uses: pypa/cibuildwheel@v2.22.0
2626
env:
2727
CIBW_BUILD: "cp${{ matrix.python-version}}-*"
2828

@@ -38,19 +38,14 @@ jobs:
3838
strategy:
3939
fail-fast: false
4040
matrix:
41-
os: [ubuntu-latest]
41+
os: [ubuntu-24.04-arm]
4242
python-version: [39, 310, 311, 312, 313]
4343

4444
steps:
4545
- uses: actions/checkout@v4
4646

47-
- name: Setup up QEMU
48-
uses: docker/setup-qemu-action@v3
49-
with:
50-
platforms: arm64
51-
5247
- name: Build wheels
53-
uses: pypa/cibuildwheel@v2.21.2
48+
uses: pypa/cibuildwheel@v2.22.0
5449
env:
5550
CIBW_BUILD: "cp${{ matrix.python-version}}-*"
5651
CIBW_ARCHS: aarch64

pyproject.toml

+1-5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ build-verbosity = 1
2525
linux.before-all = "curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y"
2626
linux.environment = { PATH = "$PATH:$HOME/.cargo/bin" }
2727
macos.before-all = "rustup target add aarch64-apple-darwin x86_64-apple-darwin"
28+
macos.environment = { MACOSX_DEPLOYMENT_TARGET = "10.12" }
2829

2930
skip = [
3031
"*-manylinux_i686",
@@ -39,8 +40,3 @@ test-skip = "*-macosx_arm64"
3940

4041
before-test = "pip install pytest hypothesis"
4142
test-command = "pytest {project}/tests --import-mode=append"
42-
43-
[[tool.cibuildwheel.overrides]]
44-
select = "*linux_aarch64"
45-
test-command = """python -c 'import tiktoken; enc = tiktoken.get_encoding("gpt2"); assert enc.encode("hello world") == [31373, 995]'"""
46-

0 commit comments

Comments
 (0)