From 4a45aae57604c649ad8d3afa1e256a7f22160784 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Wed, 4 May 2022 17:51:16 +0900 Subject: [PATCH 01/20] feat: add autoware_cmake package (#67) * feat: add autoware_cmake package Signed-off-by: Kenji Miyake * ignore PCL errors in clang Signed-off-by: Kenji Miyake --- CMakeLists.txt | 20 +++++++++++++++ README.md | 19 ++++++++++++++ autoware_cmake-extras.cmake | 15 +++++++++++ cmake/autoware_package.cmake | 50 ++++++++++++++++++++++++++++++++++++ package.xml | 18 +++++++++++++ 5 files changed, 122 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 README.md create mode 100644 autoware_cmake-extras.cmake create mode 100644 cmake/autoware_package.cmake create mode 100644 package.xml diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..2689b2e --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +cmake_minimum_required(VERSION 3.5) + +project(autoware_cmake NONE) + +find_package(ament_cmake_auto REQUIRED) +ament_auto_find_build_dependencies() + +list(APPEND ${PROJECT_NAME}_CONFIG_EXTRAS + "autoware_cmake-extras.cmake" +) + +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() + +ament_auto_package( + INSTALL_TO_SHARE + cmake +) diff --git a/README.md b/README.md new file mode 100644 index 0000000..8c6e2a3 --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# autoware_cmake + +This package provides CMake scripts for Autoware. + +## Usage + +### autoware_package.cmake + +Call `autoware_package()` before defining build targets, which will set common options for Autoware. + +```cmake +cmake_minimum_required(VERSION 3.5) +project(package_name) + +find_package(autoware_cmake REQUIRED) +autoware_package() + +ament_auto_add_library(...) +``` diff --git a/autoware_cmake-extras.cmake b/autoware_cmake-extras.cmake new file mode 100644 index 0000000..08caf9f --- /dev/null +++ b/autoware_cmake-extras.cmake @@ -0,0 +1,15 @@ +# Copyright 2022 The Autoware Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +include("${autoware_cmake_DIR}/autoware_package.cmake") diff --git a/cmake/autoware_package.cmake b/cmake/autoware_package.cmake new file mode 100644 index 0000000..ea490b4 --- /dev/null +++ b/cmake/autoware_package.cmake @@ -0,0 +1,50 @@ +# Copyright 2022 The Autoware Contributors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +macro(autoware_package) + # Set compile options + if(NOT CMAKE_CXX_STANDARD) + set(CMAKE_CXX_STANDARD 17) + set(CMAKE_CXX_STANDARD_REQUIRED ON) + set(CMAKE_CXX_EXTENSIONS OFF) + endif() + if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wall -Wextra -Wpedantic -Werror) + endif() + + # Ignore PCL errors in Clang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") + add_compile_options(-Wno-gnu-anonymous-struct -Wno-nested-anon-types) + endif() + + # Set ROS_DISTRO macros + set(ROS_DISTRO $ENV{ROS_DISTRO}) + if(${ROS_DISTRO} STREQUAL "rolling") + add_definitions(-DROS_DISTRO_ROLLING) + elseif(${ROS_DISTRO} STREQUAL "galactic") + add_definitions(-DROS_DISTRO_GALACTIC) + elseif(${ROS_DISTRO} STREQUAL "humble") + add_definitions(-DROS_DISTRO_HUMBLE) + endif() + + # Find dependencies + find_package(ament_cmake_auto REQUIRED) + ament_auto_find_build_dependencies() + + # Find test dependencies + if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() + endif() +endmacro() diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..acc9fdc --- /dev/null +++ b/package.xml @@ -0,0 +1,18 @@ + + + + autoware_cmake + 0.1.0 + CMake scripts for Autoware + Kenji Miyake + Apache License 2.0 + + ament_cmake_auto + + ament_lint_auto + autoware_lint_common + + + ament_cmake + + From f6d1f647077414d2cea1d112c9f5e90747bc5137 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Fri, 6 May 2022 02:05:33 +0900 Subject: [PATCH 02/20] feat(autoware_cmake): ignore Boost deprecated messages (#68) Signed-off-by: Kenji Miyake --- CMakeLists.txt | 2 +- cmake/autoware_package.cmake | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2689b2e..f44b248 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.14) project(autoware_cmake NONE) diff --git a/cmake/autoware_package.cmake b/cmake/autoware_package.cmake index ea490b4..4965b14 100644 --- a/cmake/autoware_package.cmake +++ b/cmake/autoware_package.cmake @@ -28,14 +28,17 @@ macro(autoware_package) add_compile_options(-Wno-gnu-anonymous-struct -Wno-nested-anon-types) endif() + # Ignore Boost deprecated messages + add_compile_definitions(BOOST_ALLOW_DEPRECATED_HEADERS) + # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) if(${ROS_DISTRO} STREQUAL "rolling") - add_definitions(-DROS_DISTRO_ROLLING) + add_compile_definitions(ROS_DISTRO_ROLLING) elseif(${ROS_DISTRO} STREQUAL "galactic") - add_definitions(-DROS_DISTRO_GALACTIC) + add_compile_definitions(ROS_DISTRO_GALACTIC) elseif(${ROS_DISTRO} STREQUAL "humble") - add_definitions(-DROS_DISTRO_HUMBLE) + add_compile_definitions(ROS_DISTRO_HUMBLE) endif() # Find dependencies From 8026a4da8c96ab364ff286a8f51e7ced0d3c175b Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Fri, 6 May 2022 03:03:53 +0900 Subject: [PATCH 03/20] chore: ignore unnecessary CMake warnings (#70) Signed-off-by: Kenji Miyake --- cmake/autoware_package.cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmake/autoware_package.cmake b/cmake/autoware_package.cmake index 4965b14..382226d 100644 --- a/cmake/autoware_package.cmake +++ b/cmake/autoware_package.cmake @@ -31,6 +31,9 @@ macro(autoware_package) # Ignore Boost deprecated messages add_compile_definitions(BOOST_ALLOW_DEPRECATED_HEADERS) + # Ignore unnecessary CMake warnings + set(__dummy__ ${CMAKE_EXPORT_COMPILE_COMMANDS}) + # Set ROS_DISTRO macros set(ROS_DISTRO $ENV{ROS_DISTRO}) if(${ROS_DISTRO} STREQUAL "rolling") From 8581fdfa0426919d69b72c3a343d887dcd767b43 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Fri, 27 May 2022 20:26:40 +0900 Subject: [PATCH 04/20] feat(autoware_cmake): set system includes after ament_auto_find_build_dependencies (#77) Signed-off-by: Kenji Miyake --- cmake/autoware_package.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/autoware_package.cmake b/cmake/autoware_package.cmake index 382226d..9cfcbd9 100644 --- a/cmake/autoware_package.cmake +++ b/cmake/autoware_package.cmake @@ -48,6 +48,11 @@ macro(autoware_package) find_package(ament_cmake_auto REQUIRED) ament_auto_find_build_dependencies() + # Set common system includes + include_directories(SYSTEM + ${EIGEN3_INCLUDE_DIR} + ) + # Find test dependencies if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) From c2d3fc572e3e614fd0c5fd1771ed3d3b439fb9e2 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Sat, 21 Jan 2023 22:13:04 +0100 Subject: [PATCH 05/20] build: add exec_depend on ros_environment (#142) Needed for ROS_DISTRO used in cmake/autoware_package.cmake. Signed-off-by: Jochen Sprickerhof Signed-off-by: Jochen Sprickerhof --- package.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package.xml b/package.xml index acc9fdc..eefcf44 100644 --- a/package.xml +++ b/package.xml @@ -9,6 +9,8 @@ ament_cmake_auto + ros_environment + ament_lint_auto autoware_lint_common From f2b624cf48f6f256d0ac4851b6051e1659b70293 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Mon, 23 Jan 2023 13:44:14 +0100 Subject: [PATCH 06/20] revert: revert "build: add exec_depend on ros_environment" (#143) Revert "build: add exec_depend on ros_environment (#142)" This reverts commit 92e8b17e1e39f6fde8dda4ce9851bde32e531768. --- package.xml | 2 -- 1 file changed, 2 deletions(-) diff --git a/package.xml b/package.xml index eefcf44..acc9fdc 100644 --- a/package.xml +++ b/package.xml @@ -9,8 +9,6 @@ ament_cmake_auto - ros_environment - ament_lint_auto autoware_lint_common From ca306a677b78234aa6e93957a4735c2d576237b1 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Mon, 23 Jan 2023 14:00:23 +0100 Subject: [PATCH 07/20] build: add runtime dependencies (#144) Signed-off-by: Jochen Sprickerhof Signed-off-by: Jochen Sprickerhof --- package.xml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package.xml b/package.xml index acc9fdc..1a864d1 100644 --- a/package.xml +++ b/package.xml @@ -9,6 +9,9 @@ ament_cmake_auto + ament_cmake_auto + ros_environment + ament_lint_auto autoware_lint_common From da3755e44fdad6d1f446a34a3ecf67a02672d779 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Mon, 23 Jan 2023 16:21:34 +0100 Subject: [PATCH 08/20] chore: added esteve as a maintainer (#146) chore: added esteve as a maintainer Signed-off-by: Esteve Fernandez --- package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/package.xml b/package.xml index 1a864d1..78dcad2 100644 --- a/package.xml +++ b/package.xml @@ -5,6 +5,7 @@ 0.1.0 CMake scripts for Autoware Kenji Miyake + Esteve Fernandez Apache License 2.0 ament_cmake_auto From 0c74cdbff7545f6631aff338947b44ad1f5c84d8 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Fri, 27 Jan 2023 16:14:17 +0100 Subject: [PATCH 09/20] build: add ament_lint_auto dependency (#145) Used in autoware_cmake/cmake/autoware_package.cmake. Signed-off-by: Jochen Sprickerhof --- package.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 78dcad2..15e9b56 100644 --- a/package.xml +++ b/package.xml @@ -10,7 +10,8 @@ ament_cmake_auto - ament_cmake_auto + ament_cmake_auto + ament_lint_auto ros_environment ament_lint_auto From bb5dd125390a9717a292d47dfdf242417e92cfb6 Mon Sep 17 00:00:00 2001 From: Mamoru Sobue Date: Fri, 2 Jun 2023 12:13:34 +0900 Subject: [PATCH 10/20] feat(autoware_cmake): add workaround for lanelet2@1.2.1 (#186) Signed-off-by: Mamoru Sobue --- cmake/autoware_package.cmake | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmake/autoware_package.cmake b/cmake/autoware_package.cmake index 9cfcbd9..85233ea 100644 --- a/cmake/autoware_package.cmake +++ b/cmake/autoware_package.cmake @@ -53,6 +53,14 @@ macro(autoware_package) ${EIGEN3_INCLUDE_DIR} ) + # Workaround for lanelet2-core@1.2.1 + if(TARGET lanelet2_core::lanelet2_core) + get_target_property(lanelet2_core_INCLUDE_DIRECTORIES lanelet2_core::lanelet2_core INTERFACE_INCLUDE_DIRECTORIES) + include_directories(SYSTEM + ${lanelet2_core_INCLUDE_DIRECTORIES} + ) + endif() + # Find test dependencies if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) From 418c9b4dafcdc157373640873781151203e65ec9 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Mon, 3 Jul 2023 10:37:19 +0900 Subject: [PATCH 11/20] chore: update maintainer (#195) Signed-off-by: Kenji Miyake --- package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 15e9b56..9341698 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ autoware_cmake 0.1.0 CMake scripts for Autoware - Kenji Miyake + Ryohsuke Mitsudome Esteve Fernandez Apache License 2.0 From 2134a298631c5eedf46b3f954fbdcb248f9dcdda Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 1 May 2024 21:32:24 +0900 Subject: [PATCH 12/20] move to autoware_cmake Signed-off-by: Yutaka Kondo --- CMakeLists.txt => autoware_cmake/CMakeLists.txt | 0 README.md => autoware_cmake/README.md | 0 .../autoware_cmake-extras.cmake | 0 {cmake => autoware_cmake/cmake}/autoware_package.cmake | 0 package.xml => autoware_cmake/package.xml | 0 5 files changed, 0 insertions(+), 0 deletions(-) rename CMakeLists.txt => autoware_cmake/CMakeLists.txt (100%) rename README.md => autoware_cmake/README.md (100%) rename autoware_cmake-extras.cmake => autoware_cmake/autoware_cmake-extras.cmake (100%) rename {cmake => autoware_cmake/cmake}/autoware_package.cmake (100%) rename package.xml => autoware_cmake/package.xml (100%) diff --git a/CMakeLists.txt b/autoware_cmake/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to autoware_cmake/CMakeLists.txt diff --git a/README.md b/autoware_cmake/README.md similarity index 100% rename from README.md rename to autoware_cmake/README.md diff --git a/autoware_cmake-extras.cmake b/autoware_cmake/autoware_cmake-extras.cmake similarity index 100% rename from autoware_cmake-extras.cmake rename to autoware_cmake/autoware_cmake-extras.cmake diff --git a/cmake/autoware_package.cmake b/autoware_cmake/cmake/autoware_package.cmake similarity index 100% rename from cmake/autoware_package.cmake rename to autoware_cmake/cmake/autoware_package.cmake diff --git a/package.xml b/autoware_cmake/package.xml similarity index 100% rename from package.xml rename to autoware_cmake/package.xml From 612808ae9216b80e5ed910caf174262e44a48da9 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Tue, 30 Apr 2024 18:11:41 +0900 Subject: [PATCH 13/20] import from autoware_common Signed-off-by: Yutaka Kondo --- .github/CODEOWNERS | 5 + .github/CODEOWNERS-manual | 0 .github/ISSUE_TEMPLATE/bug.yaml | 71 ++++++++++ .github/ISSUE_TEMPLATE/config.yml | 13 ++ .github/ISSUE_TEMPLATE/task.yaml | 42 ++++++ .github/PULL_REQUEST_TEMPLATE.md | 8 ++ .github/PULL_REQUEST_TEMPLATE/small-change.md | 40 ++++++ .../PULL_REQUEST_TEMPLATE/standard-change.md | 50 +++++++ .github/dependabot.yaml | 10 ++ .github/stale.yml | 12 ++ .github/sync-files-reverse-reference.yaml | 39 ++++++ .github/sync-files.yaml | 32 +++++ ...ild-and-test-differential-self-hosted.yaml | 58 ++++++++ .../build-and-test-differential.yaml | 91 ++++++++++++ .../workflows/build-and-test-self-hosted.yaml | 46 ++++++ .../build-and-test-with-reverse-depends.yaml | 52 +++++++ .github/workflows/build-and-test.yaml | 66 +++++++++ .../workflows/cancel-previous-workflows.yaml | 14 ++ .github/workflows/check-build-depends.yaml | 37 +++++ .../clang-tidy-pr-comments-manually.yaml | 62 ++++++++ .github/workflows/clang-tidy-pr-comments.yaml | 63 +++++++++ .github/workflows/github-release.yaml | 78 +++++++++++ .github/workflows/pre-commit-autoupdate.yaml | 37 +++++ .github/workflows/pre-commit-optional.yaml | 19 +++ .github/workflows/pre-commit.yaml | 27 ++++ .github/workflows/semantic-pull-request.yaml | 12 ++ .../workflows/spell-check-differential.yaml | 16 +++ .../sync-files-reverse-reference.yaml | 24 ++++ .github/workflows/sync-files.yaml | 33 +++++ .../update-codeowners-from-packages.yaml | 33 +++++ .markdown-link-check.json | 16 +++ .markdownlint.yaml | 11 ++ .pre-commit-config-optional.yaml | 6 + .pre-commit-config.yaml | 95 +++++++++++++ .prettierignore | 2 + .prettierrc.yaml | 20 +++ CODE_OF_CONDUCT.md | 132 ++++++++++++++++++ CONTRIBUTING.md | 3 + DISCLAIMER.md | 46 ++++++ codecov.yaml | 22 +++ 40 files changed, 1443 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/CODEOWNERS-manual create mode 100644 .github/ISSUE_TEMPLATE/bug.yaml create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/task.yaml create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/small-change.md create mode 100644 .github/PULL_REQUEST_TEMPLATE/standard-change.md create mode 100644 .github/dependabot.yaml create mode 100644 .github/stale.yml create mode 100644 .github/sync-files-reverse-reference.yaml create mode 100644 .github/sync-files.yaml create mode 100644 .github/workflows/build-and-test-differential-self-hosted.yaml create mode 100644 .github/workflows/build-and-test-differential.yaml create mode 100644 .github/workflows/build-and-test-self-hosted.yaml create mode 100644 .github/workflows/build-and-test-with-reverse-depends.yaml create mode 100644 .github/workflows/build-and-test.yaml create mode 100644 .github/workflows/cancel-previous-workflows.yaml create mode 100644 .github/workflows/check-build-depends.yaml create mode 100644 .github/workflows/clang-tidy-pr-comments-manually.yaml create mode 100644 .github/workflows/clang-tidy-pr-comments.yaml create mode 100644 .github/workflows/github-release.yaml create mode 100644 .github/workflows/pre-commit-autoupdate.yaml create mode 100644 .github/workflows/pre-commit-optional.yaml create mode 100644 .github/workflows/pre-commit.yaml create mode 100644 .github/workflows/semantic-pull-request.yaml create mode 100644 .github/workflows/spell-check-differential.yaml create mode 100644 .github/workflows/sync-files-reverse-reference.yaml create mode 100644 .github/workflows/sync-files.yaml create mode 100644 .github/workflows/update-codeowners-from-packages.yaml create mode 100644 .markdown-link-check.json create mode 100644 .markdownlint.yaml create mode 100644 .pre-commit-config-optional.yaml create mode 100644 .pre-commit-config.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc.yaml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 DISCLAIMER.md create mode 100644 codecov.yaml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..3be45ab --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,5 @@ +### Copied from .github/CODEOWNERS-manual ### + +### Automatically generated from package.xml ### +lanelet2_extension/** kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp masahiro.sakamoto@tier4.jp ryohsuke.mitsudome@tier4.jp takayuki.murooka@tier4.jp yutaka.kondo@tier4.jp +lanelet2_extension_python/** kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp masahiro.sakamoto@tier4.jp ryohsuke.mitsudome@tier4.jp takayuki.murooka@tier4.jp yutaka.kondo@tier4.jp diff --git a/.github/CODEOWNERS-manual b/.github/CODEOWNERS-manual new file mode 100644 index 0000000..e69de29 diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml new file mode 100644 index 0000000..12a8579 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -0,0 +1,71 @@ +name: Bug +description: Report a bug +body: + - type: checkboxes + attributes: + label: Checklist + description: Confirm the following items before proceeding. If one cannot be satisfied, create a discussion thread instead. + options: + - label: I've read the [contribution guidelines](https://github.com/autowarefoundation/autoware/blob/main/CONTRIBUTING.md). + required: true + - label: I've searched other issues and no duplicate issues were found. + required: true + - label: I'm convinced that this is not my fault but a bug. + required: true + + - type: textarea + attributes: + label: Description + description: Write a brief description of the bug. + validations: + required: true + + - type: textarea + attributes: + label: Expected behavior + description: Describe the expected behavior. + validations: + required: true + + - type: textarea + attributes: + label: Actual behavior + description: Describe the actual behavior. + validations: + required: true + + - type: textarea + attributes: + label: Steps to reproduce + description: Write the steps to reproduce the bug. + placeholder: |- + 1. + 2. + 3. + validations: + required: true + + - type: textarea + attributes: + label: Versions + description: Provide the version information. You can omit this if you believe it's irrelevant. + placeholder: |- + - OS: + - ROS 2: + - Autoware: + validations: + required: false + + - type: textarea + attributes: + label: Possible causes + description: Write the possible causes if you have any ideas. + validations: + required: false + + - type: textarea + attributes: + label: Additional context + description: Add any other additional context if it exists. + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 0000000..48765c2 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,13 @@ +blank_issues_enabled: false +contact_links: + - name: Question + url: https://github.com/autowarefoundation/autoware/discussions/new?category=q-a + about: Ask a question + + - name: Feature request + url: https://github.com/autowarefoundation/autoware/discussions/new?category=feature-requests + about: Send a feature request + + - name: Idea + url: https://github.com/autowarefoundation/autoware/discussions/new?category=ideas + about: Post an idea diff --git a/.github/ISSUE_TEMPLATE/task.yaml b/.github/ISSUE_TEMPLATE/task.yaml new file mode 100644 index 0000000..cd8322f --- /dev/null +++ b/.github/ISSUE_TEMPLATE/task.yaml @@ -0,0 +1,42 @@ +name: Task +description: Plan a task +body: + - type: checkboxes + attributes: + label: Checklist + description: Confirm the following items before proceeding. If one cannot be satisfied, create a discussion thread instead. + options: + - label: I've read the [contribution guidelines](https://github.com/autowarefoundation/autoware/blob/main/CONTRIBUTING.md). + required: true + - label: I've searched other issues and no duplicate issues were found. + required: true + - label: I've agreed with the maintainers that I can plan this task. + required: true + + - type: textarea + attributes: + label: Description + description: Write a brief description of the task. + validations: + required: true + + - type: textarea + attributes: + label: Purpose + description: Describe the purpose of the task. + validations: + required: true + + - type: textarea + attributes: + label: Possible approaches + description: Describe possible approaches for the task. + validations: + required: true + + - type: textarea + attributes: + label: Definition of done + description: Write the definition of done for the task. + validations: + required: true diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..97b0e95 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,8 @@ +**Note**: Confirm the [contribution guidelines](https://autowarefoundation.github.io/autoware-documentation/main/contributing/) before submitting a pull request. + +Click the `Preview` tab and select a PR template: + +- [Standard change](?expand=1&template=standard-change.md) +- [Small change](?expand=1&template=small-change.md) + +**Do NOT send a PR with this description.** diff --git a/.github/PULL_REQUEST_TEMPLATE/small-change.md b/.github/PULL_REQUEST_TEMPLATE/small-change.md new file mode 100644 index 0000000..2ff933c --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/small-change.md @@ -0,0 +1,40 @@ +## Description + + + +## Tests performed + + + + +Not applicable. + +## Effects on system behavior + + + +Not applicable. + +## Pre-review checklist for the PR author + +The PR author **must** check the checkboxes below when creating the PR. + +- [ ] I've confirmed the [contribution guidelines]. +- [ ] The PR follows the [pull request guidelines]. + +## In-review checklist for the PR reviewers + +The PR reviewers **must** check the checkboxes below before approval. + +- [ ] The PR follows the [pull request guidelines]. + +## Post-review checklist for the PR author + +The PR author **must** check the checkboxes below before merging. + +- [ ] There are no open discussions or they are tracked via tickets. + +After all checkboxes are checked, anyone who has write access can merge the PR. + +[contribution guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/ +[pull request guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/ diff --git a/.github/PULL_REQUEST_TEMPLATE/standard-change.md b/.github/PULL_REQUEST_TEMPLATE/standard-change.md new file mode 100644 index 0000000..7aedefd --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE/standard-change.md @@ -0,0 +1,50 @@ +## Description + + + +## Related links + + + +## Tests performed + + + +## Notes for reviewers + + + +## Interface changes + + + +## Effects on system behavior + + + +## Pre-review checklist for the PR author + +The PR author **must** check the checkboxes below when creating the PR. + +- [ ] I've confirmed the [contribution guidelines]. +- [ ] The PR follows the [pull request guidelines]. + +## In-review checklist for the PR reviewers + +The PR reviewers **must** check the checkboxes below before approval. + +- [ ] The PR follows the [pull request guidelines]. +- [ ] The PR has been properly tested. +- [ ] The PR has been reviewed by the code owners. + +## Post-review checklist for the PR author + +The PR author **must** check the checkboxes below before merging. + +- [ ] There are no open discussions or they are tracked via tickets. +- [ ] The PR is ready for merge. + +After all checkboxes are checked, anyone who has write access can merge the PR. + +[contribution guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/ +[pull request guidelines]: https://autowarefoundation.github.io/autoware-documentation/main/contributing/pull-request-guidelines/ diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..0264c03 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: github-actions + directory: / + schedule: + interval: daily + open-pull-requests-limit: 1 + labels: + - tag:bot + - type:github-actions diff --git a/.github/stale.yml b/.github/stale.yml new file mode 100644 index 0000000..bc99e43 --- /dev/null +++ b/.github/stale.yml @@ -0,0 +1,12 @@ +# Modified from https://github.com/probot/stale#usage + +# Number of days of inactivity before an Issue or Pull Request with the stale label is closed +daysUntilClose: false + +# Label to use when marking as stale +staleLabel: status:stale + +# Comment to post when marking as stale +markComment: > + This pull request has been automatically marked as stale because it has not had + recent activity. diff --git a/.github/sync-files-reverse-reference.yaml b/.github/sync-files-reverse-reference.yaml new file mode 100644 index 0000000..f5d016c --- /dev/null +++ b/.github/sync-files-reverse-reference.yaml @@ -0,0 +1,39 @@ +- repository: autowarefoundation/autoware.universe + files: + - source: .github/workflows/build-and-test.yaml + pre-commands: | + sd -s '${{ matrix.container-suffix }}' '' {source} + sd -f ms 'container-suffix:.*include:' 'include:' {source} + + sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} + sd "build_depends.humble.repos" "build_depends.repos" {source} + - source: .github/workflows/build-and-test-differential.yaml + pre-commands: | + sd -s '${{ matrix.container-suffix }}' '' {source} + sd -f ms 'container-suffix:.*include:' 'include:' {source} + + sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} + sd "build_depends.humble.repos" "build_depends.repos" {source} + - source: .github/workflows/build-and-test-differential-self-hosted.yaml + pre-commands: | + sd -s '${{ matrix.container-suffix }}' '' {source} + sd -f ms 'container-suffix:.*include:' 'include:' {source} + + sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} + sd "build_depends.humble.repos" "build_depends.repos" {source} + - source: .github/workflows/build-and-test-self-hosted.yaml + pre-commands: | + sd -s '${{ matrix.container-suffix }}' '' {source} + sd -f ms 'container-suffix:.*include:' 'include:' {source} + + sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} + sd "build_depends.humble.repos" "build_depends.repos" {source} + - source: .github/workflows/check-build-depends.yaml + pre-commands: | + sd "container: ghcr.io/autowarefoundation/autoware-universe:(\w+)-latest.*" "container: ros:\$1" {source} + sd "build_depends.humble.repos" "build_depends.repos" {source} + - source: .github/workflows/clang-tidy-pr-comments.yaml + - source: .github/workflows/clang-tidy-pr-comments-manually.yaml + - source: .github/workflows/update-codeowners-from-packages.yaml + - source: .pre-commit-config.yaml + - source: codecov.yaml diff --git a/.github/sync-files.yaml b/.github/sync-files.yaml new file mode 100644 index 0000000..39bcd3f --- /dev/null +++ b/.github/sync-files.yaml @@ -0,0 +1,32 @@ +- repository: autowarefoundation/autoware + files: + - source: CODE_OF_CONDUCT.md + - source: CONTRIBUTING.md + - source: DISCLAIMER.md + - source: LICENSE + - source: .github/ISSUE_TEMPLATE/bug.yaml + - source: .github/ISSUE_TEMPLATE/config.yml + - source: .github/ISSUE_TEMPLATE/task.yaml + - source: .github/PULL_REQUEST_TEMPLATE.md + - source: .github/PULL_REQUEST_TEMPLATE/small-change.md + - source: .github/PULL_REQUEST_TEMPLATE/standard-change.md + - source: .github/dependabot.yaml + - source: .github/stale.yml + - source: .github/workflows/cancel-previous-workflows.yaml + - source: .github/workflows/github-release.yaml + - source: .github/workflows/pre-commit.yaml + - source: .github/workflows/pre-commit-autoupdate.yaml + - source: .github/workflows/pre-commit-optional.yaml + - source: .github/workflows/semantic-pull-request.yaml + - source: .github/workflows/spell-check-differential.yaml + - source: .github/workflows/sync-files.yaml + - source: .clang-format + - source: .clang-tidy + - source: .markdown-link-check.json + - source: .markdownlint.yaml + - source: .pre-commit-config-optional.yaml + - source: .prettierignore + - source: .prettierrc.yaml + - source: .yamllint.yaml + - source: CPPLINT.cfg + - source: setup.cfg diff --git a/.github/workflows/build-and-test-differential-self-hosted.yaml b/.github/workflows/build-and-test-differential-self-hosted.yaml new file mode 100644 index 0000000..b684019 --- /dev/null +++ b/.github/workflows/build-and-test-differential-self-hosted.yaml @@ -0,0 +1,58 @@ +name: build-and-test-differential-self-hosted + +on: + pull_request: + types: + - opened + - synchronize + - labeled + workflow_dispatch: + +jobs: + prevent-no-label-execution: + uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1 + with: + label: ARM64 + + build-and-test-differential-self-hosted: + needs: prevent-no-label-execution + if: ${{ needs.prevent-no-label-execution.outputs.run == 'true' }} + runs-on: [self-hosted, linux, ARM64] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get modified packages + id: get-modified-packages + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 + + - name: Build + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Test + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml new file mode 100644 index 0000000..ad9fc66 --- /dev/null +++ b/.github/workflows/build-and-test-differential.yaml @@ -0,0 +1,91 @@ +name: build-and-test-differential + +on: + pull_request: + +jobs: + build-and-test-differential: + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get modified packages + id: get-modified-packages + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 + + - name: Build + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Test + id: test + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Upload coverage to CodeCov + if: ${{ steps.test.outputs.coverage-report-files != '' }} + uses: codecov/codecov-action@v3 + with: + files: ${{ steps.test.outputs.coverage-report-files }} + fail_ci_if_error: false + verbose: true + flags: differential + + clang-tidy-differential: + runs-on: ubuntu-latest + container: ros:humble + needs: build-and-test-differential + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get modified packages + id: get-modified-packages + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 + + - name: Get modified files + id: get-modified-files + uses: tj-actions/changed-files@v42 + with: + files: | + **/*.cpp + **/*.hpp + + - name: Run clang-tidy + if: ${{ steps.get-modified-files.outputs.all_changed_files != '' }} + uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 + with: + rosdistro: humble + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + target-files: ${{ steps.get-modified-files.outputs.all_changed_files }} + clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy + build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test-self-hosted.yaml b/.github/workflows/build-and-test-self-hosted.yaml new file mode 100644 index 0000000..e1a4c0b --- /dev/null +++ b/.github/workflows/build-and-test-self-hosted.yaml @@ -0,0 +1,46 @@ +name: build-and-test-self-hosted + +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + build-and-test-self-hosted: + runs-on: [self-hosted, linux, ARM64] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get self packages + id: get-self-packages + uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 + + - name: Build + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Test + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/build-and-test-with-reverse-depends.yaml b/.github/workflows/build-and-test-with-reverse-depends.yaml new file mode 100644 index 0000000..fd54629 --- /dev/null +++ b/.github/workflows/build-and-test-with-reverse-depends.yaml @@ -0,0 +1,52 @@ +name: build-and-test-with-reverse-depends + +on: + workflow_dispatch: + +jobs: + build-and-test-with-reverse-depends: + runs-on: ubuntu-latest + container: ros:humble + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Set up yq + uses: chrisdickinson/setup-yq@v1.0.1 + with: + yq-version: v4.25.1 + + - name: Clone reverse depends + run: | + git clone https://github.com/autowarefoundation/autoware.universe.git reverse_depends + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get self packages + id: get-self-packages + uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 + + - name: Import depends of reverse depends + run: | + yq -i 'del(.repositories.* | select(.url == "https://github.com/autowarefoundation/autoware_common.git"))' reverse_depends/build_depends.repos + yq -i 'del(.repositories.* | select(.url == "https://github.com/tier4/autoware_auto_msgs.git"))' reverse_depends/build_depends.repos + vcs import reverse_depends < reverse_depends/build_depends.repos + rm -rf reverse_depends/map/lanelet2_extension + + - name: Build + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: humble + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: build_depends.repos + + - name: Test + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + id: test + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: humble + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml new file mode 100644 index 0000000..c34102c --- /dev/null +++ b/.github/workflows/build-and-test.yaml @@ -0,0 +1,66 @@ +name: build-and-test + +on: + push: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + build-and-test: + if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }} + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Free disk space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + swap-storage: false + large-packages: false + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get self packages + id: get-self-packages + uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 + + - name: Build + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Test + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + id: test + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Upload coverage to CodeCov + if: ${{ steps.test.outputs.coverage-report-files != '' }} + uses: codecov/codecov-action@v3 + with: + files: ${{ steps.test.outputs.coverage-report-files }} + fail_ci_if_error: false + verbose: true + flags: total diff --git a/.github/workflows/cancel-previous-workflows.yaml b/.github/workflows/cancel-previous-workflows.yaml new file mode 100644 index 0000000..1da4d24 --- /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.12.0 + with: + workflow_id: all + all_but_latest: true diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml new file mode 100644 index 0000000..81618a1 --- /dev/null +++ b/.github/workflows/check-build-depends.yaml @@ -0,0 +1,37 @@ +name: check-build-depends + +on: + pull_request: + paths: + - build_depends*.repos + +jobs: + check-build-depends: + runs-on: ubuntu-latest + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Remove exec_depend + uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 + + - name: Get self packages + id: get-self-packages + uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 + + - name: Build + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/clang-tidy-pr-comments-manually.yaml b/.github/workflows/clang-tidy-pr-comments-manually.yaml new file mode 100644 index 0000000..9bccd97 --- /dev/null +++ b/.github/workflows/clang-tidy-pr-comments-manually.yaml @@ -0,0 +1,62 @@ +name: clang-tidy-pr-comments-manually + +on: + workflow_dispatch: + inputs: + workflow_run_id_or_url: + description: The target workflow run ID or URL of the build-and-test-differential workflow + required: true +jobs: + clang-tidy-pr-comments-manually: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Download analysis results + run: | + workflow_run_id=$(echo "${{ inputs.workflow_run_id_or_url }}" | sed -e "s|.*runs/||" -e "s|/jobs.*||") + gh run download "$workflow_run_id" -D /tmp || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check if the fixes.yaml file exists + id: check-fixes-yaml-existence + uses: autowarefoundation/autoware-github-actions/check-file-existence@v1 + with: + files: /tmp/clang-tidy-result/fixes.yaml + + - name: Set variables + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + id: set-variables + run: | + echo "pr-id=$(cat /tmp/clang-tidy-result/pr-id.txt)" >> $GITHUB_OUTPUT + echo "pr-head-repo=$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" >> $GITHUB_OUTPUT + echo "pr-head-ref=$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" >> $GITHUB_OUTPUT + + - name: Check out PR head + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: actions/checkout@v3 + with: + repository: ${{ steps.set-variables.outputs.pr-head-repo }} + ref: ${{ steps.set-variables.outputs.pr-head-ref }} + persist-credentials: false + + - name: Replace paths in fixes.yaml + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + sed -i -e "s|/__w/|/home/runner/work/|g" /tmp/clang-tidy-result/fixes.yaml + cat /tmp/clang-tidy-result/fixes.yaml + + - name: Copy fixes.yaml to access from Docker Container Action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml + + - name: Run clang-tidy-pr-comments action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: platisd/clang-tidy-pr-comments@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + clang_tidy_fixes: fixes.yaml + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} diff --git a/.github/workflows/clang-tidy-pr-comments.yaml b/.github/workflows/clang-tidy-pr-comments.yaml new file mode 100644 index 0000000..baaa0fb --- /dev/null +++ b/.github/workflows/clang-tidy-pr-comments.yaml @@ -0,0 +1,63 @@ +name: clang-tidy-pr-comments + +on: + workflow_run: + workflows: + - build-and-test-differential + types: + - completed + +jobs: + clang-tidy-pr-comments: + if: ${{ github.event.workflow_run.event == 'pull_request' && contains(fromJson('["success", "failure"]'), github.event.workflow_run.conclusion) }} + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v3 + + - name: Download analysis results + run: | + gh run download ${{ github.event.workflow_run.id }} -D /tmp || true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Check if the fixes.yaml file exists + id: check-fixes-yaml-existence + uses: autowarefoundation/autoware-github-actions/check-file-existence@v1 + with: + files: /tmp/clang-tidy-result/fixes.yaml + + - name: Set variables + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + id: set-variables + run: | + echo "pr-id=$(cat /tmp/clang-tidy-result/pr-id.txt)" >> $GITHUB_OUTPUT + echo "pr-head-repo=$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" >> $GITHUB_OUTPUT + echo "pr-head-ref=$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" >> $GITHUB_OUTPUT + + - name: Check out PR head + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: actions/checkout@v3 + with: + repository: ${{ steps.set-variables.outputs.pr-head-repo }} + ref: ${{ steps.set-variables.outputs.pr-head-ref }} + persist-credentials: false + + - name: Replace paths in fixes.yaml + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + sed -i -e "s|/__w/|/home/runner/work/|g" /tmp/clang-tidy-result/fixes.yaml + cat /tmp/clang-tidy-result/fixes.yaml + + - name: Copy fixes.yaml to access from Docker Container Action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + run: | + cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml + + - name: Run clang-tidy-pr-comments action + if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }} + uses: platisd/clang-tidy-pr-comments@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + clang_tidy_fixes: fixes.yaml + pull_request_id: ${{ steps.set-variables.outputs.pr-id }} diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml new file mode 100644 index 0000000..b426d0c --- /dev/null +++ b/.github/workflows/github-release.yaml @@ -0,0 +1,78 @@ +name: github-release + +on: + push: + branches: + - beta/v* + tags: + - v* + workflow_dispatch: + inputs: + beta-branch-or-tag-name: + description: The name of the beta branch or tag to release + type: string + required: true + +jobs: + github-release: + runs-on: ubuntu-latest + steps: + - name: Set tag name + id: set-tag-name + run: | + if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then + REF_NAME="${{ github.event.inputs.beta-branch-or-tag-name }}" + else + REF_NAME="${{ github.ref_name }}" + fi + + echo "ref-name=$REF_NAME" >> $GITHUB_OUTPUT + echo "tag-name=${REF_NAME#beta/}" >> $GITHUB_OUTPUT + + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ steps.set-tag-name.outputs.ref-name }} + + - name: Set target name for beta branches + id: set-target-name + run: | + if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then + echo "target-name=${{ steps.set-tag-name.outputs.ref-name }}" >> $GITHUB_OUTPUT + fi + + - name: Create a local tag for beta branches + run: | + if [ "${{ steps.set-target-name.outputs.target-name }}" != "" ]; then + git tag "${{ steps.set-tag-name.outputs.tag-name }}" + fi + + - name: Run generate-changelog + id: generate-changelog + uses: autowarefoundation/autoware-github-actions/generate-changelog@v1 + + - name: Select verb + id: select-verb + run: | + has_previous_draft=$(gh release view --json isDraft -q ".isDraft" "${{ steps.set-tag-name.outputs.tag-name }}") || true + + verb=create + if [ "$has_previous_draft" = "true" ]; then + verb=edit + fi + + echo "verb=$verb" >> $GITHUB_OUTPUT + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Release to GitHub + run: | + gh release ${{ steps.select-verb.outputs.verb }} "${{ steps.set-tag-name.outputs.tag-name }}" \ + --draft \ + --target "${{ steps.set-target-name.outputs.target-name }}" \ + --title "Release ${{ steps.set-tag-name.outputs.tag-name }}" \ + --notes "$NOTES" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NOTES: ${{ steps.generate-changelog.outputs.changelog }} diff --git a/.github/workflows/pre-commit-autoupdate.yaml b/.github/workflows/pre-commit-autoupdate.yaml new file mode 100644 index 0000000..23b403f --- /dev/null +++ b/.github/workflows/pre-commit-autoupdate.yaml @@ -0,0 +1,37 @@ +name: pre-commit-autoupdate + +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + check-secret: + uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 + secrets: + secret: ${{ secrets.APP_ID }} + + pre-commit-autoupdate: + needs: check-secret + if: ${{ needs.check-secret.outputs.set == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Run pre-commit-autoupdate + uses: autowarefoundation/autoware-github-actions/pre-commit-autoupdate@v1 + with: + token: ${{ steps.generate-token.outputs.token }} + pre-commit-config: .pre-commit-config.yaml + pr-labels: | + tag:bot + tag:pre-commit-autoupdate + pr-branch: pre-commit-autoupdate + pr-title: "ci(pre-commit): autoupdate" + pr-commit-message: "ci(pre-commit): autoupdate" + auto-merge-method: squash diff --git a/.github/workflows/pre-commit-optional.yaml b/.github/workflows/pre-commit-optional.yaml new file mode 100644 index 0000000..3873819 --- /dev/null +++ b/.github/workflows/pre-commit-optional.yaml @@ -0,0 +1,19 @@ +name: pre-commit-optional + +on: + pull_request: + +jobs: + pre-commit-optional: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Run pre-commit + uses: autowarefoundation/autoware-github-actions/pre-commit@v1 + with: + pre-commit-config: .pre-commit-config-optional.yaml + base-branch: origin/${{ github.base_ref }} diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml new file mode 100644 index 0000000..c724885 --- /dev/null +++ b/.github/workflows/pre-commit.yaml @@ -0,0 +1,27 @@ +name: pre-commit + +on: + pull_request: + +jobs: + pre-commit: + if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Check out repository + uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.ref }} + + - name: Run pre-commit + uses: autowarefoundation/autoware-github-actions/pre-commit@v1 + with: + pre-commit-config: .pre-commit-config.yaml + token: ${{ steps.generate-token.outputs.token }} diff --git a/.github/workflows/semantic-pull-request.yaml b/.github/workflows/semantic-pull-request.yaml new file mode 100644 index 0000000..71224c2 --- /dev/null +++ b/.github/workflows/semantic-pull-request.yaml @@ -0,0 +1,12 @@ +name: semantic-pull-request + +on: + pull_request_target: + types: + - opened + - edited + - synchronize + +jobs: + semantic-pull-request: + uses: autowarefoundation/autoware-github-actions/.github/workflows/semantic-pull-request.yaml@v1 diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml new file mode 100644 index 0000000..1fbf2ff --- /dev/null +++ b/.github/workflows/spell-check-differential.yaml @@ -0,0 +1,16 @@ +name: spell-check-differential + +on: + pull_request: + +jobs: + spell-check-differential: + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Run spell-check + uses: autowarefoundation/autoware-github-actions/spell-check@v1 + with: + cspell-json-url: https://raw.githubusercontent.com/tier4/autoware-spell-check-dict/main/.cspell.json diff --git a/.github/workflows/sync-files-reverse-reference.yaml b/.github/workflows/sync-files-reverse-reference.yaml new file mode 100644 index 0000000..8219686 --- /dev/null +++ b/.github/workflows/sync-files-reverse-reference.yaml @@ -0,0 +1,24 @@ +name: sync-files-reverse-reference + +on: + workflow_dispatch: + +jobs: + sync-files-reverse-reference: + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Run sync-files + uses: autowarefoundation/autoware-github-actions/sync-files@v1 + with: + token: ${{ steps.generate-token.outputs.token }} + config: .github/sync-files-reverse-reference.yaml + pr-branch: sync-files-reverse-reference + pr-title: "chore: sync files of reverse references" + pr-commit-message: "chore: sync files of reverse references" diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml new file mode 100644 index 0000000..51e523b --- /dev/null +++ b/.github/workflows/sync-files.yaml @@ -0,0 +1,33 @@ +name: sync-files + +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + check-secret: + uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 + secrets: + secret: ${{ secrets.APP_ID }} + + sync-files: + needs: check-secret + if: ${{ needs.check-secret.outputs.set == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Run sync-files + uses: autowarefoundation/autoware-github-actions/sync-files@v1 + with: + token: ${{ steps.generate-token.outputs.token }} + pr-labels: | + tag:bot + tag:sync-files + auto-merge-method: squash diff --git a/.github/workflows/update-codeowners-from-packages.yaml b/.github/workflows/update-codeowners-from-packages.yaml new file mode 100644 index 0000000..8b3d240 --- /dev/null +++ b/.github/workflows/update-codeowners-from-packages.yaml @@ -0,0 +1,33 @@ +name: update-codeowners-from-packages + +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + check-secret: + uses: autowarefoundation/autoware-github-actions/.github/workflows/check-secret.yaml@v1 + secrets: + secret: ${{ secrets.APP_ID }} + + update-codeowners-from-packages: + needs: check-secret + if: ${{ needs.check-secret.outputs.set == 'true' }} + runs-on: ubuntu-latest + steps: + - name: Generate token + id: generate-token + uses: tibdex/github-app-token@v2 + with: + app_id: ${{ secrets.APP_ID }} + private_key: ${{ secrets.PRIVATE_KEY }} + + - name: Run update-codeowners-from-packages + uses: autowarefoundation/autoware-github-actions/update-codeowners-from-packages@v1 + with: + token: ${{ steps.generate-token.outputs.token }} + pr-labels: | + tag:bot + tag:update-codeowners-from-packages + auto-merge-method: squash diff --git a/.markdown-link-check.json b/.markdown-link-check.json new file mode 100644 index 0000000..c71a3e4 --- /dev/null +++ b/.markdown-link-check.json @@ -0,0 +1,16 @@ +{ + "aliveStatusCodes": [200, 206, 403], + "ignorePatterns": [ + { + "pattern": "^http://localhost" + }, + { + "pattern": "^http://127\\.0\\.0\\.1" + }, + { + "pattern": "^https://github.com/.*/discussions/new" + } + ], + "retryOn429": true, + "retryCount": 10 +} diff --git a/.markdownlint.yaml b/.markdownlint.yaml new file mode 100644 index 0000000..babaaa1 --- /dev/null +++ b/.markdownlint.yaml @@ -0,0 +1,11 @@ +# See https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md for all rules. +default: true +MD013: false +MD024: + siblings_only: true +MD029: + style: ordered +MD033: false +MD041: false +MD046: false +MD049: false diff --git a/.pre-commit-config-optional.yaml b/.pre-commit-config-optional.yaml new file mode 100644 index 0000000..3b43f9a --- /dev/null +++ b/.pre-commit-config-optional.yaml @@ -0,0 +1,6 @@ +repos: + - repo: https://github.com/tcort/markdown-link-check + rev: v3.11.2 + hooks: + - id: markdown-link-check + args: [--quiet, --config=.markdown-link-check.json] diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..a5ca7b6 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,95 @@ +ci: + autofix_commit_msg: "style(pre-commit): autofix" + +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-xml + - id: check-yaml + args: [--unsafe] + - id: detect-private-key + - id: end-of-file-fixer + - id: mixed-line-ending + - id: trailing-whitespace + args: [--markdown-linebreak-ext=md] + + - repo: https://github.com/igorshubovych/markdownlint-cli + rev: v0.33.0 + hooks: + - id: markdownlint + args: [-c, .markdownlint.yaml, --fix] + + - repo: https://github.com/pre-commit/mirrors-prettier + rev: v3.0.0-alpha.6 + hooks: + - id: prettier + + - repo: https://github.com/adrienverge/yamllint + rev: v1.30.0 + hooks: + - id: yamllint + + - repo: https://github.com/tier4/pre-commit-hooks-ros + rev: v0.8.0 + hooks: + - id: flake8-ros + - id: prettier-xacro + - id: prettier-launch-xml + - id: prettier-package-xml + - id: ros-include-guard + - id: sort-package-xml + + - repo: https://github.com/shellcheck-py/shellcheck-py + rev: v0.9.0.2 + hooks: + - id: shellcheck + + - repo: https://github.com/scop/pre-commit-shfmt + rev: v3.6.0-2 + hooks: + - id: shfmt + args: [-w, -s, -i=4] + + - repo: https://github.com/pycqa/isort + rev: 5.12.0 + hooks: + - id: isort + + - repo: https://github.com/psf/black + rev: 23.3.0 + hooks: + - id: black + args: [--line-length=100] + + - repo: https://github.com/pre-commit/mirrors-clang-format + rev: v16.0.0 + hooks: + - id: clang-format + types_or: [c++, c, cuda] + + - repo: https://github.com/cpplint/cpplint + rev: 1.6.1 + hooks: + - id: cpplint + args: [--quiet] + exclude: .cu + + - repo: https://github.com/python-jsonschema/check-jsonschema + rev: 0.23.2 + hooks: + - id: check-metaschema + files: ^.+/schema/.*schema\.json$ + + - repo: local + hooks: + - id: prettier-svg + name: prettier svg + description: Apply Prettier with plugin-xml to svg. + entry: prettier --write --list-different --ignore-unknown --print-width 200 --xml-self-closing-space false --xml-whitespace-sensitivity ignore + language: node + files: .svg$ + additional_dependencies: [prettier@2.7.1, "@prettier/plugin-xml@2.2.0"] diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..a3c34d0 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +*.param.yaml +*.rviz diff --git a/.prettierrc.yaml b/.prettierrc.yaml new file mode 100644 index 0000000..e29bf32 --- /dev/null +++ b/.prettierrc.yaml @@ -0,0 +1,20 @@ +printWidth: 100 +tabWidth: 2 +overrides: + - files: package.xml + options: + printWidth: 1000 + xmlSelfClosingSpace: false + xmlWhitespaceSensitivity: ignore + + - files: "*.launch.xml" + options: + printWidth: 200 + xmlSelfClosingSpace: false + xmlWhitespaceSensitivity: ignore + + - files: "*.xacro" + options: + printWidth: 200 + xmlSelfClosingSpace: false + xmlWhitespaceSensitivity: ignore diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..8dbcfb8 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,132 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +We as members, contributors, and leaders pledge to make participation in our +community a harassment-free experience for everyone, regardless of age, body +size, visible or invisible disability, ethnicity, sex characteristics, gender +identity and expression, level of experience, education, socio-economic status, +nationality, personal appearance, race, caste, color, religion, or sexual +identity and orientation. + +We pledge to act and interact in ways that contribute to an open, welcoming, +diverse, inclusive, and healthy community. + +## Our Standards + +Examples of behavior that contributes to a positive environment for our +community include: + +- Demonstrating empathy and kindness toward other people +- Being respectful of differing opinions, viewpoints, and experiences +- Giving and gracefully accepting constructive feedback +- Accepting responsibility and apologizing to those affected by our mistakes, + and learning from the experience +- Focusing on what is best not just for us as individuals, but for the overall + community + +Examples of unacceptable behavior include: + +- The use of sexualized language or imagery, and sexual attention or advances of + any kind +- Trolling, insulting or derogatory comments, and personal or political attacks +- Public or private harassment +- Publishing others' private information, such as a physical or email address, + without their explicit permission +- Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Enforcement Responsibilities + +Community leaders are responsible for clarifying and enforcing our standards of +acceptable behavior and will take appropriate and fair corrective action in +response to any behavior that they deem inappropriate, threatening, offensive, +or harmful. + +Community leaders have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, and will communicate reasons for moderation +decisions when appropriate. + +## Scope + +This Code of Conduct applies within all community spaces, and also applies when +an individual is officially representing the community in public spaces. +Examples of representing our community include using an official e-mail address, +posting via an official social media account, or acting as an appointed +representative at an online or offline event. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported to the community leaders responsible for enforcement at +. +All complaints will be reviewed and investigated promptly and fairly. + +All community leaders are obligated to respect the privacy and security of the +reporter of any incident. + +## Enforcement Guidelines + +Community leaders will follow these Community Impact Guidelines in determining +the consequences for any action they deem in violation of this Code of Conduct: + +### 1. Correction + +**Community Impact**: Use of inappropriate language or other behavior deemed +unprofessional or unwelcome in the community. + +**Consequence**: A private, written warning from community leaders, providing +clarity around the nature of the violation and an explanation of why the +behavior was inappropriate. A public apology may be requested. + +### 2. Warning + +**Community Impact**: A violation through a single incident or series of +actions. + +**Consequence**: A warning with consequences for continued behavior. No +interaction with the people involved, including unsolicited interaction with +those enforcing the Code of Conduct, for a specified period of time. This +includes avoiding interactions in community spaces as well as external channels +like social media. Violating these terms may lead to a temporary or permanent +ban. + +### 3. Temporary Ban + +**Community Impact**: A serious violation of community standards, including +sustained inappropriate behavior. + +**Consequence**: A temporary ban from any sort of interaction or public +communication with the community for a specified period of time. No public or +private interaction with the people involved, including unsolicited interaction +with those enforcing the Code of Conduct, is allowed during this period. +Violating these terms may lead to a permanent ban. + +### 4. Permanent Ban + +**Community Impact**: Demonstrating a pattern of violation of community +standards, including sustained inappropriate behavior, harassment of an +individual, or aggression toward or disparagement of classes of individuals. + +**Consequence**: A permanent ban from any sort of public interaction within the +community. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], +version 2.1, available at +[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1]. + +Community Impact Guidelines were inspired by +[Mozilla's code of conduct enforcement ladder][mozilla coc]. + +For answers to common questions about this code of conduct, see the FAQ at +[https://www.contributor-covenant.org/faq][faq]. Translations are available at +[https://www.contributor-covenant.org/translations][translations]. + +[homepage]: https://www.contributor-covenant.org +[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html +[mozilla coc]: https://github.com/mozilla/diversity +[faq]: https://www.contributor-covenant.org/faq +[translations]: https://www.contributor-covenant.org/translations diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..22c7ee2 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,3 @@ +# Contributing + +See . diff --git a/DISCLAIMER.md b/DISCLAIMER.md new file mode 100644 index 0000000..1b5a9bb --- /dev/null +++ b/DISCLAIMER.md @@ -0,0 +1,46 @@ +DISCLAIMER + +“Autoware” will be provided by The Autoware Foundation under the Apache License 2.0. +This “DISCLAIMER” will be applied to all users of Autoware (a “User” or “Users”) with +the Apache License 2.0 and Users shall hereby approve and acknowledge all the contents +specified in this disclaimer below and will be deemed to consent to this +disclaimer without any objection upon utilizing or downloading Autoware. + +Disclaimer and Waiver of Warranties + +1. AUTOWARE FOUNDATION MAKES NO REPRESENTATION OR WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, WITH RESPECT TO PROVIDING AUTOWARE (the “Service”) + including but not limited to any representation or warranty (i) of fitness or + suitability for a particular purpose contemplated by the Users, (ii) of the + expected functions, commercial value, accuracy, or usefulness of the Service, + (iii) that the use by the Users of the Service complies with the laws and + regulations applicable to the Users or any internal rules established by + industrial organizations, (iv) that the Service will be free of interruption or + defects, (v) of the non-infringement of any third party's right and (vi) the + accuracy of the content of the Services and the software itself. + +2. The Autoware Foundation shall not be liable for any damage incurred by the + User that are attributable to the Autoware Foundation for any reasons + whatsoever. UNDER NO CIRCUMSTANCES SHALL THE AUTOWARE FOUNDATION BE LIABLE FOR + INCIDENTAL, INDIRECT, SPECIAL OR FUTURE DAMAGES OR LOSS OF PROFITS. + +3. A User shall be entirely responsible for the content posted by the User and + its use of any content of the Service or the Website. If the User is held + responsible in a civil action such as a claim for damages or even in a criminal + case, the Autoware Foundation and member companies, governments and academic & + non-profit organizations and their directors, officers, employees and agents + (collectively, the “Indemnified Parties”) shall be completely discharged from + any rights or assertions the User may have against the Indemnified Parties, or + from any legal action, litigation or similar procedures. + +Indemnity + +A User shall indemnify and hold the Indemnified Parties harmless from any of +their damages, losses, liabilities, costs or expenses (including attorneys' +fees or criminal compensation), or any claims or demands made against the +Indemnified Parties by any third party, due to or arising out of, or in +connection with utilizing Autoware (including the representations and +warranties), the violation of applicable Product Liability Law of each country +(including criminal case) or violation of any applicable laws by the Users, or +the content posted by the User or its use of any content of the Service or the +Website. diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 0000000..8ca2196 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,22 @@ +coverage: + status: + project: + default: + target: auto + patch: + default: + target: auto + +comment: + show_carryforward_flags: true + +flag_management: + default_rules: + carryforward: true + statuses: + - name_prefix: project- + type: project + target: auto + - name_prefix: patch- + type: patch + target: auto From 8bd2e914ce88cb470a001f63456edec09e808057 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 1 May 2024 21:37:03 +0900 Subject: [PATCH 14/20] add maintainer Signed-off-by: Yutaka Kondo --- .github/CODEOWNERS | 4 ++-- autoware_cmake/package.xml | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3be45ab..3058329 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,5 +1,5 @@ ### Copied from .github/CODEOWNERS-manual ### ### Automatically generated from package.xml ### -lanelet2_extension/** kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp masahiro.sakamoto@tier4.jp ryohsuke.mitsudome@tier4.jp takayuki.murooka@tier4.jp yutaka.kondo@tier4.jp -lanelet2_extension_python/** kosuke.takeuchi@tier4.jp mamoru.sobue@tier4.jp masahiro.sakamoto@tier4.jp ryohsuke.mitsudome@tier4.jp takayuki.murooka@tier4.jp yutaka.kondo@tier4.jp +autoware_cmake/** esteve.fernandez@tier4.jp ryohsuke.mitsudome@tier4.jp yutaka.kondo@tier4.jp +autoware_lint_common/** esteve.fernandez@tier4.jp ryohsuke.mitsudome@tier4.jp yutaka.kondo@tier4.jp \ No newline at end of file diff --git a/autoware_cmake/package.xml b/autoware_cmake/package.xml index 9341698..ba0f2bc 100644 --- a/autoware_cmake/package.xml +++ b/autoware_cmake/package.xml @@ -6,6 +6,7 @@ CMake scripts for Autoware Ryohsuke Mitsudome Esteve Fernandez + Yutaka Kondo Apache License 2.0 ament_cmake_auto From b1ad864581d329c8568af170353b2a2e1af7f1d5 Mon Sep 17 00:00:00 2001 From: Takeshi Miura <57553950+1222-takeshi@users.noreply.github.com> Date: Thu, 16 Dec 2021 20:27:03 +0900 Subject: [PATCH 15/20] feat: add autoware_lint_common (#2) Signed-off-by: Kenji Miyake Signed-off-by: 1222-takeshi --- CMakeLists.txt | 11 +++++++++++ README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ package.xml | 25 +++++++++++++++++++++++++ 3 files changed, 80 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 README.md create mode 100644 package.xml diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..a2ee754 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,11 @@ +cmake_minimum_required(VERSION 3.5) + +project(autoware_lint_common NONE) + +find_package(ament_cmake_core REQUIRED) +find_package(ament_cmake_export_dependencies REQUIRED) +find_package(ament_cmake_test REQUIRED) + +ament_package_xml() +ament_export_dependencies(${${PROJECT_NAME}_EXEC_DEPENDS}) +ament_package() diff --git a/README.md b/README.md new file mode 100644 index 0000000..3a9ac7d --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# autoware_lint_common + +A custom version of [ament_lint_common](https://github.com/ament/ament_lint/tree/master/ament_lint_common) for [Autoware](https://www.autoware.org/). + +## Usage + +Add dependencies of `ament_lint_auto` and `autoware_lint_common` to your package as below. + +`package.xml`: + +```xml +ament_lint_auto +autoware_lint_common +``` + +`CMakeLists.txt`: + +```cmake +if(BUILD_TESTING) + find_package(ament_lint_auto REQUIRED) + ament_lint_auto_find_test_dependencies() +endif() +``` + +Then, the following linters will run during `colcon test`. + +- [ament_cmake_copyright](https://github.com/ament/ament_lint/blob/master/ament_cmake_copyright/doc/index.rst) +- [ament_cmake_cppcheck](https://github.com/ament/ament_lint/blob/master/ament_cmake_cppcheck/doc/index.rst) +- [ament_cmake_lint_cmake](https://github.com/ament/ament_lint/blob/master/ament_cmake_lint_cmake/doc/index.rst) +- [ament_cmake_xmllint](https://github.com/ament/ament_lint/blob/master/ament_cmake_xmllint/doc/index.rst) + +## Design + +The original `ament_lint_common` contains other formatters/linters like `ament_cmake_uncrustify`, `ament_cmake_cpplint` and `ament_cmake_flake8`. +However, we don't include them because it's more useful to run them with `pre-commit` as [MoveIt](https://github.com/ros-planning/moveit2) does. + +For example, the benefits are: + +- We can use any version of tools independent of ament's version. +- We can easily integrate into IDE. +- We can easily check all the files in the repository without writing `test_depend` in each package. +- We can run formatters/linters without building, which makes error detection faster. + +Ideally, we think other linters should be moved to `pre-commit` as well, so we'll try to support them in the future. diff --git a/package.xml b/package.xml new file mode 100644 index 0000000..0d46d6e --- /dev/null +++ b/package.xml @@ -0,0 +1,25 @@ + + + + autoware_lint_common + 0.1.0 + The list of commonly used linters in Autoware + Kenji Miyake + Apache License 2.0 + + ament_cmake_core + ament_cmake_export_dependencies + ament_cmake_test + + ament_cmake_core + ament_cmake_test + + ament_cmake_copyright + ament_cmake_cppcheck + ament_cmake_lint_cmake + ament_cmake_xmllint + + + ament_cmake + + From 0529cd922ccbf1b444c0a56b8397b0ce19b1e18f Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Fri, 6 May 2022 02:05:33 +0900 Subject: [PATCH 16/20] feat(autoware_cmake): ignore Boost deprecated messages (#68) Signed-off-by: Kenji Miyake --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a2ee754..473e4d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.5) +cmake_minimum_required(VERSION 3.14) project(autoware_lint_common NONE) From 22e48da15fe21c68ddcae72a16479df534d59612 Mon Sep 17 00:00:00 2001 From: Esteve Fernandez Date: Mon, 23 Jan 2023 16:21:34 +0100 Subject: [PATCH 17/20] chore: added esteve as a maintainer (#146) chore: added esteve as a maintainer Signed-off-by: Esteve Fernandez --- package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/package.xml b/package.xml index 0d46d6e..4a84f61 100644 --- a/package.xml +++ b/package.xml @@ -5,6 +5,7 @@ 0.1.0 The list of commonly used linters in Autoware Kenji Miyake + Esteve Fernandez Apache License 2.0 ament_cmake_core From d9b6f64c4a1637a2ed3ff0223a7ee275c593ff90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=2E=20Fatih=20C=C4=B1r=C4=B1t?= Date: Sat, 4 Feb 2023 09:57:34 +0300 Subject: [PATCH 18/20] docs(autoware_lint_common): add note in the readme (#152) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: M. Fatih Cırıt --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3a9ac7d..89314c9 100644 --- a/README.md +++ b/README.md @@ -22,6 +22,8 @@ if(BUILD_TESTING) endif() ``` +For ROS 2 messages and services, you need to remove the `ADD_LINTER_TESTS` argument in the `rosidl_generate_interfaces()` function in the `CMakelists.txt` file. + Then, the following linters will run during `colcon test`. - [ament_cmake_copyright](https://github.com/ament/ament_lint/blob/master/ament_cmake_copyright/doc/index.rst) From 431d45b131a9a1b111d06dd42fce2232f0508ee4 Mon Sep 17 00:00:00 2001 From: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Date: Mon, 3 Jul 2023 10:37:19 +0900 Subject: [PATCH 19/20] chore: update maintainer (#195) Signed-off-by: Kenji Miyake --- package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.xml b/package.xml index 4a84f61..01bee8b 100644 --- a/package.xml +++ b/package.xml @@ -4,7 +4,7 @@ autoware_lint_common 0.1.0 The list of commonly used linters in Autoware - Kenji Miyake + Ryohsuke Mitsudome Esteve Fernandez Apache License 2.0 From 26055bcff178959a8dbd7df6e42e71b8155b8826 Mon Sep 17 00:00:00 2001 From: Yutaka Kondo Date: Wed, 1 May 2024 21:42:10 +0900 Subject: [PATCH 20/20] move to autoware_lint_common Signed-off-by: Yutaka Kondo --- CMakeLists.txt => autoware_lint_common/CMakeLists.txt | 0 README.md => autoware_lint_common/README.md | 0 package.xml => autoware_lint_common/package.xml | 0 3 files changed, 0 insertions(+), 0 deletions(-) rename CMakeLists.txt => autoware_lint_common/CMakeLists.txt (100%) rename README.md => autoware_lint_common/README.md (100%) rename package.xml => autoware_lint_common/package.xml (100%) diff --git a/CMakeLists.txt b/autoware_lint_common/CMakeLists.txt similarity index 100% rename from CMakeLists.txt rename to autoware_lint_common/CMakeLists.txt diff --git a/README.md b/autoware_lint_common/README.md similarity index 100% rename from README.md rename to autoware_lint_common/README.md diff --git a/package.xml b/autoware_lint_common/package.xml similarity index 100% rename from package.xml rename to autoware_lint_common/package.xml