diff --git a/.github/workflows/cmake-lint.yml b/.github/workflows/cmake-lint.yml index 714b438..961b145 100644 --- a/.github/workflows/cmake-lint.yml +++ b/.github/workflows/cmake-lint.yml @@ -1,9 +1,14 @@ name: "CMake Lint" on: - push: - paths-ignore: - - 'README.md' + pull_request: + branches: [ main ] + paths: + - '**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: lint: diff --git a/.github/workflows/cpp-build.yml b/.github/workflows/cpp-build.yml index c4d349a..3836df5 100644 --- a/.github/workflows/cpp-build.yml +++ b/.github/workflows/cpp-build.yml @@ -1,9 +1,18 @@ name: "C++ Build" on: - push: - paths-ignore: - - 'README.md' + pull_request: + branches: [ main ] + paths: + - 'src/**' + - 'include/**' + - 'test/**' + - 'examples/**' + - 'CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: build: diff --git a/.github/workflows/cpp-lint.yml b/.github/workflows/cpp-lint.yml index ec6e0f9..8f4b63b 100644 --- a/.github/workflows/cpp-lint.yml +++ b/.github/workflows/cpp-lint.yml @@ -1,9 +1,19 @@ name: "C++ Lint" on: - push: - paths-ignore: - - 'README.md' + pull_request: + branches: [ main ] + paths: + - 'src/**/*.cpp' + - 'include/**/*.h' + - 'test/**/*.cpp' + - 'test/**/*.h' + - 'examples/**/*.cpp' + - 'examples/**/*.h' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: lint: diff --git a/.github/workflows/cpp-unittest.yml b/.github/workflows/cpp-unittest.yml index cb1e55e..93acca3 100644 --- a/.github/workflows/cpp-unittest.yml +++ b/.github/workflows/cpp-unittest.yml @@ -1,9 +1,18 @@ name: "C++ Unittests" on: - push: - paths-ignore: - - 'README.md' + pull_request: + branches: [ main ] + paths: + - 'src/**' + - 'include/**' + - 'test/**' + - 'CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: unittest: diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index c3a0ba7..5d50283 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -1,9 +1,16 @@ name: "C++/CMake Format" on: - push: - paths-ignore: - - 'README.md' + pull_request: + branches: [ main ] + paths: + - '**/*.cpp' + - '**/*.h' + - '**/CMakeLists.txt' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true jobs: format: