Skip to content

Commit 8594de5

Browse files
committed
add mac arm ci automation
1 parent 3cd70bf commit 8594de5

File tree

1 file changed

+93
-0
lines changed

1 file changed

+93
-0
lines changed
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
name: Test macOS ARM
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
push:
7+
branches: [main]
8+
9+
jobs:
10+
test:
11+
name: Test on macOS ARM
12+
runs-on: macos-13-xlarge # ARM64 runner
13+
timeout-minutes: 90
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
python-version: ["3.10", "3.11", "3.12", "3.13"]
18+
19+
steps:
20+
- name: Checkout
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
submodules: true
25+
26+
- name: Set up Python ${{ matrix.python-version }}
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: ${{ matrix.python-version }}
30+
31+
- name: Install Rust
32+
run: |
33+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
34+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
35+
36+
- name: Install Cython
37+
run: |
38+
python3 --version
39+
python3 -m pip install --upgrade pip
40+
python3 -m pip install cython
41+
42+
- name: Install test dependencies
43+
run: python3 ci/pip_install_deps.py
44+
45+
- name: Build
46+
run: python3 proj.py build
47+
48+
- name: Run tests
49+
run: python3 proj.py test 1
50+
env:
51+
JAVA_HOME: ${{ env.JAVA_HOME_17_ARM64 }}
52+
53+
test-numpy-compat:
54+
name: Test numpy compatibility
55+
runs-on: macos-13-xlarge # ARM64 runner
56+
timeout-minutes: 90
57+
strategy:
58+
fail-fast: false
59+
matrix:
60+
include:
61+
- python-version: "3.10"
62+
numpy-version: "1.21.0"
63+
- python-version: "3.10"
64+
numpy-version: "1.24.0"
65+
- python-version: "3.10"
66+
numpy-version: "1.26.0"
67+
- python-version: "3.11"
68+
numpy-version: "2.0.0"
69+
- python-version: "3.11"
70+
numpy-version: "2.2.0"
71+
72+
steps:
73+
- name: Checkout
74+
uses: actions/checkout@v4
75+
with:
76+
fetch-depth: 1
77+
submodules: true
78+
79+
- name: Set up Python ${{ matrix.python-version }}
80+
uses: actions/setup-python@v5
81+
with:
82+
python-version: ${{ matrix.python-version }}
83+
84+
- name: Install Rust
85+
run: |
86+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
87+
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
88+
89+
- name: Install uv
90+
run: python3 -m pip install uv
91+
92+
- name: Run tests with numpy ${{ matrix.numpy-version }}
93+
run: uv run --python python --with 'numpy==${{ matrix.numpy-version }}' test/test.py -v TestBufferProtocolVersionV2

0 commit comments

Comments
 (0)