From dbe7e60edc931ac8cef7a76690ea3f7129984bce Mon Sep 17 00:00:00 2001 From: Spartan322 Date: Tue, 7 Jul 2026 15:46:20 -0400 Subject: [PATCH] Add pre-commit changed-files set Prevents applying pre-commit CI check towards submodules --- .github/changed-files.yml | 9 ++++++++- .github/workflows/builds.yml | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/changed-files.yml b/.github/changed-files.yml index a532b7f..f8fb543 100644 --- a/.github/changed-files.yml +++ b/.github/changed-files.yml @@ -1,6 +1,6 @@ # We lack a convenient means of gathering *all* the changes when specializations are passed, so # a catch-all variable is the easiest workaround. -everything: +everything: &everything - "**" # Determines if build actions should occur after static checks are ran. Broadly speaking, these @@ -14,6 +14,13 @@ sources: - deps/** - tests/** +pre-commit: + - *everything + - '!scripts/**' + - '!deps/*/**' + - '!tests/deps/*/**' + - '!tests/benchmarks/deps/*/**' + # Determines which files are appropriate for running clangd-tidy checks on. clangd: - "**/*.{hpp,cpp,inc}" \ No newline at end of file diff --git a/.github/workflows/builds.yml b/.github/workflows/builds.yml index 5698aca..5e5d1df 100644 --- a/.github/workflows/builds.yml +++ b/.github/workflows/builds.yml @@ -47,7 +47,7 @@ jobs: - name: Style checks via prek uses: j178/prek-action@bdca6f102f98e2b4c7029491a53dfd366469e33d # v2.0.4 env: - CHANGED_FILES: '"${{ steps.changed-files.outputs.everything_all_changed_files }}"' # Wrap with quotes to bookend internal quote separators + CHANGED_FILES: '"${{ steps.changed-files.outputs.pre-commit_all_changed_files }}"' # Wrap with quotes to bookend internal quote separators with: extra-args: --files ${{ env.CHANGED_FILES }}