8000 add aarch64 CI · numpy/numpy@c590d2a · GitHub
[go: up one dir, main page]

Skip to content

Commit c590d2a

Browse files
add aarch64 CI
1 parent cc5851e commit c590d2a

File tree

4 files changed

+181
-2
lines changed

4 files changed

+181
-2
lines changed

.github/workflows/linux.yml

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,31 @@ jobs:
7777
run: |
7878
pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
7979
- uses: ./.github/meson_actions
80-
81-
# TODO pypy: uncomment when pypy3.11 becomes available
80+
81+
# Add ARM64-specific smoke test
82+
smoke_test_arm64:
83+
if: github.repository == 'numpy/numpy'
84+
runs-on: ubuntu-22.04-arm
85+
env:
86+
MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none"
87+
strategy:
88+
matrix:
89+
version: ["3.11", "3.12"]
90+
steps:
91+
- uses: actions/checkout@v4
92+
with:
93+
submodules: recursive
94+
fetch-tags: true
95+
- uses: actions/setup-python@v5
96+
with:
97+
python-version: ${{ matrix.version }}
98+
- name: Install dependencies
99+
run: |
100+
python -m pip install --upgrade pip
101+
python -m pip install -r requirements/build_requirements.txt
102+
- uses: ./.github/meson_actions
103+
104+
# TODO pypy: uncomment when pypy3.11 becomes available
82105
#pypy:
83106
#needs: [smoke_test]
84107
#runs-on: ubuntu-latest
@@ -165,6 +188,33 @@ jobs:
165188
# TODO: gcov
166189
env:
167190
PYTHONOPTIMIZE: 2
191+
192+
# Add ARM64-specific full test
193+
full_arm64:
194+
needs: [smoke_test_arm64]
195+
runs-on: ubuntu-22.04-arm
196+
steps:
197+
- uses: actions/checkout@v4
198+
with:
199+
submodules: recursive
200+
fetch-tags: true
201+
- uses: actions/setup-python@v5
202+
with:
203+
python-version: '3.11'
204+
- name: Install build and test dependencies
205+
run: |
206+
python -m pip install -r requirements/build_requirements.txt
207+
python -m pip install -r requirements/test_requirements.txt
208+
- name: Install OpenBLAS
209+
run: |
210+
sudo apt update
211+
sudo apt install -y gfortran libopenblas-dev
212+
- name: Build and install
213+
run: |
214+
python -m pip install -e . --no-build-isolation
215+
- name: Run full test suite
216+
run: |
217+
pytest numpy --durations=10 --timeout=600
168218
169219
benchmark:
170220
needs: [smoke_test]

.github/workflows/linux_blas.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,64 @@ permissions:
5353
contents: read # to fetch code (actions/checkout)
5454

5555
jobs:
56+
openblas_arm64:
57+
if: github.repository == 'numpy/numpy'
58+
runs-on: ubuntu-22.04-arm
59+
strategy:
60+
fail-fast: false
61+
matrix:
62+
config:
63+
- {name: "OpenBLAS 32-bit stable", use_nightly: false, bits: 32}
64+
- {name: "OpenBLAS 32-bit nightly", use_nightly: true, bits: 32}
65+
- {name: "OpenBLAS 64-bit stable", use_nightly: false, bits: 64}
66+
- {name: "OpenBLAS 64-bit nightly", use_nightly: true, bits: 64}
67+
name: "Test ARM64 - ${{ matrix.config.name }}"
68+
steps:
69+
- uses: actions/checkout@v4
70+
with:
71+
submodules: recursive
72+
fetch-tags: true
73+
- uses: actions/setup-python@v5
74+
with:
75+
python-version: '3.11'
76+
- name: Install dependencies
77+
run: |
78+
python -m pip install -r requirements/build_requirements.txt
79+
if [[ "${{ matrix.config.use_nightly }}" == "true" ]]; then
80+
if [[ "${{ matrix.config.bits }}" == "32" ]]; then
81+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas32
82+
else
83+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas64
84+
fi
85+
else
86+
if [[ "${{ matrix.config.bits }}" == "32" ]]; then
87+
python -m pip install -r requirements/ci32_requirements.txt
88+
else
89+
python -m pip install -r requirements/ci_requirements.txt
90+
fi
91+
fi
92+
mkdir -p ./.openblas
93+
if [[ "${{ matrix.config.bits }}" == "32" ]]; then
94+
python -c"import scipy_openblas32 as ob; print(ob.get_pkg_config())" > ./.openblas/scipy-openblas.pc
95+
else
96+
python -c"import scipy_openblas64 as ob; print(ob.get_pkg_config())" > ./.openblas/scipy-openblas.pc
97+
fi
98+
99+
- name: Build
100+
env:
101+
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
102+
run: |
103+
if [[ "${{ matrix.config.bits }}" == "64" ]]; then
104+
spin build -- -Duse-ilp64=true -Dallow-noblas=false
105+
else
106+
spin build -- -Dallow-noblas=false
107+
fi
108+
109+
- name: Test
110+
run: |
111+
pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout
112+
spin test -- --timeout=600 --durations=10
113+
56114
openblas32_stable_nightly:
57115
# To enable this workflow on a fork, comment out:
58116
if: github.repository == 'numpy/numpy'

.github/workflows/linux_compiler_sanitizers.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,39 @@ jobs:
5757
UBSAN_OPTIONS=halt_on_error=0 \
5858
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-x86_64.so) \
5959
python -m spin test -- -v -s --timeout=600 --durations=10
60+
61+
# Add ARM64 sanitizer job
62+
clang_sanitizers_arm64:
63+
if: github.repository == 'numpy/numpy'
64+
runs-on: ubuntu-22.04-arm
65+
steps:
66+
- uses: actions/checkout@v4
67+
with:
68+
submodules: recursive
69+
fetch-tags: true
70+
- uses: actions/setup-python@v5
71+
with:
72+
python-version: ${{ env.PYTHON_VERSION }}
73+
- name: Install dependencies
74+
run: |
75+
sudo apt update
76+
sudo apt install -y llvm libstdc++-12-dev
77+
python -m pip install -r requirements/build_requirements.txt
78+
python -m pip install -r requirements/ci_requirements.txt
79+
- name: Build
80+
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
81+
env:
82+
TERM: xterm-256color
83+
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
84+
run: |
85+
CC=clang CXX=clang++ spin build --with-scipy-openblas=32 -- -Db_sanitize=address,undefined
86+
- name: Test
87+
shell: 'script -q -e -c "bash --noprofile --norc -eo pipefail {0}"'
88+
env:
89+
TERM: xterm-256color
90+
run: |
91+
pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout
92+
ASAN_OPTIONS=detect_leaks=0:symbolize=1:strict_init_order=true:allocator_may_return_null=1:halt_on_error=1 \
93+
UBSAN_OPTIONS=halt_on_error=0 \
94+
LD_PRELOAD=$(clang --print-file-name=libclang_rt.asan-aarch64.so) \
95+
python -m spin test -- -v -s --timeout=600 --durations=10

.github/workflows/linux_simd.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,41 @@ jobs:
106106
107107
- uses: ./.github/meson_actions
108108
name: Build/Test against gcc-10
109+
# Add ARM64-specific SIMD tests
110+
arm64_simd:
111+
if: github.repository == 'numpy/numpy'
112+
runs-on: ubuntu-22.04-arm
113+
strategy:
114+
fail-fast: false
115+
matrix:
116+
config:
117+
- name: "baseline only"
118+
args: "-Dallow-noblas=true -Dcpu-dispatch=none"
119+
- name: "with NEON"
120+
args: "-Dallow-noblas=true -Dcpu-baseline=neon"
121+
- name: "with ASIMD"
122+
args: "-Dallow-noblas=true -Dcpu-baseline=asimd"
123+
- name: "native"
124+
args: "-Dallow-noblas=true -Dcpu-baseline=native -Dcpu-dispatch=none"
125+
name: "ARM64 SIMD - ${{ matrix.config.name }}"
126+
steps:
127+
- uses: actions/checkout@v4
128+
with:
129+
submodules: recursive
130+
fetch-tags: true
131+
- uses: actions/setup-python@v5
132+
with:
133+
python-version: '3.11'
134+
- name: Install dependencies
135+
run: |
136+
python -m pip install -r requirements/build_requirements.txt
137+
python -m pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout
138+
- name: Build
139+
run: |
140+
spin build -- ${{ matrix.config.args }}
141+
- name: Test
142+
run: |
143+
spin test -- --timeout=600 --durations=10
109144
110145
specialize:
111146
needs: [baseline_only]

0 commit comments

Comments
 (0)
0