Skip to content

REL: Prepare for the NumPy 1.26.1 release #736

REL: Prepare for the NumPy 1.26.1 release

REL: Prepare for the NumPy 1.26.1 release #736

Workflow file for this run

name: Windows tests
on:
pull_request:
branches:
- main
- maintenance/**
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
python64bit_openblas:
name: x86-64, LP64 OpenBLAS
runs-on: windows-2019
if: "github.repository == 'numpy/numpy'"
strategy:
matrix:
compiler: ["MSVC", "Clang-cl"]
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: recursive
fetch-depth: 0
- name: Setup Python
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.11'
- name: Install build dependencies from PyPI
run: |
python -m pip install spin Cython
- name: Install OpenBLAS (MacPython build)
run: |
# Download and install pre-built OpenBLAS library with 32-bit
# interfaces. Unpack it in the pkg-config hardcoded path
choco install unzip -y
choco install wget -y
choco install -y --checksum 6004DF17818F5A6DBF19CB335CC92702 pkgconfiglite
wget https://anaconda.org/multibuild-wheels-staging/openblas-libs/v0.3.21/download/openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
unzip -d c:\opt openblas-v0.3.21-win_amd64-gcc_10_3_0.zip
echo "PKG_CONFIG_PATH=c:\opt\64\lib\pkgconfig;" >> $env:GITHUB_ENV
- name: Install Clang-cl
if: matrix.compiler == 'Clang-cl'
run: |
choco install llvm -y --version=16.0.6
- name: Install NumPy (MSVC)
if: matrix.compiler == 'MSVC'
run: |
spin build -j2 -- --vsenv
- name: Install NumPy (Clang-cl)
if: matrix.compiler == 'Clang-cl'
run: |
"[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
spin build -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
- name: Copy OpenBLAS DLL, write _distributor_init.py
run: |
# Getting the OpenBLAS DLL to the right place so it loads
$installed_path = "$PWD\build-install\usr\Lib\site-packages"
$numpy_path = "${installed_path}\numpy"
$libs_path = "${installed_path}\numpy.libs"
mkdir ${libs_path}
$ob_path = "C:/opt/64/bin/"
cp $ob_path/*.dll $libs_path
# Write _distributor_init.py to load .libs DLLs.
python -c "from tools import openblas_support; openblas_support.make_init(r'${numpy_path}')"
- name: Install test dependencies
run: |
python -m pip install -r test_requirements.txt
python -m pip install threadpoolctl
- name: Run test suite
run: |
spin test
msvc_32bit_python_openblas:
name: MSVC, 32-bit Python, no BLAS
runs-on: windows-2019
if: "github.repository == 'numpy/numpy'"
steps:
- name: Checkout
uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0
with:
submodules: recursive
fetch-depth: 0
- name: Setup Python (32-bit)
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.10'
architecture: 'x86'
- name: Setup MSVC (32-bit)
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1
with:
architecture: 'x86'
- name: Build and install
run: |
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true"
- name: Install test dependencies
run: |
python -m pip install -r test_requirements.txt
- name: Run test suite (fast)
run: |
cd tools
python -m pytest --pyargs numpy -m "not slow" -n2