From 26d35a4fe26bcaf1fea544f25b658ba61324bbd3 Mon Sep 17 00:00:00 2001 From: DWesl <22566757+DWesl@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:45:09 -0400 Subject: [PATCH] CI: Move Python.h checker into Lint job. --- .github/workflows/lint.yml | 6 ++++ .github/workflows/python-h-first.yml | 43 ---------------------------- 2 files changed, 6 insertions(+), 43 deletions(-) delete mode 100644 .github/workflows/python-h-first.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 67fb666981b4..608e39f2fe8f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -47,3 +47,9 @@ jobs: python tools/lint.py --diff-against origin/$GITHUB_BASE_REF python tools/unicode-check.py python tools/check_test_name.py + + - name: Check that Python.h is first in any file including it. + shell: bash + run: | + python tools/check_python_h_first.py $(find scipy -name highspy -prune \ + -o -type f \( -iname \*.[ch] -o -name \*.[ch]pp -o -name \*.cc -o -name \*.hh \) -print) diff --git a/.github/workflows/python-h-first.yml b/.github/workflows/python-h-first.yml deleted file mode 100644 index 427189be26a1..000000000000 --- a/.github/workflows/python-h-first.yml +++ /dev/null @@ -1,43 +0,0 @@ -name: Check Python.h include order - -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 -name highspy -prune \ - -o -type f \( -iname \*.[ch] -o -name \*.[ch]pp -o -name \*.cc -o -name \*.hh \) -print)