8000 ENH: Add ARM64 (aarch64) CI testing (#28263) · numpy/numpy@eedb1f8 · GitHub
[go: up one dir, main page]

Skip to content

Commit eedb1f8

Browse files
ENH: Add ARM64 (aarch64) CI testing (#28263)
1 parent a651643 commit eedb1f8

File tree

3 files changed

+70
-42
lines changed

3 files changed

+70
-42
lines changed

.github/workflows/linux.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,42 @@ jobs:
164164
# TODO: gcov
165165
env:
166166
PYTHONOPTIMIZE: 2
167+
168+
169+
aarch64_test:
170+
needs: [smoke_test]
171+
if: github.repository == 'numpy/numpy'
172+
runs-on: ubuntu-22.04-arm
173+
steps:
174+
- name: Checkout for PR
175+
if: github.event_name == 'pull_request'
176+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
177+
with:
178+
submodules: recursive
179+
fetch-tags: true
180+
persist-credentials: false
181+
182+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
183+
with:
184+
python-version: '3.11'
185+
186+
- name: Install Python dependencies
187+
run: |
188+
python -m pip install -r requirements/build_requirements.txt
189+
python -m pip install -r requirements/test_requirements.txt
190+
python -m pip install -r requirements/ci32_requirements.txt
191+
mkdir -p ./.openblas
192+
python -c"import scipy_openblas32 as ob32; print(ob32.get_pkg_config())" > ./.openblas/scipy-openblas.pc
193+
194+
- name: Build
195+
env:
196+
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
197+
run: |
198+
spin build
199+
200+
- name: Test
201+
run: |
202+
spin test -j2 -m full -- --timeout=600 --durations=10
167203
168204
benchmark:
169205
needs: [smoke_test]

.github/workflows/linux_simd.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,40 @@ jobs:
107107
- uses: ./.github/meson_actions
108108
name: Build/Test against gcc-10
109109

110+
arm64_simd:
111+
if: github.repository == 'numpy/numpy'
112+
needs: [baseline_only]
113+
runs-on: ubuntu-22.04-arm
114+
strategy:
115+
fail-fast: false
116+
matrix:
117+
config:
118+
- name: "baseline only"
119+
args: "-Dallow-noblas=true -Dcpu-dispatch=none"
120+
- name: "with ASIMD"
121+
args: "-Dallow-noblas=true -Dcpu-baseline=asimd"
122+
- name: "native"
123+
args: "-Dallow-noblas=true -Dcpu-baseline=native -Dcpu-dispatch=none"
124+
name: "ARM64 SIMD - ${{ matrix.config.name }}"
125+
steps:
126+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
127+
with:
128+
submodules: recursive
129+
fetch-tags: true
130+
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
131+
with:
132+
python-version: '3.11'
133+
- name: Install dependencies
134+
run: |
135+
python -m pip install -r requirements/build_requirements.txt
136+
python -m pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout
137+
- name: Build
138+
run: |
139+
spin build -- ${{ matrix.config.args }}
140+
- name: Test
141+
run: |
142+
spin test -- --timeout=600 --durations=10
143+
110144
specialize:
111145
needs: [baseline_only]
112146
runs-on: ubuntu-latest

tools/ci/cirrus_arm.yml

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -21,48 +21,6 @@ modified_clone: &MODIFIED_CLONE
2121
fi
2222
2323
24-
linux_aarch64_test_task:
25-
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
26-
compute_engine_instance:
27-
image_project: cirrus-images
28-
image: family/docker-builder-arm64
29-
architecture: arm64
30-
platform: linux
31-
cpu: 1
32-
memory: 4G
33-
34-
<<: *MODIFIED_CLONE
35-
36-
ccache_cache:
37-
folder: .ccache
38-
populate_script:
39-
- mkdir -p .ccache
40-
fingerprint_key: ccache-linux_aarch64
41-
42-
prepare_env_script: |
43-
apt-get update
44-
apt-get install -y --no-install-recommends software-properties-common gcc g++ gfortran pkg-config ccache
45-
apt-get install -y --no-install-recommends python3.11 python3.11-venv libopenblas-dev libatlas-base-dev liblapack-dev
46-
47-
# python3.11 -m ensurepip --default-pip --user
48-
ln -s $(which python3.11) python
49-
50-
# put ccache and python on PATH
51-
export PATH=/usr/lib/ccache:$PWD:$PATH
52-
echo "PATH=$PATH" >> $CIRRUS_ENV
53-
echo "CCACHE_DIR=$PWD/.ccache" >> $CIRRUS_ENV
54-
55-
pip install -r requirements/build_requirements.txt
56-
pip install -r requirements/test_requirements.txt
57-
58-
build_script: |
59-
spin build -- -Dallow-noblas=true
60-
61-
test_script: |
62-
spin test -j 1
63-
ccache -s
64-
65-
6624
freebsd_test_task:
6725
use_compute_credits: $CIRRUS_USER_COLLABORATOR == 'true'
6826
compute_engine_instance:

0 commit comments

Comments
 (0)
0