Skip to content

Commit 02d47a9

Browse files
authored
Merge pull request numpy#25107 from charris/backport-24520
CI: remove obsolete jobs, and move macOS and conda Azure jobs to Meson and GHA
2 parents 86c2863 + 967e533 commit 02d47a9

File tree

3 files changed

+31
-168
lines changed

3 files changed

+31
-168
lines changed

.github/workflows/linux.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,3 +206,34 @@ jobs:
206206
cd tools
207207
pytest --pyargs numpy -m "not slow"
208208
209+
custom_checks:
210+
needs: [smoke_test]
211+
runs-on: ubuntu-latest
212+
if: github.event_name != 'push'
213+
steps:
214+
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
215+
with:
216+
submodules: recursive
217+
fetch-depth: 0
218+
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
219+
with:
220+
python-version: '3.11'
221+
- name: Install build and test dependencies from PyPI
222+
run: |
223+
pip install -r build_requirements.txt
224+
pip install -r test_requirements.txt
225+
pip install vulture
226+
- name: Build and install NumPy
227+
run: |
228+
# Install using the fastests way to build (no BLAS, no SIMD)
229+
spin build -j2 -- -Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none
230+
- name: Check build-internal dependencies
231+
run: |
232+
ninja -C build -t missingdeps
233+
- name: Check installed test and stub files
234+
run: |
235+
python tools/check_installed_files.py $(find ./build-install -path '*/site-packages/numpy')
236+
- name: Check for unreachable code paths in Python modules
237+
run: |
238+
# Need the explicit `bash -c` here because `grep` returns exit code 1 for no matches
239+
bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/,vendored-meson/ | grep 'unreachable'"

.github/workflows/linux_blas.yml

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,22 +36,6 @@ permissions:
3636
contents: read # to fetch code (actions/checkout)
3737

3838
jobs:
39-
openblas64_setuppy:
40-
runs-on: ubuntu-latest
41-
if: "github.repository == 'numpy/numpy'"
42-
env:
43-
DOWNLOAD_OPENBLAS: 1
44-
NPY_USE_BLAS_ILP64: 1
45-
steps:
46-
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
47-
with:
48-
submodules: recursive
49-
fetch-depth: 0
50-
- uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
51-
with:
52-
python-version: '3.11'
53-
- uses: ./.github/actions
54-
5539
openblas32_stable_nightly:
5640
if: "github.repository == 'numpy/numpy'"
5741
runs-on: ubuntu-latest

azure-pipelines.yml

Lines changed: 0 additions & 152 deletions
Original file line numberDiff line numberDiff line change
@@ -84,126 +84,6 @@ stages:
8484
python3 -m pytest --pyargs numpy"
8585
displayName: 'Run 32-bit manylinux2014 Docker Build / Tests'
8686
87-
88-
- job: macOS
89-
pool:
90-
vmImage: 'macOS-11'
91-
strategy:
92-
maxParallel: 3
93-
matrix:
94-
Python39:
95-
PYTHON_VERSION: '3.9'
96-
USE_OPENBLAS: '1'
97-
Python39-ILP64:
98-
PYTHON_VERSION: '3.9'
99-
NPY_USE_BLAS_ILP64: '1'
100-
USE_OPENBLAS: '1'
101-
steps:
102-
- script: |
103-
git submodule update --init
104-
displayName: 'Fetch submodules'
105-
# the @0 refers to the (major) version of the *task* on Microsoft's
106-
# end, not the order in the build matrix nor anything to do
107-
# with version of Python selected
108-
- task: UsePythonVersion@0
109-
inputs:
110-
versionSpec: $(PYTHON_VERSION)
111-
addToPath: true
112-
architecture: 'x64'
113-
- script: |
114-
set -xe
115-
[ -n "$USE_XCODE_10" ] && /bin/bash -c "sudo xcode-select -s /Applications/Xcode_10.app/Contents/Developer"
116-
clang --version
117-
displayName: 'report clang version'
118-
119-
- script: |
120-
if [[ $PLATFORM == "macosx-arm64" ]]; then
121-
PLAT="arm64"
122-
fi
123-
source tools/wheels/gfortran_utils.sh
124-
install_gfortran
125-
displayName: 'install gfortran'
126-
# use the pre-built openblas binary that most closely
127-
# matches our MacOS wheel builds -- currently based
128-
# primarily on file size / name details
129-
- script: |
130-
set -xe
131-
target=$(python tools/openblas_support.py)
132-
ls -lR $target
133-
# manually link to appropriate system paths
134-
cp $target/lib/lib* /usr/local/lib/
135-
cp $target/include/* /usr/local/include/
136-
otool -L /usr/local/lib/libopenblas*
137-
displayName: 'install pre-built openblas'
138-
condition: eq(variables['USE_OPENBLAS'], '1')
139-
- script: python -m pip install --upgrade pip 'setuptools<49.2.0' wheel
140-
displayName: 'Install tools'
141-
- script: |
142-
python -m pip install -r test_requirements.txt
143-
# Don't use doc_requirements.txt since that messes up tests
144-
python -m pip install vulture sphinx==4.3.0 numpydoc==1.4.0 ninja
145-
displayName: 'Install dependencies; some are optional to avoid test skips'
146-
- script: /bin/bash -c "! vulture . --min-confidence 100 --exclude doc/,numpy/distutils/ | grep 'unreachable'"
147-
displayName: 'Check for unreachable code paths in Python modules'
148-
149-
- script: git submodule update --init
150-
displayName: 'Fetch submodules'
151-
152-
# prefer usage of clang over gcc proper
153-
# to match likely scenario on many user mac machines
154-
- script: python setup.py build -j 4 build_src --verbose-cfg install
155-
displayName: 'Build NumPy'
156-
env:
157-
BLAS: None
158-
LAPACK: None
159-
ATLAS: None
160-
CC: /usr/bin/clang
161-
162-
# wait until after dev build of NumPy to pip
163-
# install matplotlib to avoid pip install of older numpy
164-
- script: python -m pip install matplotlib
165-
displayName: 'Install matplotlib before refguide run'
166-
167-
- script: python runtests.py -g --refguide-check
168-
displayName: 'Run Refguide Check'
169-
condition: eq(variables['USE_OPENBLAS'], '1')
170-
171-
- script: |
172-
echo LIBRARY_PATH ${LIBRARY_PATH}
173-
python runtests.py -n --mode=full -- -rsx --junitxml=junit/test-results.xml
174-
displayName: 'Run Full NumPy Test Suite'
175-
condition: eq(variables['USE_OPENBLAS'], '1')
176-
env:
177-
# gfortran installed above adds -lSystem, so this is needed to find it (gh-22043)
178-
LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
179-
180-
- bash: |
181-
python -m pip install threadpoolctl
182-
python tools/openblas_support.py --check_version
183-
displayName: 'Verify OpenBLAS version'
184-
condition: eq(variables['USE_OPENBLAS'], '1')
185-
186-
# import doesn't work when in numpy src directory , so do a pip dev install of build lib to test
187-
- script: |
188-
#!/bin/bash -v
189-
set +e
190-
python -c "import numpy as np" > test_output.log 2>&1
191-
check_output_code=$?
192-
cat test_output.log
193-
grep "buggy Accelerate backend" test_output.log
194-
check_message=$?
195-
if [ $check_output_code == 1 ] && [ $check_message == 0 ]; then exit 0; else exit 1;fi
196-
displayName: "Check if numpy import fails with accelerate"
197-
condition: eq(variables['USE_OPENBLAS'], '0')
198-
199-
- task: PublishTestResults@2
200-
condition: succeededOrFailed()
201-
inputs:
202-
testResultsFiles: '**/test-*.xml'
203-
failTaskOnFailedTests: true
204-
testRunTitle: 'Publish test results for Python 3.9 64-bit full Mac OS'
205-
206-
20787
- job: Windows
20888
pool:
20989
vmImage: 'windows-2019'
@@ -232,35 +112,3 @@ stages:
232112

233113
steps:
234114
- template: azure-steps-windows.yml
235-
236-
237-
- job: Linux_conda
238-
pool:
239-
vmImage: 'ubuntu-20.04'
240-
steps:
241-
- script: |
242-
git submodule update --init
243-
displayName: 'Fetch submodules'
244-
- script: |
245-
# create and activate conda environment
246-
conda env create -f environment.yml
247-
displayName: 'Create conda environment.'
248-
- script: |
249-
# >>> conda initialize >>>
250-
# !! Contents within this block are 'conda init' !!
251-
# see https://github.com/conda/conda/issues/7980
252-
__conda_setup="$('conda' 'shell.bash' 'hook' 2> /dev/null)"
253-
eval "$__conda_setup"
254-
unset __conda_setup
255-
# <<< conda initialize <<<
256-
conda activate numpy-dev
257-
# Run native baseline Build / Tests
258-
python runtests.py --show-build-log --cpu-baseline=native --cpu-dispatch=none \
259-
--debug-info --mode=full -- -rsx --junitxml=junit/test-results.xml
260-
displayName: 'Run native baseline Build / Tests in conda.'
261-
- task: PublishTestResults@2
262-
condition: succeededOrFailed()
263-
inputs:
264-
testResultsFiles: '**/test-*.xml'
265-
failTaskOnFailedTests: true
266-
testRunTitle: 'Publish test results for conda installation'

0 commit comments

Comments
 (0)