From f3482312849e3d32e6bcaaa12741dccbce97890e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 17:51:48 +0200 Subject: [PATCH 01/17] Create cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 36 +++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cmake-single-platform.yml diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml new file mode 100644 index 0000000..6156062 --- /dev/null +++ b/.github/workflows/cmake-single-platform.yml @@ -0,0 +1,36 @@ +# This starter workflow is for a CMake project running on a single platform. There is a different starter workflow if you need cross-platform coverage. +# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-multi-platform.yml +name: CMake on a single platform + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: Release + +jobs: + build: + # The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac. + # You can convert this to a matrix build if you need cross-platform coverage. + # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: jwidauer/setup-conan@v1 + + - name: Configure CMake + # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. + # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/build/${{env.BUILD_TYPE}}/generators/conan_toolchain.cmake + + - name: Build + # Build your program with the given configuration + run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + + From 5d0e43d5e36f75a6978375c99925be0b09865671 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 17:54:01 +0200 Subject: [PATCH 02/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 6156062..f93c093 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -24,6 +24,9 @@ jobs: - uses: jwidauer/setup-conan@v1 + - name: Conan Install + run: conan install . --build=missing -of=build + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type From f23c6664d03d54eea429b7f9255d8e911185498d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 17:55:23 +0200 Subject: [PATCH 03/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index f93c093..9c24c11 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -24,7 +24,10 @@ jobs: - uses: jwidauer/setup-conan@v1 - - name: Conan Install + - name: Conan detect profile + run: conan profile detect + + - name: Conan install run: conan install . --build=missing -of=build - name: Configure CMake From 39313ff50b9e2ec8b0a934f0d41ee7c3ab458cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 17:58:07 +0200 Subject: [PATCH 04/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 9c24c11..826dbf0 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -29,6 +29,9 @@ jobs: - name: Conan install run: conan install . --build=missing -of=build + + - name: run tree + run: tree - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. From 83f3c0c3d304b857427fa51a6d15209aa3c1470a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 17:59:21 +0200 Subject: [PATCH 05/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 826dbf0..6f8d59f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -36,7 +36,7 @@ jobs: - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/build/${{env.BUILD_TYPE}}/generators/conan_toolchain.cmake + run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/build/build/${{env.BUILD_TYPE}}/generators/conan_toolchain.cmake - name: Build # Build your program with the given configuration From e9e97a760b7eabc933300f48540653e3f6c61228 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:02:12 +0200 Subject: [PATCH 06/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 6f8d59f..8b658c1 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - + - uses: muxee/clang-tidy-action@0.0.1-rc1 - uses: jwidauer/setup-conan@v1 - name: Conan detect profile @@ -29,10 +29,7 @@ jobs: - name: Conan install run: conan install . --build=missing -of=build - - - name: run tree - run: tree - + - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type @@ -42,4 +39,6 @@ jobs: # Build your program with the given configuration run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + - name: clang-tidy check + From 09837d7229d699484c0b32bf88c7fd6be2e83091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:07:09 +0200 Subject: [PATCH 07/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 8b658c1..93bd4c0 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,5 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check + run: run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' From 54060dcf6e3dc6f9e0f0bda360cd413a3eb3ced2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:09:00 +0200 Subject: [PATCH 08/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 93bd4c0..d72dd7c 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' + run: cd ${{github.workspace}}/build && run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' From 1b9cb6f8f2de2eed6115f8a6aab0e3262858efd1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:11:05 +0200 Subject: [PATCH 09/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index d72dd7c..84b1748 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' + run: cd ${{github.workspace}}/build && run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' 2>&1 | tee -a clang-tidy-result From e48bd1ad4878a44bdc1c2afb5d4ee8989e5d98a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:12:52 +0200 Subject: [PATCH 10/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 84b1748..4b4a6f5 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -extra-arg=-Wno-unknown-warning-option -checks='-*,bugprone-string-constructor' 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" 2>&1 | tee -a clang-tidy-result From 9e64641ccecc0c8df69629261b88e6befa211ad5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:19:36 +0200 Subject: [PATCH 11/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 4b4a6f5..6a11fa6 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" --header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result From 0698059c6656e98a2f1b9070cfe31b12fa68bf0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:21:40 +0200 Subject: [PATCH 12/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 6a11fa6..32512da 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" --header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result From 16b308a0e6ed1e5861c05dd8e314cdc4d1e10eda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:30:22 +0200 Subject: [PATCH 13/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 32512da..0c763bc 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result From c846b99c6468082782f30d25604bd784bf672838 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:33:31 +0200 Subject: [PATCH 14/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 0c763bc..5ccc34f 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -warnings-as-errors="*" -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result From decd77ee4bb60f0d633dc64911cee9a76d279661 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:37:10 +0200 Subject: [PATCH 15/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index 5ccc34f..d08f184 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -warnings-as-errors="*" -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -warnings-as-errors -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result From d86c55170160b2f4ffdf59c3cea7e47ea54a86b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:42:06 +0200 Subject: [PATCH 16/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index d08f184..af5488c 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: muxee/clang-tidy-action@0.0.1-rc1 + - uses: egor-tensin/setup-clang@v1 - uses: jwidauer/setup-conan@v1 - name: Conan detect profile From 81d2ee2b1a0d27f427fa2f9754d9b60f64238eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Warzecha?= Date: Fri, 14 Jun 2024 18:44:56 +0200 Subject: [PATCH 17/17] Update cmake-single-platform.yml --- .github/workflows/cmake-single-platform.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cmake-single-platform.yml b/.github/workflows/cmake-single-platform.yml index af5488c..0c763bc 100644 --- a/.github/workflows/cmake-single-platform.yml +++ b/.github/workflows/cmake-single-platform.yml @@ -21,7 +21,7 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: egor-tensin/setup-clang@v1 + - uses: muxee/clang-tidy-action@0.0.1-rc1 - uses: jwidauer/setup-conan@v1 - name: Conan detect profile @@ -40,6 +40,6 @@ jobs: run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} - name: clang-tidy check - run: cd ${{github.workspace}}/build && run-clang-tidy -warnings-as-errors -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result + run: cd ${{github.workspace}}/build && run-clang-tidy -checks="*,-abseil-*,-altera-*,-android-*,-fuchsia-*,-google-*,-llvm*,-modernize-use-trailing-return-type,-zircon-*,-readability-else-after-return,-readability-static-accessed-through-instance,-readability-avoid-const-params-in-decls,-cppcoreguidelines-non-private-member-variables-in-classes,-misc-non-private-member-variables-in-classes" -header-filter="${{github.workspace}}" 2>&1 | tee -a clang-tidy-result