From 94d2a330e6f20f22a2776f249bdca3562433e58f Mon Sep 17 00:00:00 2001 From: Dicot0721 <149964080+Dicot0721@users.noreply.github.com> Date: Tue, 2 Jun 2026 19:33:58 +0800 Subject: [PATCH] ci: Optimize format check workflow - Use 'sparse-checkout' to fetch only the root files and 'vita3k' and 'tools' folder. --- .github/workflows/c-cpp.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/format.yml | 18 +++++++++++++----- 3 files changed, 17 insertions(+), 9 deletions(-) diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index c17316736..8b52263e4 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -3,10 +3,10 @@ name: Build CI on: push: paths-ignore: - - '**/*.md' + - '**.md' pull_request: paths-ignore: - - '**/*.md' + - '**.md' env: BUILD_CONFIG: Release diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9890bf40f..8b9c3e1d6 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,13 +9,13 @@ on: push: branches: [master] paths-ignore: - - '**/*.md' + - '**.md' pull_request: # The branches below must be a subset of the branches above branches: [master] paths-ignore: - - '**/*.md' + - '**.md' schedule: - cron: '0 1 * * 3' diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 49c5c83e8..8a39fb22c 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -2,28 +2,36 @@ name: Format Check on: push: - paths-ignore: - - '**/*.md' + paths: + - .clang-format + - vita3k/** + - tools/** + pull_request: - paths-ignore: - - '**/*.md' + paths: + - .clang-format + - vita3k/** + - tools/** jobs: format-check: name: Format Check (${{ matrix.path }}) runs-on: ubuntu-latest + strategy: fail-fast: false matrix: path: - vita3k - tools + steps: - name: Checkout uses: actions/checkout@v6 + with: + sparse-checkout: ${{ matrix.path }} - name: Format check uses: jidicula/clang-format-action@v4.18.0 with: - clang-format-version: '22' check-path: ${{ matrix.path }}