mirror of
https://github.com/zama-ai/concrete.git
synced 2026-02-08 19:44:57 -05:00
feat(CI): add cmake-format CI job
This commit is contained in:
2
.github/workflows/continuous-integration.yml
vendored
2
.github/workflows/continuous-integration.yml
vendored
@@ -26,6 +26,8 @@ jobs:
|
||||
token: ${{ secrets.GH_TOKEN }}
|
||||
- name: Format with clang-format (Cpp)
|
||||
run: sudo apt install moreutils && .github/workflows/scripts/format_cpp.sh
|
||||
- name: Format with cmake-format (Cmake)
|
||||
run: pip3 install cmakelang && .github/workflows/scripts/format_cmake.sh
|
||||
- name: Format with black (Python)
|
||||
run: |
|
||||
cd compiler
|
||||
|
||||
12
.github/workflows/scripts/format_cmake.sh
vendored
Executable file
12
.github/workflows/scripts/format_cmake.sh
vendored
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e -o pipefail
|
||||
|
||||
cmake-format -i compiler/CMakeLists.txt -c compiler/.cmake-format-config.py
|
||||
|
||||
find ./compiler/{include,lib,src,tests} -type f -name "CMakeLists.txt" | xargs -I % sh -c 'cmake-format -i % -c compiler/.cmake-format-config.py'
|
||||
|
||||
# show changes if any
|
||||
git --no-pager diff
|
||||
# fail if there is a diff, success otherwise
|
||||
git diff | ifne exit 1
|
||||
Reference in New Issue
Block a user