Skip to content

Commit

Permalink
Workflow handling (#760)
Browse files Browse the repository at this point in the history
# Workflow handling

In the interests of green computing, development efficiency and avoiding
unnecessary CI runs, this PR sets up paths for workflow handling, so
that the linters are only run if the source code or build code change
and the test suite is only run if the test suite, build system, or
config files change.

The PR also fixes a copy-paste error in the linting workflow (introduced
in #759).
  • Loading branch information
jwallwork23 authored Dec 13, 2024
2 parents 0bb8629 + 470d3bd commit d6e732a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
paths:
- '.github/workflows/linting.yml'
- '**.cpp'
- '**.hpp'
- '**CMakeLists.txt'

jobs:
clang-format:
Expand All @@ -26,7 +31,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: clang-format
- name: cmake-format
run: |
pip install cmakelang
cmake-lint $(find . -name CMakeLists.txt) -c .cmake-lint-config.py
Expand Down
10 changes: 10 additions & 0 deletions .github/workflows/test_suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ on:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]
paths:
- '.github/workflows/test_suite.yml'
- '**.cdl'
- '**.cfg'
- '**.cpp'
- '**.hpp'
- '**.py'
- '**.sh'
- '**.xml'
- '**CMakeLists.txt'

jobs:

Expand Down

0 comments on commit d6e732a

Please sign in to comment.