mirror of
https://github.com/numpy/numpy.git
synced 2026-10-28 16:34:42 +08:00
180 lines
5.9 KiB
YAML
180 lines
5.9 KiB
YAML
name: Windows tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- maintenance/**
|
|
paths-ignore:
|
|
- '**.pyi'
|
|
- '**.md'
|
|
- '**.rst'
|
|
- 'tools/stubtest/**'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
clangcl_python64bit_openblas32:
|
|
name: Clang-cl, x86-64, fast, openblas32
|
|
runs-on: windows-2022
|
|
# To enable this job on a fork, comment out:
|
|
if: github.repository == 'numpy/numpy'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
persist-credentials: false
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: "3.15t"
|
|
|
|
- name: Install build dependencies from PyPI
|
|
run: |
|
|
pip install --group dev-cli
|
|
|
|
- name: Set PKG_CONFIG_PATH
|
|
run: |
|
|
echo "PKG_CONFIG_PATH=${{ github.workspace }}/.openblas" >> $env:GITHUB_ENV
|
|
|
|
- name: Install NumPy (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
|
|
pip install --group openblas32
|
|
spin build --with-scipy-openblas=32 -j2 -- --vsenv --native-file=$PWD/clang-cl-build.ini
|
|
|
|
- name: Meson Log
|
|
shell: bash
|
|
if: ${{ failure() }}
|
|
run: |
|
|
cat build/meson-logs/meson-log.txt
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
python -m pip install --group test
|
|
|
|
- name: Run test suite
|
|
run: |
|
|
spin test -- --timeout=600 --durations=10
|
|
|
|
|
|
#=======================================================================================
|
|
msvc_python_x86_arm64_no_openblas:
|
|
name: MSVC, ${{ matrix.os }} ${{ matrix.architecture }}, full, no BLAS, ${{ matrix.python_version }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- os: windows-2022
|
|
architecture: x86
|
|
python_version: '3.15t'
|
|
- os: windows-11-arm
|
|
architecture: arm64
|
|
python_version: '3.12'
|
|
# To enable this job on a fork, comment out:
|
|
if: github.repository == 'numpy/numpy'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
persist-credentials: false
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: ${{ matrix.python_version }}
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- name: Setup MSVC
|
|
# bus1/cabuild has no tags; `v1` is a branch, so pinning to its tip would make
|
|
# this drift (and redden CI) every time upstream pushes. Dependabot is told to
|
|
# ignore this action for the same reason - if it ever needs a change, vendor it
|
|
# or work on resolving meson#11435 so we can do this with `--vsenv=x86`.
|
|
uses: bus1/cabuild/action/msdevshell@e22aba57d6e74891d059d66501b6b5aed8123c4d # v1 # zizmor: ignore[ref-version-mismatch]
|
|
with:
|
|
architecture: ${{ matrix.architecture }}
|
|
|
|
- name: Build and install
|
|
run: |
|
|
python -m pip install . -v -Ccompile-args="-j2" -Csetup-args="-Dallow-noblas=true" 2>&1 | tee build.log
|
|
|
|
- name: Check warnings
|
|
uses: ./.github/check-warnings
|
|
with:
|
|
log-file: ./build.log
|
|
allowlist: ./.github/check-warnings/msvc-allowed-warnings.txt
|
|
warning-regex: "warning C|Command line warning"
|
|
|
|
- name: Install test dependencies
|
|
run: |
|
|
python -m pip install --group test-extending
|
|
|
|
- name: Run test suite (full)
|
|
run: |
|
|
cd tools
|
|
python -m pytest --pyargs numpy -n auto --timeout=600 --durations=10
|
|
|
|
#=======================================================================================
|
|
msvc_python64bit_openblas:
|
|
name: MSVC, x86_64, ${{ matrix.TEST_MODE }}, openblas${{ matrix.BLAS }}
|
|
runs-on: windows-2022
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- BLAS: 64
|
|
TEST_MODE: full
|
|
pyver: '3.15'
|
|
- BLAS: 32
|
|
TEST_MODE: fast
|
|
pyver: '3.12'
|
|
|
|
# To enable this job on a fork, comment out:
|
|
if: github.repository == 'numpy/numpy'
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
submodules: recursive
|
|
fetch-tags: true
|
|
persist-credentials: false
|
|
|
|
- name: Setup Python
|
|
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
|
|
with:
|
|
python-version: ${{ matrix.pyver }}
|
|
|
|
- name: Dependencies
|
|
run: |
|
|
python -m pip install --group test
|
|
python -m pip install --group dev-cli
|
|
|
|
- name: Build and install
|
|
run: |
|
|
pip install --group openblas${{ matrix.BLAS }}
|
|
spin config-openblas --with-scipy-openblas=${{ matrix.BLAS }}
|
|
$env:PKG_CONFIG_PATH="$pwd/.openblas"
|
|
python -m pip install --no-build-isolation . -v -Csetup-args="--vsenv" -Csetup-args="-Dallow-noblas=false"
|
|
|
|
- name: Run test suite ${{ matrix.TEST_MODE }}
|
|
run: |
|
|
cd tools
|
|
# Get a gfortran onto the path for f2py tests
|
|
$env:PATH = "c:\\rtools45\\x86_64-w64-mingw32.static.posix\\bin;$env:PATH"
|
|
If ( "${{ matrix.TEST_MODE }}" -eq "full" ) {
|
|
python -m pytest --pyargs numpy -rsx -n2 --durations=10
|
|
} else {
|
|
python -m pytest --pyargs numpy -m "not slow" -n2 --timeout=600 --durations=10 -rsx
|
|
}
|