Skip to content

Commit

Permalink
Merge branch 'main' into add-autoware-component-interface-specs
Browse files Browse the repository at this point in the history
  • Loading branch information
mitsudome-r authored Jan 22, 2025
2 parents 0de2185 + fdc7c2d commit 043adec
Show file tree
Hide file tree
Showing 72 changed files with 6,169 additions and 169 deletions.
3 changes: 3 additions & 0 deletions .cppcheck_suppressions
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
*:*/test/*

missingInclude
missingIncludeSystem
unmatchedSuppression
unusedFunction
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
### Automatically generated from package.xml ###
common/autoware_geography_utils/** [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
common/autoware_node/** [email protected] @autowarefoundation/autoware-core-global-codeowners
common/autoware_point_types/** [email protected] [email protected] [email protected] @autowarefoundation/autoware-core-global-codeowners
demos/autoware_test_node/** [email protected] @autowarefoundation/autoware-core-global-codeowners

### Copied from .github/CODEOWNERS-manual ###
.github/** @autowarefoundation/autoware-core-global-codeowners
1 change: 1 addition & 0 deletions .github/CODEOWNERS-manual
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.github/** @autowarefoundation/autoware-core-global-codeowners
17 changes: 0 additions & 17 deletions .github/actions/build-and-test-differential/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ inputs:
rosdistro:
description: ""
required: true
container:
description: ""
required: true
container-suffix:
description: ""
required: true
runner:
description: ""
required: true
Expand Down Expand Up @@ -63,24 +57,13 @@ runs:
ccache --zero-stats
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
Expand Down
37 changes: 7 additions & 30 deletions .github/workflows/build-and-test-daily.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,8 @@ on:

jobs:
build-and-test-daily:
runs-on: [self-hosted, linux, X64, gpu]
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -37,37 +25,26 @@ jobs:
id: get-self-packages
uses: autowarefoundation/autoware-github-actions/get-self-packages@v1

- 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-self-packages.outputs.self-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
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: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
build-depends-repos: build_depends.repos

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
Expand Down
51 changes: 11 additions & 40 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,39 +17,16 @@ env:
CXX: /usr/lib/ccache/g++

jobs:
make-sure-label-is-present:
uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1
require-label:
uses: autowarefoundation/autoware-github-actions/.github/workflows/require-label.yaml@v1
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
label: run:build-and-test-differential

build-and-test-differential:
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 }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- ""
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
- container-suffix: -cuda
runner: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
build-pre-command: taskset --cpu-list 0-6
- container-suffix: ""
runner: ubuntu-latest
build-pre-command: ""
needs: require-label
if: ${{ needs.require-label.outputs.result == 'true' }}
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
Expand All @@ -62,21 +39,16 @@ jobs:
fetch-depth: ${{ env.PR_FETCH_DEPTH }}

- 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 }}
container: ${{ matrix.container }}
container-suffix: ${{ matrix.container-suffix }}
runner: ${{ matrix.runner }}
build-depends-repos: ${{ matrix.build-depends-repos }}
build-pre-command: ${{ matrix.build-pre-command }}
rosdistro: humble
build-depends-repos: build_depends.repos
codecov-token: ${{ secrets.CODECOV_TOKEN }}

clang-tidy-differential:
needs: build-and-test-differential
runs-on: ubuntu-22.04
container: ghcr.io/autowarefoundation/autoware:universe-devel-cuda
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
Expand Down Expand Up @@ -112,7 +84,6 @@ jobs:
target-files: ${{ steps.get-changed-files.outputs.changed-files }}
clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy-ci
build-depends-repos: build_depends.repos
cache-key-element: cuda

- name: Show disk space after the tasks
run: df -h
50 changes: 13 additions & 37 deletions .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,20 @@ on:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
cancel-in-progress: true
# Ensures sequential execution of this workflow
group: ${{ github.workflow }}
cancel-in-progress: false

env:
CC: /usr/lib/ccache/gcc
CXX: /usr/lib/ccache/g++

jobs:
build-and-test:
runs-on: codebuild-autoware-us-east-1-${{ github.run_id }}-${{ github.run_attempt }}-ubuntu-7.0-large
container: ${{ matrix.container }}${{ matrix.container-suffix }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
container-suffix:
- -cuda
include:
- rosdistro: humble
container: ghcr.io/autowarefoundation/autoware:universe-devel
build-depends-repos: build_depends.repos
runs-on: ubuntu-24.04
container: ghcr.io/autowarefoundation/autoware:core-devel
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -59,9 +48,9 @@ jobs:
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
key: ccache-main-${{ runner.arch }}-humble-${{ github.sha }}
restore-keys: |
ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-
ccache-main-${{ runner.arch }}-humble-
- name: Limit ccache size
run: |
Expand All @@ -75,51 +64,38 @@ jobs:
ccache --zero-stats
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-self-packages.outputs.self-packages != '' }}
uses: autowarefoundation/autoware-github-actions/colcon-build@v1
with:
rosdistro: ${{ matrix.rosdistro }}
rosdistro: humble
target-packages: ${{ steps.get-self-packages.outputs.self-packages }}
build-depends-repos: ${{ matrix.build-depends-repos }}
cache-key-element: ${{ env.BUILD_TYPE_CUDA_STATE }}
build-depends-repos: build_depends.repos
build-pre-command: taskset --cpu-list 0-6

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

# Only keep save the -cuda version because cuda packages covers non-cuda packages too
- name: Push the ccache cache
if: matrix.container-suffix == '-cuda'
uses: actions/cache/save@v4
with:
path: |
/root/.ccache
key: ccache-main-${{ runner.arch }}-${{ matrix.rosdistro }}-${{ github.sha }}
key: ccache-main-${{ runner.arch }}-humble-${{ github.sha }}

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

- name: Upload coverage to CodeCov
if: ${{ steps.test.outputs.coverage-report-files != '' }}
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
files: ${{ steps.test.outputs.coverage-report-files }}
fail_ci_if_error: false
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/bump-version-pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: bump-version-pr

on:
workflow_dispatch:
inputs:
version_part:
description: Which part of the version number to bump?
required: true
default: minor
type: choice
options:
- major
- minor
- patch

jobs:
bump-version-pr:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
ref: humble
fetch-depth: 0

- name: Generate token
id: generate-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.PRIVATE_KEY }}

- name: Set git config
uses: autowarefoundation/autoware-github-actions/set-git-config@v1
with:
token: ${{ steps.generate-token.outputs.token }}

- name: Setup Python 3.x
uses: actions/setup-python@v5
with:
python-version: 3.x

- name: Install dependencies
run: pip3 install -U catkin_tools
shell: bash

- name: Bump version from humble branch
id: bump-version-from-humble-branch
run: |
git checkout -b tmp/bot/bump_version_base
git fetch origin main
git merge origin/main
catkin_generate_changelog -y
git add *
git commit -m "update CHANGELOG.rst"
catkin_prepare_release -y --bump ${{ inputs.version_part }} --no-push
version=$(git describe --tags)
echo "version=${version}" >> $GITHUB_OUTPUT
shell: bash

- name: Create target branch
run: |
git checkout origin/main
git checkout -b chore/bot/bump_version
git merge tmp/bot/bump_version_base
git push origin chore/bot/bump_version --force
shell: bash

- name: Create PR
id: create-pr
run: >
gh
pr
create
--base=main
--body="Bump version to ${{ steps.bump-version-from-humble-branch.outputs.version }}"
--title="chore: bump version to ${{ steps.bump-version-from-humble-branch.outputs.version }}"
--head=chore/bot/bump_version
env:
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
Loading

0 comments on commit 043adec

Please sign in to comment.