Skip to content

Commit 4889314

Browse files
authored
Signed-off-by: Kenzo Lobos-Tsunekawa <kenzo.lobos@tier4.jp>
1 parent fbe976a commit 4889314

29 files changed

+867
-0
lines changed

.clang-format

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
2+
Language: Cpp
3+
BasedOnStyle: Google
4+
5+
AccessModifierOffset: -2
6+
AlignAfterOpenBracket: AlwaysBreak
7+
AllowShortFunctionsOnASingleLine: InlineOnly
8+
BraceWrapping:
9+
AfterClass: true
10+
AfterFunction: true
11+
AfterNamespace: true
12+
AfterStruct: true
13+
BreakBeforeBraces: Custom
14+
ColumnLimit: 100
15+
ConstructorInitializerIndentWidth: 0
16+
ContinuationIndentWidth: 2
17+
DerivePointerAlignment: false
18+
PointerAlignment: Middle
19+
ReflowComments: true
20+
IncludeCategories:
21+
# C++ system headers
22+
- Regex: <[a-z_]*>
23+
Priority: 6
24+
CaseSensitive: true
25+
# C system headers
26+
- Regex: <.*\.h>
27+
Priority: 5
28+
CaseSensitive: true
29+
# Boost headers
30+
- Regex: boost/.*
31+
Priority: 4
32+
CaseSensitive: true
33+
# Message headers
34+
- Regex: .*_msgs/.*
35+
Priority: 3
36+
CaseSensitive: true
37+
- Regex: .*_srvs/.*
38+
Priority: 3
39+
CaseSensitive: true
40+
# Other Package headers
41+
- Regex: <.*>
42+
Priority: 2
43+
CaseSensitive: true
44+
# Local package headers
45+
- Regex: '".*"'
46+
Priority: 1
47+
CaseSensitive: true

.cppcheck_suppressions

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
arrayIndexThenCheck
2+
assignBoolToFloat
3+
checkersReport
4+
constParameterPointer
5+
constParameterReference
6+
constStatement
7+
constVariable
8+
constVariablePointer
9+
constVariableReference
10+
containerOutOfBounds
11+
cstyleCast
12+
ctuOneDefinitionRuleViolation
13+
current_deleted_index
14+
duplicateAssignExpression
15+
duplicateBranch
16+
duplicateBreak
17+
duplicateCondition
18+
duplicateExpression
19+
funcArgNamesDifferent
20+
functionConst
21+
functionStatic
22+
invalidPointerCast
23+
knownConditionTrueFalse
24+
missingInclude
25+
missingIncludeSystem
26+
multiCondition
27+
noConstructor
28+
noExplicitConstructor
29+
noValidConfiguration
30+
obstacle_cruise_planner
31+
passedByValue
32+
preprocessorErrorDirective
33+
redundantAssignment
34+
redundantContinue
35+
redundantIfRemove
36+
redundantInitialization
37+
returnByReference
38+
selfAssignment
39+
shadowArgument
40+
shadowFunction
41+
shadowVariable
42+
stlFindInsert
43+
syntaxError
44+
uninitMemberVar
45+
unknownMacro
46+
unmatchedSuppression
47+
unpreciseMathCall
48+
unreadVariable
49+
unsignedLessThanZero
50+
unusedFunction
51+
unusedScopedObject
52+
unusedStructMember
53+
unusedVariable
54+
useInitializationList
55+
useStlAlgorithm
56+
uselessCallsSubstr
57+
uselessOverride
58+
variableScope
59+
virtualCallInConstructor

.cspell.json

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"ignorePaths": [".cppcheck_suppressions"],
3+
"ignoreRegExpList": [],
4+
"words": []
5+
}

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
indent_size = 4
13+
trim_trailing_whitespace = false
14+
15+
[*.py]
16+
indent_size = 4

.github/PULL_REQUEST_TEMPLATE.md

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
## PR Type
2+
3+
<!-- Select one and remove others. If an appropriate one is not listed, please write by yourself. -->
4+
5+
- New Feature
6+
- Improvement
7+
- Bug Fix
8+
9+
## Related Links
10+
11+
<!-- Please write related links to GitHub/Jira/Slack/etc. -->
12+
13+
## Description
14+
15+
<!-- Describe what this PR changes. -->
16+
17+
## Review Procedure
18+
19+
<!-- Explain how to review this PR. -->
20+
21+
## Remarks
22+
23+
<!-- Write remarks as you like if you need them. -->
24+
25+
## Pre-Review Checklist for the PR Author
26+
27+
**PR Author should check the checkboxes below when creating the PR.**
28+
29+
- [ ] Assign PR to reviewer
30+
31+
## Checklist for the PR Reviewer
32+
33+
**Reviewers should check the checkboxes below before approval.**
34+
35+
- [ ] Commits are properly organized and messages are according to the guideline
36+
- [ ] (Optional) Unit tests have been written for new behavior
37+
- [ ] PR title describes the changes
38+
39+
## Post-Review Checklist for the PR Author
40+
41+
**PR Author should check the checkboxes below before merging.**
42+
43+
- [ ] All open points are addressed and tracked via issues or tickets
44+
45+
## CI Checks
46+
47+
- **Build and test for PR**: Required to pass before the merge.

.github/dependabot.yaml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: github-actions
4+
directory: /
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 1
8+
labels:
9+
- bot
10+
- github-actions

