forked from scipy/scipy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI: Add CI job to check if Python.h is included first.
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Linux Meson tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- maintenance/** | ||
pull_request: | ||
branches: | ||
- main | ||
- maintenance/** | ||
|
||
permissions: | ||
contents: read # to fetch code (actions/checkout) | ||
|
||
env: | ||
CCACHE_DIR: "${{ github.workspace }}/.ccache" | ||
INSTALLDIR: "build-install" | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
check-python-h-first: | ||
name: Check Python.h before other headers | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4.1.1 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Setup Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' | ||
cache-dependency-path: 'environment.yml' | ||
|
||
- name: Check that Python.h is first in any file including it. | ||
shell: bash | ||
run: | ||
python tools/check_python_h_first.py $(find scipy -type f -iname \*.[ch] -o -name \*.[ch]pp -o -name \*.cc -o -name \*.hh -print) |