diff options
| -rw-r--r-- | .github/workflows/cmake.yml | 2 | ||||
| -rw-r--r-- | CMakeLists.txt | 4 | ||||
| -rw-r--r-- | README.md | 2 |
3 files changed, 6 insertions, 2 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index 79eb86a..61c9c5c 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -21,7 +21,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind + sudo apt-get install octave octave-common octave-signal liboctave-dev gnuplot sox p7zip-full python3-numpy valgrind clang-format - name: Create Build Directory shell: bash diff --git a/CMakeLists.txt b/CMakeLists.txt index e322dcb..86d5599 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -308,6 +308,10 @@ if(UNITTEST) include(CTest) enable_testing() + add_test(NAME test_clang_format + COMMAND sh -c "cd ${CMAKE_CURRENT_SOURCE_DIR}; + clang-format --dry-run --Werror src/*.c src/*.h unittest/*.c demo/*.c") + add_test(NAME test_freedv_get_hash COMMAND sh -c "${CMAKE_CURRENT_BINARY_DIR}/unittest/thash") @@ -113,7 +113,7 @@ CTest is used as a test framework, with support from [GNU Octave](https://www.gn 1. Install GNU Octave and libraries on Ubuntu with: ``` - sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind + sudo apt install octave octave-common octave-signal liboctave-dev gnuplot python3-numpy sox valgrind clang-format ``` 1. To build and run the tests: ``` |
