Skip to content

Commit

Permalink
Merge branch 'main' into t2_branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Ericpotato authored Nov 18, 2024
2 parents 4dc004a + 3591106 commit 28e29e5
Show file tree
Hide file tree
Showing 20 changed files with 1,002 additions and 672 deletions.
3 changes: 3 additions & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,9 @@ WarningsAsErrors: "

HeaderFilterRegex: ^(?!\/usr)(?!\/opt)

ExtraArgs:
- -std=c++17

FormatStyle: none

CheckOptions:
Expand Down
3 changes: 3 additions & 0 deletions .clang-tidy-ci
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,9 @@ WarningsAsErrors: "

HeaderFilterRegex: ^(?!\/usr)(?!\/opt)

ExtraArgs:
- -std=c++17

CheckOptions:
- key: bugprone-argument-comment.CommentBoolLiterals
value: "0"
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
# Ignore Docker files
docker
!docker/etc
!docker/scripts

# Ignore a part of files under src
src/**/.*
Expand Down
147 changes: 147 additions & 0 deletions .github/actions/docker-build-and-push-cuda/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
name: docker-build-and-push-cuda
description: Composite action to build and push CUDA images to registry.

inputs:
platform:
description: Target platform.
required: true
target-image:
description: Target docker image name in the registry.
required: true
build-args:
description: Additional build args.
required: false

runs:
using: composite
steps:
- name: Install jq and vcstool
run: |
sudo apt-get -y update
sudo apt-get -y install jq python3-pip
pip install --no-cache-dir vcstool
shell: bash

- name: Run vcs import
run: |
mkdir src
vcs import src < autoware.repos
shell: bash

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Restore ccache
uses: actions/cache/restore@v4
with:
path: |
root-ccache
key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }}
restore-keys: |
ccache-${{ inputs.platform }}-
- name: Restore apt-get
uses: actions/cache/restore@v4
with:
path: |
var-cache-apt
key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }}
restore-keys: |
apt-get-${{ inputs.platform }}-
- name: Inject cache into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"root-ccache": "/root/.ccache",
"var-cache-apt": "/var/cache/apt"
}
skip-extraction: true

- name: Get current date
id: date
run: echo "date=$(date +'%Y%m%d')" >> $GITHUB_OUTPUT
shell: bash

- name: Docker meta for autoware:base-cuda
id: meta-base-cuda
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=base-cuda-${{ inputs.platform }}
type=raw,value=base-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-base-cuda
flavor: |
latest=false
- name: Docker meta for autoware:universe-sensing-perception-devel-cuda
id: meta-universe-sensing-perception-devel-cuda
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-sensing-perception-devel-cuda-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-sensing-perception-devel-cuda
flavor: |
latest=false
- name: Docker meta for autoware:universe-sensing-perception-cuda
id: meta-universe-sensing-perception-cuda
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-sensing-perception-cuda-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-sensing-perception-cuda
flavor: |
latest=false
- name: Docker meta for autoware:universe-devel-cuda
id: meta-universe-devel-cuda
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-devel-cuda-${{ inputs.platform }}
type=raw,value=universe-devel-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-devel-cuda
flavor: |
latest=false
- name: Docker meta for autoware:universe-cuda
id: meta-universe-cuda
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-cuda-${{ inputs.platform }}
type=raw,value=universe-cuda-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-cuda
flavor: |
latest=auto
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}

- name: Build and Push to GitHub Container Registry
uses: docker/bake-action@v5
with:
push: true
files: |
docker/docker-bake-cuda.hcl
${{ steps.meta-base-cuda.outputs.bake-file }}
${{ steps.meta-universe-sensing-perception-devel-cuda.outputs.bake-file }}
${{ steps.meta-universe-sensing-perception-cuda.outputs.bake-file }}
${{ steps.meta-universe-devel-cuda.outputs.bake-file }}
${{ steps.meta-universe-cuda.outputs.bake-file }}
provenance: false
set: |
${{ inputs.build-args }}
94 changes: 43 additions & 51 deletions .github/actions/docker-build-and-push/action.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
name: docker-build-and-push
description: ""
description: Composite action to build and push non CUDA images to registry.

