Skip to content

Commit dbaf822

Browse files
authored
Create osx.yml
1 parent 16d1624 commit dbaf822

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed

.github/workflows/osx.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Build ARM64 Python on macOS
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: macos-latest
8+
steps:
9+
- name: Set up Rosetta 2
10+
run: |
11+
softwareupdate --install-rosetta --agree-to-license || true
12+
13+
- name: Download Python 3.11.8 Source
14+
run: |
15+
curl -O https://www.python.org/ftp/python/3.11.8/Python-3.11.8.tgz
16+
tar -xf Python-3.11.8.tgz
17+
cd Python-3.11.8
18+
19+
- name: Build Python 3.11.8 for ARM64
20+
run: |
21+
cd Python-3.11.8
22+
arch -arm64 ./configure --prefix=$HOME/python-arm64 --enable-optimizations
23+
arch -arm64 make -j$(sysctl -n hw.ncpu)
24+
arch -arm64 make install
25+
26+
- name: Verify Build
27+
run: |
28+
$HOME/python-arm64/bin/python3 --version
29+
$HOME/python-arm64/bin/python3 -c "import platform; print(platform.architecture())"

0 commit comments

Comments
 (0)