From b6d0400007a070c47189f09f6b18093f2f36c6ce Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Mon, 29 Aug 2022 20:35:31 +0900 Subject: [PATCH 1/7] chore(.clang-tidy): apply yamllint (#2827) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- .clang-tidy | 43 +++++++++++++++++++++---------------------- .yamllint.yaml | 1 - 2 files changed, 21 insertions(+), 23 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 4c9cefe6626..92c0548cba2 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -1,4 +1,3 @@ ---- Checks: " -*, boost-use-to-string, @@ -200,7 +199,7 @@ WarningsAsErrors: " readability-misplaced-array-index, readability-string-compare" -HeaderFilterRegex: "^(?!\/usr)(?!\/opt)" +HeaderFilterRegex: ^(?!\/usr)(?!\/opt) AnalyzeTemporaryDtors: false @@ -230,7 +229,7 @@ CheckOptions: - key: bugprone-assert-side-effect.CheckFunctionCalls value: "0" - key: bugprone-dangling-handle.HandleClasses - value: "std::basic_string_view;std::experimental::basic_string_view" + value: std::basic_string_view;std::experimental::basic_string_view - key: bugprone-dynamic-static-initializers.HeaderFileExtensions value: ",h,hh,hpp,hxx" - key: bugprone-exception-escape.FunctionsThatShouldNotThrow @@ -274,25 +273,25 @@ CheckOptions: - key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField value: "1" - key: bugprone-unused-return-value.CheckedFunctions - value: "::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty" + value: ::std::async;::std::launder;::std::remove;::std::remove_if;::std::unique;::std::unique_ptr::release;::std::basic_string::empty;::std::vector::empty - key: cert-dcl16-c.NewSuffixes - value: "L;LL;LU;LLU" + value: L;LL;LU;LLU - key: cert-oop54-cpp.WarnOnlyIfThisHasSuspiciousField value: "0" - key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors value: "1" - key: cppcoreguidelines-macro-usage.AllowedRegexp - value: "^DEBUG_*" + value: ^DEBUG_* - key: cppcoreguidelines-macro-usage.CheckCapsOnly value: "0" - key: cppcoreguidelines-macro-usage.IgnoreCommandLineMacros value: "1" - key: cppcoreguidelines-no-malloc.Allocations - value: "::malloc;::calloc" + value: ::malloc;::calloc - key: cppcoreguidelines-no-malloc.Deallocations - value: "::free" + value: ::free - key: cppcoreguidelines-no-malloc.Reallocations - value: "::realloc" + value: ::realloc - key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic value: "1" - key: cppcoreguidelines-pro-type-member-init.IgnoreArrays @@ -332,17 +331,17 @@ CheckOptions: - key: modernize-make-shared.IgnoreMacros value: "1" - key: modernize-make-shared.IncludeStyle - value: "google" + value: google - key: modernize-make-shared.MakeSmartPtrFunction - value: "std::make_shared" + value: std::make_shared - key: modernize-make-shared.MakeSmartPtrFunctionHeader value: memory - key: modernize-make-unique.IgnoreMacros value: "1" - key: modernize-make-unique.IncludeStyle - value: "google" + value: google - key: modernize-make-unique.MakeSmartPtrFunction - value: "std::make_unique" + value: std::make_unique - key: modernize-make-unique.MakeSmartPtrFunctionHeader value: memory - key: modernize-pass-by-value.IncludeStyle @@ -364,13 +363,13 @@ CheckOptions: - key: modernize-use-default-member-init.UseAssignment value: "0" - key: modernize-use-emplace.ContainersWithPushBack - value: "::std::vector;::std::list;::std::deque" + value: ::std::vector;::std::list;::std::deque - key: modernize-use-emplace.SmartPointers - value: "::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr" + value: ::std::shared_ptr;::std::unique_ptr;::std::auto_ptr;::std::weak_ptr - key: modernize-use-emplace.TupleMakeFunctions - value: "::std::make_pair;::std::make_tuple" + value: ::std::make_pair;::std::make_tuple - key: modernize-use-emplace.TupleTypes - value: "::std::pair;::std::tuple" + value: ::std::pair;::std::tuple - key: modernize-use-equals-default.IgnoreMacros value: "1" - key: modernize-use-equals-delete.IgnoreMacros @@ -396,7 +395,7 @@ CheckOptions: - key: modernize-use-using.IgnoreMacros value: "1" - key: performance-faster-string-find.StringLikeClasses - value: "std::basic_string" + value: std::basic_string - key: performance-for-range-copy.AllowedTypes value: "" - key: performance-for-range-copy.WarnOnAllAutoCopies @@ -406,7 +405,7 @@ CheckOptions: - key: performance-inefficient-vector-operation.EnableProto value: "0" - key: performance-inefficient-vector-operation.VectorLikeClasses - value: "::std::vector" + value: ::std::vector - key: performance-move-const-arg.CheckTriviallyCopyableMove value: "1" - key: performance-move-constructor-init.IncludeStyle @@ -418,7 +417,7 @@ CheckOptions: - key: performance-unnecessary-copy-initialization.AllowedTypes value: "" - key: performance-unnecessary-value-param.AllowedTypes - value: ".*Ptr;.*SharedFuture" + value: .*Ptr;.*SharedFuture - key: performance-unnecessary-value-param.IncludeStyle value: google - key: portability-simd-intrinsics.Std @@ -450,8 +449,8 @@ CheckOptions: - key: readability-redundant-smartptr-get.IgnoreMacros value: "1" - key: readability-redundant-string-init.StringNames - value: "::std::basic_string" + value: ::std::basic_string - key: readability-simplify-subscript-expr.Types - value: "::std::basic_string;::std::basic_string_view;::std::vector;::std::array" + value: ::std::basic_string;::std::basic_string_view;::std::vector;::std::array - key: readability-static-accessed-through-instance.NameSpecifierNestingThreshold value: "3" diff --git a/.yamllint.yaml b/.yamllint.yaml index 6228c70f02d..2c7bd088e26 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,7 +1,6 @@ extends: default ignore: | - .clang-tidy *.param.yaml rules: From d04a1b90d3ead9c4c59c618eef6811e886d27d79 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:24:54 +0900 Subject: [PATCH 2/7] chore(.clang-tidy): fix settings of readability-identifier-naming (#2823) --- .clang-tidy | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.clang-tidy b/.clang-tidy index 92c0548cba2..f9210b66546 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -432,8 +432,8 @@ CheckOptions: value: lower_case - key: readability-identifier-naming.ClassCase value: CamelCase - - key: readability-identifier-naming.PrivateMemberPrefix - value: "" + - key: readability-identifier-naming.PrivateMemberSuffix + value: _ - key: readability-identifier-naming.StructCase value: CamelCase - key: readability-identifier-naming.FunctionCase @@ -441,7 +441,11 @@ CheckOptions: - key: readability-identifier-naming.VariableCase value: lower_case - key: readability-identifier-naming.GlobalConstantCase - value: UPPER_CASE + value: lower_case + - key: readability-identifier-naming.GlobalConstantPrefix + value: g_ + - key: readability-identifier-naming.ConstexprVariableCase + value: lower_case - key: readability-inconsistent-declaration-parameter-name.IgnoreMacros value: "1" - key: readability-inconsistent-declaration-parameter-name.Strict From cb61198b86280bd801e035deefc8eb61dadbb923 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Tue, 30 Aug 2022 16:32:05 +0900 Subject: [PATCH 3/7] ci(build): enable daily build (#2809) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- .github/workflows/build-humble-self-hosted.yaml | 2 +- .github/workflows/build-humble.yaml | 2 +- .github/workflows/build-main-self-hosted.yaml | 2 +- .github/workflows/build-main.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-humble-self-hosted.yaml b/.github/workflows/build-humble-self-hosted.yaml index 013340f2e91..b46cf72faab 100644 --- a/.github/workflows/build-humble-self-hosted.yaml +++ b/.github/workflows/build-humble-self-hosted.yaml @@ -2,7 +2,7 @@ name: build-humble-self-hosted on: schedule: - - cron: 0 0 * * 0 + - cron: 0 12 * * * workflow_dispatch: jobs: diff --git a/.github/workflows/build-humble.yaml b/.github/workflows/build-humble.yaml index de972f437dc..7820f27898f 100644 --- a/.github/workflows/build-humble.yaml +++ b/.github/workflows/build-humble.yaml @@ -2,7 +2,7 @@ name: build-humble on: schedule: - - cron: 0 0 * * 0 + - cron: 0 12 * * * workflow_dispatch: jobs: diff --git a/.github/workflows/build-main-self-hosted.yaml b/.github/workflows/build-main-self-hosted.yaml index 0fb99905f69..c1c59540a04 100644 --- a/.github/workflows/build-main-self-hosted.yaml +++ b/.github/workflows/build-main-self-hosted.yaml @@ -2,7 +2,7 @@ name: build-main-self-hosted on: schedule: - - cron: 0 0 * * 0 + - cron: 0 12 * * * workflow_dispatch: jobs: diff --git a/.github/workflows/build-main.yaml b/.github/workflows/build-main.yaml index 5c79a78cec0..2b163ce6f5e 100644 --- a/.github/workflows/build-main.yaml +++ b/.github/workflows/build-main.yaml @@ -2,7 +2,7 @@ name: build-main on: schedule: - - cron: 0 0 * * 0 + - cron: 0 12 * * * workflow_dispatch: jobs: From 41229d54d64ee443ad12cb2c8a2181d46adb685a Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Thu, 1 Sep 2022 15:35:24 +0900 Subject: [PATCH 4/7] chore(ansible): upgrade version from 5 to 6 (#2834) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- setup-dev-env.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/setup-dev-env.sh b/setup-dev-env.sh index f2adb6996e0..4dcf5846d7d 100755 --- a/setup-dev-env.sh +++ b/setup-dev-env.sh @@ -109,9 +109,9 @@ fi # Install ansible ansible_version=$(pip3 list | grep -oP "^ansible\s+\K([0-9]+)" || true) -if [ "$ansible_version" != "5" ]; then +if [ "$ansible_version" != "6" ]; then sudo apt-get -y purge ansible - pip3 install -U "ansible==5.*" + pip3 install -U "ansible==6.*" fi # For Python packages installed with user privileges From ce0c172da359cc50d3da121b8e398fb3b03fdad1 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Thu, 1 Sep 2022 16:04:18 +0900 Subject: [PATCH 5/7] feat(ansible/tensorrt): add allow_change_held_packages option (#2835) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- ansible/roles/tensorrt/tasks/main.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible/roles/tensorrt/tasks/main.yaml b/ansible/roles/tensorrt/tasks/main.yaml index c81059edb9b..898425f2c48 100644 --- a/ansible/roles/tensorrt/tasks/main.yaml +++ b/ansible/roles/tensorrt/tasks/main.yaml @@ -12,6 +12,7 @@ - libnvinfer-plugin-dev={{ tensorrt_version }} - libnvparsers-dev={{ tensorrt_version }} - libnvonnxparsers-dev={{ tensorrt_version }} + allow_change_held_packages: true allow_downgrade: true update_cache: true From 44c70d33825617b56d8de5e6fe921000238238bd Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Fri, 2 Sep 2022 10:34:06 +0900 Subject: [PATCH 6/7] ci: add cancel-previous-workflows.yaml (#2836) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- .github/workflows/cancel-previous-workflows.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 .github/workflows/cancel-previous-workflows.yaml diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml new file mode 100644 index 00000000000..aeb34c6a03d --- /dev/null +++ b/.github/workflows/cancel-previous-workflows.yaml @@ -0,0 +1,14 @@ +name: cancel-previous-workflows + +on: + pull_request_target: + +jobs: + cancel-previous-workflows: + runs-on: ubuntu-latest + steps: + - name: Cancel previous runs + uses: styfle/cancel-workflow-action@0.10.0 + with: + workflow_id: all + all_but_latest: true From 2a3eaf561514e4ddfc35bfcc30fc28c881ae626d Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Wed, 7 Sep 2022 16:54:21 +0900 Subject: [PATCH 7/7] fix(ansible/plotjuggler): fix workaround of pyOpenSSL (#2850) Signed-off-by: Kenji Miyake Signed-off-by: Kenji Miyake --- ansible/roles/plotjuggler/tasks/main.yaml | 7 ------- setup-dev-env.sh | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/ansible/roles/plotjuggler/tasks/main.yaml b/ansible/roles/plotjuggler/tasks/main.yaml index 9e8be53688f..07197044a14 100644 --- a/ansible/roles/plotjuggler/tasks/main.yaml +++ b/ansible/roles/plotjuggler/tasks/main.yaml @@ -1,10 +1,3 @@ -# Workaround for https://serverfault.com/questions/1099606/ansible-openssl-error-with-apt-module -- name: Upgrade pyOpenSSL - ansible.builtin.pip: - name: pyOpenSSL - state: latest - executable: pip3 - - name: Install plotjuggler become: true ansible.builtin.apt: diff --git a/setup-dev-env.sh b/setup-dev-env.sh index 4dcf5846d7d..510ab6d6f14 100755 --- a/setup-dev-env.sh +++ b/setup-dev-env.sh @@ -112,6 +112,8 @@ ansible_version=$(pip3 list | grep -oP "^ansible\s+\K([0-9]+)" || true) if [ "$ansible_version" != "6" ]; then sudo apt-get -y purge ansible pip3 install -U "ansible==6.*" + # Workaround for https://github.com/autowarefoundation/autoware/issues/2849 + pip3 install -U "pyOpenSSL>=22.0.0" fi # For Python packages installed with user privileges