inputs:
name:
description: ""
required: true
platform:
description: ""
description: Target platform.
required: true
bake-target:
description: ""
target-image:
description: Target docker image name in the registry.
required: true
build-args:
description: ""
required: false
tag-suffix:
description: ""
description: Additional build args.
required: false

runs:
Expand All @@ -42,19 +36,17 @@ runs:
with:
path: |
root-ccache
key: ccache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/*.cpp') }}
key: ccache-${{ inputs.platform }}-${{ hashFiles('src/**/*.cpp') }}
restore-keys: |
ccache-${{ inputs.platform }}-${{ inputs.name }}-
ccache-${{ inputs.platform }}-
- name: Restore apt-get
uses: actions/cache/restore@v4
with:
path: |
var-cache-apt
key: apt-get-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('src/**/package.xml') }}
key: apt-get-${{ inputs.platform }}-${{ hashFiles('src/**/package.xml') }}
restore-keys: |
apt-get-${{ inputs.platform }}-${{ inputs.name }}-
apt-get-${{ inputs.platform }}-
- name: Inject cache into docker
Expand All @@ -76,10 +68,10 @@ runs:
id: meta-base
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=base${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=base${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=base-${{ inputs.platform }}
type=raw,value=base-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-base
flavor: |
latest=false
Expand All @@ -88,10 +80,10 @@ runs:
id: meta-core-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=core-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=core-devel-${{ inputs.platform }}
type=raw,value=core-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-core-devel
flavor: |
latest=false
Expand All @@ -100,10 +92,10 @@ runs:
id: meta-universe-sensing-perception-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-devel-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-sensing-perception-devel
flavor: |
latest=false
Expand All @@ -112,10 +104,10 @@ runs:
id: meta-universe-sensing-perception
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-sensing-perception${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-${{ inputs.platform }}
type=raw,value=universe-sensing-perception-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-sensing-perception
flavor: |
latest=false
Expand All @@ -124,10 +116,10 @@ runs:
id: meta-universe-localization-mapping-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-devel-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-localization-mapping-devel
flavor: |
latest=false
Expand All @@ -136,10 +128,10 @@ runs:
id: meta-universe-localization-mapping
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-localization-mapping${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-${{ inputs.platform }}
type=raw,value=universe-localization-mapping-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-localization-mapping
flavor: |
latest=false
Expand All @@ -148,10 +140,10 @@ runs:
id: meta-universe-planning-control-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-planning-control-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-planning-control-devel-${{ inputs.platform }}
type=raw,value=universe-planning-control-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-planning-control-devel
flavor: |
latest=false
Expand All @@ -160,10 +152,10 @@ runs:
id: meta-universe-planning-control
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-planning-control${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-planning-control-${{ inputs.platform }}
type=raw,value=universe-planning-control-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-planning-control
flavor: |
latest=false
Expand All @@ -172,10 +164,10 @@ runs:
id: meta-universe-vehicle-system-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-devel-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-vehicle-system-devel
flavor: |
latest=false
Expand All @@ -184,10 +176,10 @@ runs:
id: meta-universe-vehicle-system
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-vehicle-system${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-vehicle-system${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-${{ inputs.platform }}
type=raw,value=universe-vehicle-system-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-vehicle-system
flavor: |
latest=false
Expand All @@ -196,10 +188,10 @@ runs:
id: meta-universe-devel
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe-devel${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-devel-${{ inputs.platform }}
type=raw,value=universe-devel-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe-devel
flavor: |
latest=false
Expand All @@ -208,10 +200,10 @@ runs:
id: meta-universe
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.target-image }}
tags: |
type=raw,value=universe${{ inputs.tag-suffix }}-${{ inputs.platform }}
type=raw,value=universe${{ inputs.tag-suffix }}-${{ steps.date.outputs.date }}-${{ inputs.platform }}
type=raw,value=universe-${{ inputs.platform }}
type=raw,value=universe-${{ steps.date.outputs.date }}-${{ inputs.platform }}
bake-target: docker-metadata-action-universe
flavor: |
latest=auto
Expand Down
Loading

0 comments on commit 28e29e5

Please sign in to comment.