diff --git a/.github/workflows/cpp-lint.yml b/.github/workflows/cpp-lint.yml new file mode 100644 index 000000000..620287485 --- /dev/null +++ b/.github/workflows/cpp-lint.yml @@ -0,0 +1,30 @@ +name: C++ Lint + +on: + workflow_call: + push: + paths: + - '**/*.cpp' + - '**/*.hpp' + - '**/*.c' + - '**/*.h' + - '.clang-format' + - '.github/workflows/cpp-lint.yml' + pull_request: + paths: + - '**/*.cpp' + - '**/*.hpp' + - '**/*.c' + - '**/*.h' + - '.clang-format' + - '.github/workflows/cpp-lint.yml' + +jobs: + clang-format: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: DoozyX/clang-format-lint-action@v0.20 + with: + source: '.' + clangFormatVersion: 20 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 509a88fa0..0617a84cd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -16,19 +16,24 @@ concurrency: !startsWith(github.ref, 'refs/heads/gh-readonly-queue') }} jobs: - lint: - uses: ./.github/workflows/lint.yml + cpp-lint: + uses: ./.github/workflows/cpp-lint.yml + python-lint: + uses: ./.github/workflows/python-lint.yml ubuntu: needs: - - lint + - cpp-lint + - python-lint uses: ./.github/workflows/ubuntu.yml mac: needs: - - lint + - cpp-lint + - python-lint uses: ./.github/workflows/mac.yml windows: needs: - - lint + - cpp-lint + - python-lint uses: ./.github/workflows/windows.yml perf: needs: diff --git a/.github/workflows/lint.yml b/.github/workflows/python-lint.yml similarity index 58% rename from .github/workflows/lint.yml rename to .github/workflows/python-lint.yml index 90b223b56..1411b2c9e 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/python-lint.yml @@ -1,38 +1,21 @@ +name: Python Lint + on: workflow_call: push: paths: - - '**/*.cpp' - - '**/*.hpp' - - '**/*.c' - - '**/*.h' - '**/*.py' - '**/*.sh' - - '.clang-format' - 'setup.cfg' - - '.github/workflows/lint.yml' + - '.github/workflows/python-lint.yml' pull_request: paths: - - '**/*.cpp' - - '**/*.hpp' - - '**/*.c' - - '**/*.h' - '**/*.py' - '**/*.sh' - - '.clang-format' - 'setup.cfg' - - '.github/workflows/lint.yml' + - '.github/workflows/python-lint.yml' jobs: - clang-format: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: DoozyX/clang-format-lint-action@v0.20 - with: - source: '.' - clangFormatVersion: 20 - python-lint: runs-on: ubuntu-24.04 steps: