-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #25 from martelkr/17-add-clang-tidy
add clang-tidy action
- Loading branch information
Showing
6 changed files
with
184 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
Checks: > | ||
readability-*,performance-*,misc-*,concurrency-*,clang-analyzer-*,bug-prone-*,modernize-* | ||
CheckOptions: | ||
- {key: readability-identifier-naming.TypeTemplateParameterIgnoredRegexp, value: expr-type} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: clang-tidy | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
ClangTidy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ssrobins/install-cmake@v1 | ||
|
||
- name: Install Openssl | ||
run: sudo apt-get install -y openssl clang-tidy | ||
|
||
- name: Install gtest | ||
run: sudo apt-get install libgtest-dev && cd /usr/src/gtest && sudo cmake CMakeLists.txt && sudo make && sudo cp lib/*.a /usr/lib && sudo ln -s /usr/lib/libgtest.a /usr/local/lib/libgtest.a && sudo ln -s /usr/lib/libgtest_main.a /usr/local/lib/libgtest_main.a | ||
|
||
- name: Write files | ||
env: | ||
FILE_ONE: ${{ secrets.KRM_MAIN_FILE }} | ||
FILE_TWO: ${{ secrets.KRM_SCND_FILE }} | ||
run: | | ||
echo "${FILE_ONE}" | base64 --decode > ${HOME}/key.pem | | ||
echo "${FILE_TWO}" | base64 --decode > ${HOME}/scert.crt | ||
- name: Run clang-tidy | ||
run: | | ||
cmake -B ${{github.workspace}}/build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON | | ||
clang-tidy -p ${{github.workspace}}/build inc/cppsocket.hpp | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
cmake_minimum_required (VERSION 3.22.1) | ||
cmake_minimum_required (VERSION 3.16) | ||
|
||
set(CMAKE_CXX_STANDARD 20) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.