Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI trigger and concurrency #8

Merged
merged 3 commits into from
Mar 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/cmake-lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,23 @@
name: "CMake Lint"

on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- '**/CMakeLists.txt'
- '.github/workflows/cmake-lint.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/cpp-build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
name: "C++ Build"

on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'include/**'
- 'test/**'
- 'examples/**'
- 'CMakeLists.txt'
- '.github/workflows/cpp-build.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down
19 changes: 19 additions & 0 deletions .github/workflows/cpp-lint.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,28 @@
name: "C++ Lint"

on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- 'src/**/*.cpp'
- 'include/**/*.h'
- 'test/**/*.cpp'
- 'test/**/*.h'
- 'examples/**/*.cpp'
- 'examples/**/*.h'
- '.github/workflows/cpp-lint.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/cpp-unittest.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
name: "C++ Unittests"

on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- 'src/**'
- 'include/**'
- 'test/**'
- 'CMakeLists.txt'
- '.github/workflows/cpp-unittest.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true


jobs:
unittest:
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,25 @@
name: "C++/CMake Format"

on:
# always run on main branch
push:
branches: [ main ]
paths-ignore:
- 'README.md'
- 'CONTRIBUTING.md'
- 'LICENSE'
# run on PR to main branch if relevant files changed
pull_request:
branches: [ main ]
paths:
- '**/*.cpp'
- '**/*.h'
- '**/CMakeLists.txt'
- '.github/workflows/format.yml'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
format:
Expand Down
Loading