10000 change as per suggestion · numpy/numpy@bdd95ed · GitHub
[go: up one dir, main page]

Skip to content

Commit bdd95ed

Browse files
change as per suggestion
1 parent 0839b65 commit bdd95ed

File tree

3 files changed

+76
-108
lines changed

3 files changed

+76
-108
lines changed

.github/workflows/linux.yml

Lines changed: 72 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -78,29 +78,6 @@ jobs:
7878
pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple cython
7979
- uses: ./.github/meson_actions
8080

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-
10481
# TODO pypy: uncomment when pypy3.11 becomes available
10582
#pypy:
10683
#needs: [smoke_test]
@@ -190,31 +167,89 @@ jobs:
190167
PYTHONOPTIMIZE: 2
191168

192169
# Add ARM64-specific full test
193-
full_arm64:
194-
needs: [smoke_test_arm64]
195-
runs-on: ubuntu-22.04-arm
170+
aarch64_test:
171+
if: github.repository == 'numpy/numpy'
172+
runs-on: ubuntu-22.04-arm64
196173
steps:
197-
- uses: actions/checkout@v4
174+
# PR handling
175+
- name: Checkout for PR
176+
if: github.event_name == 'pull_request'
177+
uses: actions/checkout@v4
198178
with:
199179
submodules: recursive
200-
fetch-tags: true
180+
fetch-depth: 0
181+
ref: ${{ github.event.pull_request.head.sha }}
182+
183+
- name: Configure Git for PR
184+
if: github.event_name == 'pull_request'
185+
run: |
186+
git config --global user.email "you@example.com"
187+
git config --global user.name "GitHub Actions Bot"
188+
git fetch origin ${{ github.base_ref }}
189+
git checkout ${{ github.base_ref }}
190+
git merge --no-commit ${{ github.event.pull_request.head.sha }}
191+
git submodule update --init --recursive
192+
193+
# Regular checkout for non-PR builds
194+
- name: Checkout for non-PR
195+
if: github.event_name != 'pull_request'
196+
uses: actions/checkout@v4
197+
with:
198+
submodules: recursive
199+
fetch-depth: 0
200+
201+
# Setup ccache using Cirrus CI approach
202+
- name: Setup ccache directory
203+
run: |
204+
mkdir -p .ccache
205+
206+
- uses: actions/cache@v4
207+
with:
208+
path: .ccache
209+
key: ccache-linux_aarch64-${{ github.sha }}
210+
restore-keys: |
211+
ccache-linux_aarch64-
212+
213+
# Install system dependencies
214+
- name: Install system dependencies
215+
run: |
216+
sudo apt-get update
217+
sudo apt-get install -y --no-install-recommends \
218+
software-properties-common \
219+
gcc g++ gfortran pkg-config ccache \
220+
libopenblas-dev libatlas-base-dev liblapack-dev
221+
222+
sudo /usr/sbin/update-ccache-symlinks
223+
export PATH=/usr/lib/ccache:$PATH
224+
echo "PATH=$PATH" >> $GITHUB_ENV
225+
echo "CCACHE_DIR=${{ github.workspace }}/.ccache" >> $GITHUB_ENV
226+
227+
# Setup Python
201228
- uses: actions/setup-python@v5
202229
with:
203230
python-version: '3.11'
204-
- name: Install build and test dependencies
231+
232+
# Install Python dependencies
233+
- name: Install Python dependencies
205234
run: |
206235
python -m pip install -r requirements/build_requirements.txt
207236
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
237+
238+
# Build
239+
- name: Build
213240
run: |
214-
python -m pip install -e . --no-build-isolation
215-
- name: Run full test suite
241+
spin build -- -Dallow-noblas=true
242+
243+
# Test
244+
- name: Test
216245
run: |
217-
pytest numpy --durations=10 --timeout=600
246+
spin test -j 1
247+
ccache -s
248+
249+
# Meson Log on failure
250+
- name: Meson Log
251+
if: always()
252+
run: cat build/meson-logs/meson-log.txt
218253

219254
benchmark:
220255
needs: [smoke_test]

.github/workflows/linux_blas.yml

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,11 @@ permissions:
5555
jobs:
5656
openblas_arm64:
5757
if: github.repository == 'numpy/numpy'
58-
runs-on: ubuntu-22.04-arm
58+
runs-on: ubuntu-22.04-arm64
5959
strategy:
6060
fail-fast: false
6161
matrix:
6262
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}
6663
- {name: "OpenBLAS 64-bit nightly", use_nightly: true, bits: 64}
6764
name: "Test ARM64 - ${{ matrix.config.name }}"
6865
steps:
@@ -76,36 +73,14 @@ jobs:
7673
- name: Install dependencies
7774
run: |
7875
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
76+
python -m pip install -i https://pypi.anaconda.org/scientific-python-nightly-wheels/simple scipy-openblas64
9277
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-
78+
python -c"import scipy_openblas64 as ob; print(ob.get_pkg_config())" > ./.openblas/scipy-openblas.pc
9979
- name: Build
10080
env:
10181
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
10282
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-
83+
spin build -- -Duse-ilp64=true -Dallow-noblas=false
10984
- name: Test
11085
run: |
11186
pip install pytest pytest-xdist hypothesis typing_extensions pytest-timeout

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