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

Add a cmake formatting tool in the CI #670

Merged
merged 3 commits into from
Oct 30, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
19 changes: 19 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@ jobs:
if: always()
uses: fsfe/reuse-action@v4

cmake-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install python3 virtual environments
run: |
sudo apt-get update
sudo apt-get --yes install python3-pip python3-venv
- name: Install gersemi
run: |
python3 -m venv ./gersemi
. ./gersemi/bin/activate
python3 -m pip install gersemi
- name: Run gersemi
run: |
. ./gersemi/bin/activate
gersemi --line-length 100 --indent 4 --check cmake/DDCVendorConfiguration.cmake
find CMakeLists.txt tests/ examples/ benchmarks/ -name 'CMakeLists.txt' -exec gersemi --definitions $PWD/cmake --line-length 100 --indent 4 --check '{}' '+'

id_repo:
runs-on: ubuntu-latest
steps:
Expand Down
Loading