Skip to content

Commit

Permalink
Merge pull request #1534 from tier4/beta-to-tier4-main-sync
Browse files Browse the repository at this point in the history
chore: sync beta branch beta/v0.34 with tier4/main
  • Loading branch information
tier4-autoware-public-bot[bot] authored Sep 11, 2024
2 parents 8b1902a + 085040f commit 8f3ef69
Show file tree
Hide file tree
Showing 701 changed files with 20,224 additions and 10,745 deletions.
2 changes: 0 additions & 2 deletions .cppcheck_suppressions
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
checkersReport
missingInclude
missingIncludeSystem
noConstructor
unknownMacro
unmatchedSuppression
unreadVariable
unusedFunction
useInitializationList
useStlAlgorithm
4 changes: 2 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"ignorePaths": [
"perception/bytetrack/lib/**",
"planning/behavior_velocity_intersection_module/scripts/**"
"perception/autoware_bytetrack/lib/**",
"planning/behavior_velocity_planner/autoware_behavior_velocity_intersection_module/scripts/**"
],
"ignoreRegExpList": [],
"words": ["dltype", "tvmgen", "fromarray"]
Expand Down
35 changes: 18 additions & 17 deletions .github/CODEOWNERS

Large diffs are not rendered by default.

109 changes: 109 additions & 0 deletions .github/actions/build-and-test-differential/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: build-and-test-differential
description: ""

inputs:
rosdistro:
description: ""
required: true
container:
description: ""
required: true
container-suffix:
description: ""
required: true
runner:
description: ""
required: true
build-depends-repos:
description: ""
required: true
build-pre-command:
description: ""
required: true
codecov-token:
description: ""
required: true

runs:
using: composite
steps:
- name: Show disk space before the tasks
run: df -h
shell: bash

- name: Show machine specs
run: lscpu && free -h
shell: bash

- 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: Create ccache directory
run: |
mkdir -p ${CCACHE_DIR}
du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Attempt to restore ccache
uses: actions/cache/restore@v4
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ inputs.rosdistro }}-${{ github.event.pull_request.base.sha }}
restore-keys: |
ccache-main-${{ runner.arch }}-${{ inputs.rosdistro }}-
- name: Show ccache stats before build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
if [[ "${{ inputs.container-suffix }}" == "-cuda" ]]; then
build_type_cuda_state=cuda
fi
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
shell: bash

- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ inputs.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: ${{ inputs.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-pre-command: ${{ inputs.build-pre-command }}

- name: Show ccache stats after build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Test
id: test
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-test@v1
with:
rosdistro: ${{ inputs.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
build-depends-repos: ${{ inputs.build-depends-repos }}

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v4
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
verbose: true
flags: differential
token: ${{ inputs.codecov-token }}

- name: Show disk space after the tasks
run: df -h
shell: bash
File renamed without changes.
88 changes: 14 additions & 74 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,13 @@ jobs:
with:
label: tag:run-build-and-test-differential

make-sure-require-cuda-label-is-present:
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
with:
label: tag:require-cuda-build-and-test

build-and-test-differential:
needs: make-sure-label-is-present
needs: [make-sure-label-is-present, make-sure-require-cuda-label-is-present]
if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }}
runs-on: ${{ matrix.runner }}
container: ${{ matrix.container }}${{ matrix.container-suffix }}
Expand All @@ -48,90 +53,25 @@ jobs:
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
shell: bash

- name: Checkout PR branch and all PR commits
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- name: Show disk space before the tasks
run: df -h

- name: Show machine specs
run: lscpu && free -h

- 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: Create ccache directory
run: |
mkdir -p ${CCACHE_DIR}
du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Attempt to restore ccache
uses: actions/cache/restore@v4
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.event.pull_request.base.sha }}
restore-keys: |
ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-
- name: Show ccache stats before build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- name: Export CUDA state as a variable for adding to cache key
run: |
build_type_cuda_state=nocuda
if [[ "${{ matrix.container-suffix }}" == "-cuda" ]]; then
build_type_cuda_state=cuda
fi
echo "BUILD_TYPE_CUDA_STATE=$build_type_cuda_state" >> "${GITHUB_ENV}"
echo "::notice::BUILD_TYPE_CUDA_STATE=$build_type_cuda_state"
shell: bash

- name: Build
if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
- name: Run build-and-test-differential action
if: ${{ !(matrix.container-suffix == '-cuda') || needs.make-sure-require-cuda-label-is-present.outputs.result == 'true' }}
uses: ./.github/actions/build-and-test-differential
with:
rosdistro: ${{ matrix.rosdistro }}
target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }}
container: ${{ matrix.container }}
container-suffix: ${{ matrix.container-suffix }}
runner: ${{ matrix.runner }}
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-pre-command: ${{ matrix.build-pre-command }}

- name: Show ccache stats after build
run: du -sh ${CCACHE_DIR} && ccache -s
shell: bash

- 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@v4
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
verbose: true
flags: differential
token: ${{ secrets.CODECOV_TOKEN }}

- name: Show disk space after the tasks
run: df -h
codecov-token: ${{ secrets.CODECOV_TOKEN }}

clang-tidy-differential:
needs: build-and-test-differential
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: cppcheck-daily
name: cppcheck-weekly

on:
schedule:
- cron: 0 0 * * *
- cron: 0 0 * * 1
workflow_dispatch:

jobs:
cppcheck-daily:
cppcheck-weekly:
runs-on: ubuntu-latest

steps:
Expand Down
30 changes: 30 additions & 0 deletions common/autoware_motion_utils/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
cmake_minimum_required(VERSION 3.14)
project(autoware_motion_utils)

option(BUILD_EXAMPLES "Build examples" OFF)

find_package(autoware_cmake REQUIRED)
autoware_package()

find_package(Boost REQUIRED)
find_package(fmt REQUIRED)

ament_auto_add_library(autoware_motion_utils SHARED
DIRECTORY src
)

target_link_libraries(autoware_motion_utils
fmt::fmt
)

if(BUILD_TESTING)
find_package(ament_cmake_ros REQUIRED)

Expand All @@ -22,4 +29,27 @@ if(BUILD_TESTING)
)
endif()

if(BUILD_EXAMPLES)
message(STATUS "Building examples")

include(FetchContent)
fetchcontent_declare(
matplotlibcpp17
GIT_REPOSITORY https://github.com/soblin/matplotlibcpp17.git
GIT_TAG master
)
fetchcontent_makeavailable(matplotlibcpp17)

file(GLOB_RECURSE example_files examples/*.cpp)

foreach(example_file ${example_files})
get_filename_component(example_name ${example_file} NAME_WE)
ament_auto_add_executable(${example_name} ${example_file})
target_link_libraries(${example_name}
autoware_motion_utils
matplotlibcpp17::matplotlibcpp17
)
endforeach()
endif()

ament_auto_package()
Loading

0 comments on commit 8f3ef69

Please sign in to comment.