Skip to content

Commit

Permalink
Merge pull request #25107 from charris/backport-24520
Browse files Browse the repository at this point in the history
CI: remove obsolete jobs, and move macOS and conda Azure jobs to Meson and GHA
  • Loading branch information
charris committed Nov 10, 2023
2 parents 86c2863 + 967e533 commit 02d47a9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 168 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,3 +206,34 @@ jobs:
cd tools
pytest --pyargs numpy -m "not slow"
custom_checks:
needs: [smoke_test]
runs-on: ubuntu-latest
if: github.event_name != 'push'
steps:
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.11'
- name: Install build and test dependencies from PyPI
run: |
pip install -r build_requirements.txt
pip install -r test_requirements.txt
pip install vulture
- name: Build and install NumPy
run: |
# Install using the fastests way to build (no BLAS, no SIMD)
spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
- name: Check build-internal dependencies
run: |
ninja -C build -t missingdeps
- name: Check installed test and stub files
run: |
python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')
- name: Check for unreachable code paths in Python modules
run: |
# Need the explicit `bash -c` here because `grep` returns exit code 1 for no matches
bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/,vendored-meson/ | grep 'unreachable'"
16 changes: 0 additions & 16 deletions .github/workflows/linux_blas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,22 +36,6 @@ permissions:
contents: read # to fetch code (actions/checkout)

jobs:
openblas64_setuppy:
runs-on: ubuntu-latest
if: "github.repository == 'numpy/numpy'"
env:
DOWNLOAD_OPENBLAS: 1
NPY_USE_BLAS_ILP64: 1
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
submodules: recursive
fetch-depth: 0
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: '3.11'
- uses: ./.github/actions

openblas32_stable_nightly:
if: "github.repository == 'numpy/numpy'"
runs-on: ubuntu-latest
Expand Down
152 changes: 0 additions & 152 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,126 +84,6 @@ stages:
python3 -m pytest --pyargs numpy"
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
- job: macOS
pool:
vmImage: 'macOS-11'
strategy:
maxParallel: 3
matrix:
Python39:
PYTHON_VERSION: '3.9'
USE_OPENBLAS: '1'
Python39-ILP64:
PYTHON_VERSION: '3.9'
NPY_USE_BLAS_ILP64: '1'
USE_OPENBLAS: '1'
steps:
- script: |
git submodule update --init
displayName: 'Fetch submodules'
# the @0 refers to the (major) version of the *task* on Microsoft's
# end, not the order in the build matrix nor anything to do
# with version of Python selected
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
addToPath: true
architecture: 'x64'
- script: |
set -xe
[ -n "$USE_XCODE_10" ] && /bin/bash -c "sudo xcode-select -s /Applications/Xcode_10.app/Contents/Developer"
clang --version
displayName: 'report clang version'
- script: |
if [[ $PLATFORM == "macosx-arm64" ]]; then
PLAT="arm64"
fi
source tools/wheels/gfortran_utils.sh
install_gfortran
displayName: 'install gfortran'
# use the pre-built openblas binary that most closely
# matches our MacOS wheel builds -- currently based
# primarily on file size / name details
- script: |
set -xe
target=$(python tools/openblas_support.py)
ls -lR $target
# manually link to appropriate system paths
cp $target/lib/lib* /usr/local/lib/
cp $target/include/* /usr/local/include/
otool -L /usr/local/lib/libopenblas*
displayName: 'install pre-built openblas'
condition: eq(variables['USE_OPENBLAS'], '1')
- script: python -m pip install --upgrade pip 'setuptools<49.2.0' wheel
displayName: 'Install tools'
- script: |
python -m pip install -r test_requirements.txt
# Don't use doc_requirements.txt since that messes up tests
python -m pip install vulture sphinx==4.3.0 numpydoc==1.4.0 ninja
displayName: 'Install dependencies; some are optional to avoid test skips'
- script: /bin/bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/ | grep 'unreachable'"
displayName: 'Check for unreachable code paths in Python modules'

- script: git submodule update --init
displayName: 'Fetch submodules'

# prefer usage of clang over gcc proper
# to match likely scenario on many user mac machines
- script: python setup.py build -j 4 build_src --verbose-cfg install
displayName: 'Build NumPy'
env:
BLAS: None
LAPACK: None
ATLAS: None
CC: /usr/bin/clang

# wait until after dev build of NumPy to pip
# install matplotlib to avoid pip install of older numpy
- script: python -m pip install matplotlib
displayName: 'Install matplotlib before refguide run'

- script: python runtests.py -g --refguide-check
displayName: 'Run Refguide Check'
condition: eq(variables['USE_OPENBLAS'], '1')

- script: |
echo LIBRARY_PATH ${LIBRARY_PATH}
python runtests.py -n --mode=full -- -rsx --junitxml=junit/test-results.xml
displayName: 'Run Full NumPy Test Suite'
condition: eq(variables['USE_OPENBLAS'], '1')
env:
# gfortran installed above adds -lSystem, so this is needed to find it (gh-22043)
LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
- bash: |
python -m pip install threadpoolctl
python tools/openblas_support.py --check_version
displayName: 'Verify OpenBLAS version'
condition: eq(variables['USE_OPENBLAS'], '1')
# import doesn't work when in numpy src directory , so do a pip dev install of build lib to test
- script: |
#!/bin/bash -v
set +e
python -c "import numpy as np" > test_output.log 2>&1
check_output_code=$?
cat test_output.log
grep "buggy Accelerate backend" test_output.log
check_message=$?
if [ $check_output_code == 1 ] && [ $check_message == 0 ]; then exit 0; else exit 1;fi
displayName: "Check if numpy import fails with accelerate"
condition: eq(variables['USE_OPENBLAS'], '0')
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for Python 3.9 64-bit full Mac OS'


- job: Windows
pool:
vmImage: 'windows-2019'
Expand Down Expand Up @@ -232,35 +112,3 @@ stages:

steps:
- template: azure-steps-windows.yml


- job: Linux_conda
pool:
vmImage: 'ubuntu-20.04'
steps:
- script: |
git submodule update --init
displayName: 'Fetch submodules'
- script: |
# create and activate conda environment
conda env create -f environment.yml
displayName: 'Create conda environment.'
- script: |
# >>> conda initialize >>>
# !! Contents within this block are 'conda init' !!
# see https://github.com/conda/conda/issues/7980
__conda_setup="$('conda' 'shell.bash' 'hook' 2> /dev/null)"
eval "$__conda_setup"
unset __conda_setup
# <<< conda initialize <<<
conda activate numpy-dev
# Run native baseline Build / Tests
python runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
--debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
displayName: 'Run native baseline Build / Tests in conda.'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
failTaskOnFailedTests: true
testRunTitle: 'Publish test results for conda installation'

0 comments on commit 02d47a9

Please sign in to comment.