Deploy interactive docs to GitHub Pages #27
Workflow file for this run
This file contains 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
name: Run MyPy | |
# Mypy is too slow to run as part of regular CI. The purpose of the jobs in | |
# this file is to cover running Mypy across: | |
# | |
# - OSes: Linux, Windows and macOS | |
# - Python versions: lowest/highest supported versions, and an intermediate one | |
# | |
# The build matrix aims for sparse coverage across those two dimensions. | |
# Use of BLAS/LAPACK and SIMD is disabled on purpose, because those things | |
# don't matter for static typing and this speeds up the builds. | |
# | |
# This is a separate job file so it's easy to trigger by hand. | |
on: | |
pull_request: | |
branches: | |
- main | |
- maintenance/** | |
paths-ignore: | |
- 'benchmarks/' | |
- '.circlecl/' | |
- 'docs/' | |
- 'meson_cpu/' | |
- 'tools/' | |
workflow_dispatch: | |
defaults: | |
run: | |
shell: bash | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
jobs: | |
mypy: | |
# To enable this workflow on a fork, comment out: | |
if: github.repository == 'numpy/numpy' | |
name: "MyPy" | |
runs-on: ${{ matrix.os_python[0] }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os_python: | |
- [ubuntu-latest, '3.12'] | |
- [windows-latest, '3.11'] | |
- [macos-latest, '3.11'] | |
steps: | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
fetch-tags: true | |
persist-credentials: false | |
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: ${{ matrix.os_python[1] }} | |
- name: Install dependencies | |
run: | | |
pip install -r requirements/build_requirements.txt | |
# orjson makes mypy faster but the default requirements.txt | |
# can't install it because orjson doesn't support 32 bit Linux | |
pip install orjson | |
pip install -r requirements/test_requirements.txt | |
- name: Build | |
run: | | |
spin build -j2 -- -Dallow-noblas=true -Ddisable-optimization=true --vsenv | |
- name: Run Mypy | |
run: | | |
spin mypy |