-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
CI: GitHub Actions CI job restructuring #24493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b259458
CI: move some jobs in `build_test.yml` to Meson
rgommers ed1aac0
CI: merge the two GitHub Actions files for Windows builds
rgommers 1a81895
CI: split `build_test.yml` into three GHA jobs files
rgommers 6d34380
CI: merge `linux_meson.yml` into `linux_blas.yml`
rgommers File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,208 @@ | ||
name: Linux tests | ||
|
||
# This file is meant for testing across supported Python versions, build types | ||
# and interpreters (PyPy, python-dbg, a pre-release Python in summer time), | ||
# build-via-sdist, run benchmarks, measure code coverage, and other build | ||
# options like relaxed-strides. | ||
|
||
on: | ||
push: | ||
branches: | ||
# coverage comparison in the "full" step needs to run on main after merges | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
- maintenance/** | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
env: | ||
DOWNLOAD_OPENBLAS: 1 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
jobs: | ||
lint: | ||
if: github.repository == 'numpy/numpy' && github.event_name != 'push' | ||
runs-on: ubuntu-latest | ||
continue-on-error: true | ||
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.9' | ||
- name: Install linter requirements | ||
run: | ||
python -m pip install -r linter_requirements.txt | ||
- name: Run linter on PR diff | ||
run: | ||
python tools/linter.py --branch origin/${{ github.base_ref }} | ||
|
||
smoke_test: | ||
if: "github.repository == 'numpy/numpy'" | ||
runs-on: ubuntu-latest | ||
env: | ||
MESON_ARGS: "-Dallow-noblas=true -Dcpu-baseline=none -Dcpu-dispatch=none" | ||
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.9' | ||
- uses: ./.github/meson_actions | ||
|
||
basic: | ||
needs: [smoke_test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'push' | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "pypy3.9-v7.3.12"] | ||
env: | ||
EXPECT_CPU_FEATURES: "SSE SSE2 SSE3 SSSE3 SSE41 POPCNT SSE42 AVX F16C FMA3 AVX2 AVX512F AVX512CD AVX512_KNL AVX512_KNM AVX512_SKX AVX512_CLX AVX512_CNL AVX512_ICL" | ||
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: ${{ matrix.python-version }} | ||
- uses: ./.github/actions | ||
|
||
debug: | ||
needs: [smoke_test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'push' | ||
env: | ||
USE_DEBUG: 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 | ||
|
||
full: | ||
# Build a wheel, install it, then run the full test suite with code coverage | ||
needs: [smoke_test] | ||
runs-on: ubuntu-22.04 | ||
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.9' | ||
- name: Install build and test dependencies from PyPI | ||
run: | | ||
pip install -r build_requirements.txt | ||
pip install -r test_requirements.txt | ||
- name: Install gfortran and OpenBLAS (MacPython build) | ||
run: | | ||
set -xe | ||
sudo apt install gfortran libgfortran5 | ||
target=$(python tools/openblas_support.py) | ||
sudo cp -r $target/lib/* /usr/lib | ||
sudo cp $target/include/* /usr/include | ||
- name: Build a wheel | ||
run: | | ||
python -m build --wheel --no-isolation --skip-dependency-check | ||
pip install dist/numpy*.whl | ||
- name: Run full test suite | ||
run: | | ||
cd tools | ||
pytest --pyargs numpy --cov-report=html:build/coverage | ||
# TODO: gcov | ||
|
||
benchmark: | ||
needs: [smoke_test] | ||
runs-on: ubuntu-latest | < 8000 /tr>||
if: github.event_name != 'push' | ||
env: | ||
PYTHONOPTIMIZE: 2 | ||
BLAS: None | ||
LAPACK: None | ||
ATLAS: None | ||
NPY_BLAS_ORDER: mkl,blis,openblas,atlas,blas | ||
NPY_LAPACK_ORDER: MKL,OPENBLAS,ATLAS,LAPACK | ||
USE_ASV: 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.9' | ||
- uses: ./.github/actions | ||
|
||
relaxed_strides_debug: | ||
needs: [smoke_test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'push' | ||
env: | ||
CHECK_BLAS: 1 | ||
NPY_USE_BLAS_ILP64: 1 | ||
NPY_RELAXED_STRIDES_DEBUG: 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 | ||
|
||
sdist: | ||
needs: [smoke_test] | ||
runs-on: ubuntu-latest | ||
if: github.event_name != 'push' | ||
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' | ||
- name: Install gfortran and OpenBLAS (MacPython build) | ||
run: | | ||
set -xe | ||
sudo apt install gfortran libgfortran5 | ||
target=$(python tools/openblas_support.py) | ||
sudo cp -r $target/lib/* /usr/lib | ||
sudo cp $target/include/* /usr/include | ||
- name: Build a wheel via an sdist | ||
run: | | ||
pip install build | ||
< 8000 /td> | python -m build | |
pip install dist/numpy*.whl | ||
- name: Install test dependencies | ||
run: | | ||
pip install -r test_requirements.txt | ||
pip install ninja | ||
- name: Run test suite | ||
run: | | ||
cd tools | ||
pytest --pyargs numpy -m "not slow" | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could get rid of the blank line at some point.