.github/sync-files.yaml

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
- repository: autowarefoundation/autoware
2+
files:
3+
- source: .github/dependabot.yaml
4+
- source: .github/workflows/pre-commit.yaml
5+
- source: .github/workflows/pre-commit-optional.yaml
6+
- source: .github/workflows/semantic-pull-request.yaml
7+
- source: .github/workflows/sync-files.yaml
8+
- source: .clang-format
9+
- source: .markdown-link-check.json
10+
- source: .markdownlint.yaml
11+
- source: .pre-commit-config-optional.yaml
12+
- source: .prettierignore
13+
- source: .prettierrc.yaml
14+
- source: .yamllint.yaml
15+
- source: CPPLINT.cfg
16+
- source: setup.cfg
17+
18+
- repository: autowarefoundation/autoware_common
19+
files:
20+
- source: .github/workflows/build-and-test.yaml
21+
- source: .github/workflows/build-and-test-differential.yaml
22+
- source: .github/workflows/cancel-previous-workflows.yaml
23+
24+
- repository: autowarefoundation/autoware.universe
25+
files:
26+
- source: .github/workflows/cppcheck-all.yaml
27+
- source: .github/workflows/cppcheck-differential.yaml
28+
- source: .github/workflows/spell-check-partial.yaml
29+
- source: .cppcheck_suppressions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
name: build-and-test-differential
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
build-and-test-differential:
8+
runs-on: ubuntu-latest
9+
container: ${{ matrix.container }}
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
rosdistro:
14+
- humble
15+
include:
16+
- rosdistro: humble
17+
container: ros:humble
18+
build-depends-repos: build_depends.repos
19+
steps:
20+
- name: Check out repository
21+
uses: actions/checkout@v3
22+
with:
23+
fetch-depth: 0
24+
25+
- name: Remove exec_depend
26+
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
27+
28+
- name: Get modified packages
29+
id: get-modified-packages
30+
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1
31+
32+
- name: Build
33+
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
34+
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
35+
with:
36+
rosdistro: ${{ matrix.rosdistro }}
37+
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
38+
build-depends-repos: ${{ matrix.build-depends-repos }}
39+
40+
- name: Test
41+
id: test
42+
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
43+
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
44+
with:
45+
rosdistro: ${{ matrix.rosdistro }}
46+
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
47+
build-depends-repos: ${{ matrix.build-depends-repos }}
48+
49+
- name: Upload coverage to CodeCov
50+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
51+
uses: codecov/codecov-action@v3
52+
with:
53+
files: ${{ steps.test.outputs.coverage-report-files }}
54+
fail_ci_if_error: false
55+
verbose: true
56+
flags: differential
57+
58+
clang-tidy-differential:
59+
runs-on: ubuntu-latest
60+
container: ros:humble
61+
needs: build-and-test-differential
62+
steps:
63+
- name: Check out repository
64+
uses: actions/checkout@v3
65+
with:
66+
fetch-depth: 0
67+
68+
- name: Remove exec_depend
69+
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
70+
71+
- name: Get modified packages
72+
id: get-modified-packages
73+
uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1
74+
75+
- name: Get modified files
76+
id: get-modified-files
77+
uses: tj-actions/changed-files@v44
78+
with:
79+
files: |
80+
**/*.cpp
81+
**/*.hpp
82+
83+
- name: Run clang-tidy
84+
if: ${{ steps.get-modified-files.outputs.all_changed_files != '' }}
85+
uses: autowarefoundation/autoware-github-actions/clang-tidy@v1
86+
with:
87+
rosdistro: humble
88+
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
89+
target-files: ${{ steps.get-modified-files.outputs.all_changed_files }}
90+
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy
91+
build-depends-repos: build_depends.repos

.github/workflows/build-and-test.yaml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: build-and-test
2+
3+
on:
4+
push:
5+
schedule:
6+
- cron: 0 0 * * *
7+
workflow_dispatch:
8+
9+
jobs:
10+
build-and-test:
11+
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
12+
runs-on: ubuntu-latest
13+
container: ${{ matrix.container }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
rosdistro:
18+
- humble
19+
include:
20+
- rosdistro: humble
21+
container: ros:humble
22+
build-depends-repos: build_depends.repos
23+
steps:
24+
- name: Check out repository
25+
uses: actions/checkout@v3
26+
27+
- name: Remove exec_depend
28+
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
29+
30+
- name: Get self packages
31+
id: get-self-packages
32+
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1
33+
34+
- name: Build
35+
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
36+
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
37+
with:
38+
rosdistro: ${{ matrix.rosdistro }}
39+
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
40+
build-depends-repos: ${{ matrix.build-depends-repos }}
41+
42+
- name: Test
43+
if: ${{ steps.get-self-packages.outputs.self-packages != '' }}
44+
id: test
45+
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
46+
with:
47+
rosdistro: ${{ matrix.rosdistro }}
48+
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
49+
build-depends-repos: ${{ matrix.build-depends-repos }}
50+
51+
- name: Upload coverage to CodeCov
52+
if: ${{ steps.test.outputs.coverage-report-files != '' }}
53+
uses: codecov/codecov-action@v3
54+
with:
55+
files: ${{ steps.test.outputs.coverage-report-files }}
56+
fail_ci_if_error: false
57+
verbose: true
58+
flags: total
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: cancel-previous-workflows
2+
3+
on:
4+
pull_request_target:
5+
6+
jobs:
7+
cancel-previous-workflows:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Cancel previous runs
11+
uses: styfle/cancel-workflow-action@0.11.0
12+
with:
13+
workflow_id: all
14+
all_but_latest: true

0 commit comments

Comments
 (0)