Skip to content

Commit 19d5b69

Browse files
committed
MAINT: Fix flaky test and update windows.yml action.
- Skip test that needs huge memory on 32-bit architectures - Update windows.yml action from main
1 parent ba1e504 commit 19d5b69

File tree

2 files changed

+20
-25
lines changed

2 files changed

+20
-25
lines changed

.github/workflows/windows.yml

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -23,30 +23,23 @@ jobs:
2323
compiler: ["MSVC", "Clang-cl"]
2424
steps:
2525
- name: Checkout
26-
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
26+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2727
with:
2828
submodules: recursive
2929
fetch-depth: 0
3030

3131
- name: Setup Python
32-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
32+
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
3333
with:
3434
python-version: '3.11'
3535

3636
- name: Install build dependencies from PyPI
3737
run: |
3838
python -m pip install spin Cython
3939
40-
- name: Install OpenBLAS (MacPython build)
40+
- name: Install pkg-config
4141
run: |
42-
# Download and install pre-built OpenBLAS library with 32-bit
43-
# interfaces. Unpack it in the pkg-config hardcoded path
44-
choco install unzip -y
45-
choco install wget -y
4642
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
47-
wget https://anaconda.org/multibuild-wheels-staging/openblas-libs/v0.3.21/download/openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
48-
unzip -d c:\opt openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
49-
echo "PKG_CONFIG_PATH=c:\opt\64\lib\pkgconfig;" >> $env:GITHUB_ENV
5043
5144
- name: Install Clang-cl
5245
if: matrix.compiler == 'Clang-cl'
@@ -55,26 +48,26 @@ jobs:
5548
5649
- name: Install NumPy (MSVC)
5750
if: matrix.compiler == 'MSVC'
51+
env:
52+
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
5853
run: |
59-
spin build -j2 -- --vsenv
54+
python -m pip install scipy-openblas32
55+
spin build --with-scipy-openblas=32 -j2 -- --vsenv
6056
6157
- name: Install NumPy (Clang-cl)
6258
if: matrix.compiler == 'Clang-cl'
59+
env:
60+
PKG_CONFIG_PATH: ${{ github.workspace }}/.openblas
6361
run: |
6462
"[binaries]","c = 'clang-cl'","cpp = 'clang-cl'","ar = 'llvm-lib'","c_ld = 'lld-link'","cpp_ld = 'lld-link'" | Out-File $PWD/clang-cl-build.ini -Encoding ascii
65-
spin build -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
63+
python -m pip install scipy-openblas32
64+
spin build --with-scipy-openblas=32 -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
6665
67-
- name: Copy OpenBLAS DLL, write _distributor_init.py
66+
- name: Meson Log
67+
shell: bash
68+
if: ${{ failure() }}
6869
run: |
69-
# Getting the OpenBLAS DLL to the right place so it loads
70-
$installed_path = "$PWD\build-install\usr\Lib\site-packages"
71-
$numpy_path = "${installed_path}\numpy"
72-
$libs_path = "${installed_path}\numpy.libs"
73-
mkdir ${libs_path}
74-
$ob_path = "C:/opt/64/bin/"
75-
cp $ob_path/*.dll $libs_path
76-
# Write _distributor_init.py to load .libs DLLs.
77-
python -c "from tools import openblas_support; openblas_support.make_init(r'${numpy_path}')"
70+
cat build/meson-logs/meson-log.txt
7871
7972
- name: Install test dependencies
8073
run: |
@@ -85,19 +78,19 @@ jobs:
8578
run: |
8679
spin test
8780
88-
msvc_32bit_python_openblas:
81+
msvc_32bit_python_no_openblas:
8982
name: MSVC, 32-bit Python, no BLAS
9083
runs-on: windows-2019
9184
if: "github.repository == 'numpy/numpy'"
9285
steps:
9386
- name: Checkout
94-
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
87+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
9588
with:
9689
submodules: recursive
9790
fetch-depth: 0
9891

9992
- name: Setup Python (32-bit)
100-
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
93+
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
10194
with:
10295
python-version: '3.10'
10396
architecture: 'x86'

numpy/core/tests/test_ufunc.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1617,6 +1617,8 @@ def check_identityless_reduction(self, a):
16171617
assert_equal(np.minimum.reduce(a, axis=()), a)
16181618

16191619
@requires_memory(6 * 1024**3)
1620+
@pytest.mark.skipif(sys.maxsize < 2**32,
1621+
reason="test array too large for 32bit platform")
16201622
def test_identityless_reduction_huge_array(self):
16211623
# Regression test for gh-20921 (copying identity incorrectly failed)
16221624
arr = np.zeros((2, 2**31), 'uint8')

0 commit comments

Comments
 (0)