Skip to content

Commit aac47a0

Browse files
authored
Merge branch 'main' into rolling
2 parents 1a0d6f0 + 36a88ee commit aac47a0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+1315
-678
lines changed

.clang-tidy-ci

+480
Large diffs are not rendered by default.

.devcontainer/base/Dockerfile .devcontainer/Dockerfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
FROM ghcr.io/autowarefoundation/autoware-openadk:latest-devel
1+
# hadolint global ignore=DL3006
2+
ARG BASE_IMAGE
3+
FROM $BASE_IMAGE
24

35
ENV SHELL /bin/bash
46

.devcontainer/base/devcontainer.json

+2-4
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
11
{
22
"name": "Autoware",
33
"build": {
4-
"dockerfile": "Dockerfile"
4+
"dockerfile": "../Dockerfile",
5+
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel" }
56
},
67
"remoteUser": "autoware",
7-
"hostRequirements": {
8-
"gpu": true
9-
},
108
"runArgs": [
119
"--cap-add=SYS_PTRACE",
1210
"--security-opt",

.devcontainer/cuda/Dockerfile

-14
This file was deleted.

.devcontainer/cuda/devcontainer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"name": "Autoware-cuda",
33
"build": {
4-
"dockerfile": "Dockerfile"
4+
"dockerfile": "../Dockerfile",
5+
"args": { "BASE_IMAGE": "ghcr.io/autowarefoundation/autoware:latest-devel-cuda" }
56
},
67
"remoteUser": "autoware",
78
"hostRequirements": {

.github/CODEOWNERS

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
* ryohsuke.mitsudome@tier4.jp mfc@leodrive.ai
2+
3+
.devcontainer/** oguzkaganozt@gmail.com yutaka.kondo@tier4.jp
4+
.github/** oguzkaganozt@gmail.com yutaka.kondo@tier4.jp
5+
ansible/** oguzkaganozt@gmail.com yutaka.kondo@tier4.jp
6+
docker/** oguzkaganozt@gmail.com yutaka.kondo@tier4.jp
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
body:
2+
- type: checkboxes
3+
attributes:
4+
label: Code of Conduct
5+
options:
6+
- label: I have read [CODE OF CONDUCT](https://github.com/autowarefoundation/autoware/blob/main/CODE_OF_CONDUCT.md) and [Support Guidelines](https://autowarefoundation.github.io/autoware-documentation/main/support/support-guidelines/#github-discussions) before creating this Discussion post.
7+
required: true
8+
- type: textarea
9+
attributes:
10+
label: Contents
11+
description: Write your contents here
12+
validations:
13+
required: true

.github/PULL_REQUEST_TEMPLATE/small-change.md

+4
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ Not applicable.
1515

1616
Not applicable.
1717

18+
## Interface changes
19+
20+
<!-- Describe any changed interfaces, such as topics, services, or parameters, including debugging interfaces -->
21+
1822
## Pre-review checklist for the PR author
1923

2024
The PR author **must** check the checkboxes below when creating the PR.

.github/PULL_REQUEST_TEMPLATE/standard-change.md

+13
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,19 @@
1818

1919
<!-- Describe any changed interfaces, such as topics, services, or parameters. -->
2020

21+
### ROS Topic Changes
22+
23+
<!-- | Topic Name | Type | Direction | Update Description | -->
24+
<!-- | ---------------- | ------------------- | --------- | ------------------------------------------------------------- | -->
25+
<!-- | `/example_topic` | `std_msgs/String` | Subscribe | Description of what the topic is used for in the system | -->
26+
<!-- | `/another_topic` | `sensor_msgs/Image` | Publish | Also explain if it is added / modified / deleted with the PR | -->
27+
28+
### ROS Parameter Changes
29+
30+
<!-- | Parameter Name | Default Value | Update Description | -->
31+
<!-- | -------------------- | ------------- | --------------------------------------------------- | -->
32+
<!-- | `example_parameters` | `1.0` | Describe the parameter and also explain the updates | -->
33+
2134
## Effects on system behavior
2235

2336
<!-- Describe how this PR affects the system behavior. -->

.github/actions/docker-build-and-push/action.yaml

+37-81
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,17 @@ inputs:
2222
runs:
2323
using: composite
2424
steps:
25-
- name: Setup Docker Buildx
26-
uses: docker/setup-buildx-action@v2
27-
28-
- name: Install jq
25+
- name: Install jq and vcstool
2926
run: |
3027
sudo apt-get -y update
31-
sudo apt-get -y install jq
28+
sudo apt-get -y install jq python3-pip
29+
pip install --no-cache-dir vcstool
30+
shell: bash
31+
32+
- name: Run vcs import
33+
run: |
34+
mkdir src
35+
vcs import src < autoware.repos
3236
shell: bash
3337

3438
- name: Set Docker tags
@@ -50,9 +54,20 @@ runs:
5054
echo "$EOF" >> $GITHUB_OUTPUT
5155
shell: bash
5256

57+
- name: Docker meta for base
58+
id: meta-base
59+
uses: docker/metadata-action@v5
60+
with:
61+
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
62+
tags: ${{ steps.set-docker-tags.outputs.tags }}
63+
bake-target: docker-metadata-action-base
64+
flavor: |
65+
latest=false
66+
suffix=-base
67+
5368
- name: Docker meta for prebuilt
5469
id: meta-prebuilt
55-
uses: docker/metadata-action@v4
70+
uses: docker/metadata-action@v5
5671
with:
5772
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
5873
tags: ${{ steps.set-docker-tags.outputs.tags }}
@@ -63,7 +78,7 @@ runs:
6378
6479
- name: Docker meta for devel
6580
id: meta-devel
66-
uses: docker/metadata-action@v4
81+
uses: docker/metadata-action@v5
6782
with:
6883
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
6984
tags: ${{ steps.set-docker-tags.outputs.tags }}
@@ -73,9 +88,9 @@ runs:
7388
suffix=-devel${{ inputs.tag-suffix }}
7489
7590
- name: Docker meta for runtime
76-
if: ${{ github.event_name == 'workflow_dispatch' }} || ${{ (github.event_name == 'push' && github.ref_type == 'tag') }}
91+
if: ${{ github.event_name == 'workflow_dispatch' || (github.event_name == 'push' && github.ref_type == 'tag') }}
7792
id: meta-runtime
78-
uses: docker/metadata-action@v4
93+
uses: docker/metadata-action@v5
7994
with:
8095
images: ghcr.io/${{ github.repository_owner }}/${{ inputs.bake-target }}
8196
tags: ${{ steps.set-docker-tags.outputs.tags }}
@@ -86,99 +101,40 @@ runs:
86101
87102
- name: Login to GitHub Container Registry
88103
if: ${{ github.event_name != 'pull_request' }}
89-
uses: docker/login-action@v2
104+
uses: docker/login-action@v3
90105
with:
91106
registry: ghcr.io
92107
username: ${{ github.repository_owner }}
93108
password: ${{ github.token }}
94109

95-
- name: Build and Push - prebuilt and devel
96-
if: ${{ (github.event_name == 'push' && github.ref_type == 'branch') || github.event_name == 'schedule' }}
97-
uses: docker/bake-action@v3
110+
- name: Build and Push to GitHub Container Registry
111+
if: ${{ github.event_name == 'push' ||
112+
github.event_name == 'schedule' ||
113+
(github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
114+
uses: docker/bake-action@v5
98115
with:
99116
push: ${{ inputs.allow-push == 'true' }}
100117
files: |
101-
docker/${{ inputs.bake-target }}/docker-bake.hcl
118+
docker/docker-bake.hcl
119+
${{ steps.meta-base.outputs.bake-file }}
102120
${{ steps.meta-prebuilt.outputs.bake-file }}
103121
${{ steps.meta-devel.outputs.bake-file }}
104-
targets: |
105-
prebuilt
106-
devel
107-
provenance: false
108-
set: |
109-
${{ inputs.build-args }}
110-
111-
- name: Build and Publish to GitHub Container Registry
112-
if: ${{ ( github.event_name == 'push' && github.ref_type == 'tag' ) || ( github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'registry') }}
113-
uses: docker/bake-action@v3
114-
with:
115-
push: true
116-
files: |
117-
docker/${{ inputs.bake-target }}/docker-bake.hcl
118-
${{ steps.meta-devel.outputs.bake-file }}
119-
${{ steps.meta-prebuilt.outputs.bake-file }}
120122
${{ steps.meta-runtime.outputs.bake-file }}
121123
provenance: false
122124
set: |
123125
${{ inputs.build-args }}
124126
125-
- name: Build and Save Artifacts
127+
- name: Build only
126128
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
127-
uses: docker/bake-action@v3
129+
uses: docker/bake-action@v5
128130
with:
129131
push: false
130132
files: |
131-
docker/${{ inputs.bake-target }}/docker-bake.hcl
132-
${{ steps.meta-devel.outputs.bake-file }}
133+
docker/docker-bake.hcl
134+
${{ steps.meta-base.outputs.bake-file }}
133135
${{ steps.meta-prebuilt.outputs.bake-file }}
136+
${{ steps.meta-devel.outputs.bake-file }}
134137
${{ steps.meta-runtime.outputs.bake-file }}
135138
provenance: false
136139
set: |
137140
${{ inputs.build-args }}
138-
prebuilt.output=type=docker,dest=/tmp/prebuilt.tar
139-
devel.output=type=docker,dest=/tmp/devel.tar
140-
runtime.output=type=docker,dest=/tmp/runtime.tar
141-
142-
- name: Upload Artifact - prebuilt
143-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
144-
id: artifact-upload-step-prebuilt
145-
uses: actions/upload-artifact@v4
146-
with:
147-
name: prebuilt-image${{ inputs.tag-suffix }}
148-
path: /tmp/prebuilt.tar
149-
retention-days: 7
150-
compression-level: 6
151-
overwrite: true
152-
if-no-files-found: error
153-
154-
- name: Upload Artifact - devel
155-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
156-
id: artifact-upload-step-devel
157-
uses: actions/upload-artifact@v4
158-
with:
159-
name: devel-image${{ inputs.tag-suffix }}
160-
path: /tmp/devel.tar
161-
retention-days: 7
162-
compression-level: 6
163-
overwrite: true
164-
if-no-files-found: error
165-
166-
- name: Upload Artifact - runtime
167-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.artifacts-destination == 'tarball' }}
168-
id: artifact-upload-step-runtime
169-
uses: actions/upload-artifact@v4
170-
with:
171-
name: runtime-image${{ inputs.tag-suffix }}
172-
path: /tmp/runtime.tar
173-
retention-days: 7
174-
compression-level: 6
175-
overwrite: true
176-
if-no-files-found: error
177-
178-
- name: Output artifact URLs
179-
id: output-artifact-urls
180-
run: |
181-
echo 'prebuilt URL ${{ steps.artifact-upload-step-prebuilt.outputs.artifact-url }}'
182-
echo 'devel URL ${{ steps.artifact-upload-step-devel.outputs.artifact-url }}'
183-
echo 'runtime URL ${{ steps.artifact-upload-step-runtime.outputs.artifact-url }}'
184-
shell: bash
+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
name: docker-build
2+
description: ""
3+
4+
inputs:
5+
name:
6+
description: ""
7+
required: true
8+
platform:
9+
description: ""
10+
required: true
11+
cache-tag-suffix:
12+
description: ""
13+
required: true
14+
build-args:
15+
description: ""
16+
required: true
17+
18+
runs:
19+
using: composite
20+
steps:
21+
- name: Setup Docker Buildx
22+
uses: docker/setup-buildx-action@v3
23+
24+
- name: Install vcstool
25+
run: |
26+
sudo apt-get -y update
27+
sudo apt-get -y install python3-pip
28+
pip install --no-cache-dir vcstool
29+
shell: bash
30+
31+
- name: Run vcs import
32+
run: |
33+
mkdir src
34+
vcs import src < autoware.repos
35+
shell: bash
36+
37+
- name: Cache
38+
uses: actions/cache@v3
39+
id: cache
40+
with:
41+
path: |
42+
root-ccache
43+
key: cache-${{ inputs.platform }}-${{ inputs.name }}-${{ hashFiles('autoware.repos') }}
44+
restore-keys: |
45+
cache-${{ inputs.platform }}-${{ inputs.name }}-
46+
cache-${{ inputs.platform }}-
47+
48+
- name: Inject cache into docker
49+
uses: reproducible-containers/buildkit-cache-dance@v3.1.0
50+
with:
51+
cache-map: |
52+
{
53+
"root-ccache": "/root/.ccache"
54+
}
55+
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
56+
57+
- name: Login to GitHub Container Registry
58+
uses: docker/login-action@v3
59+
with:
60+
registry: ghcr.io
61+
username: ${{ github.actor }}
62+
password: ${{ github.token }}
63+
64+
- name: Run docker build
65+
uses: docker/build-push-action@v6
66+
with:
67+
file: docker/Dockerfile
68+
context: .
69+
push: false
70+
build-args: ${{ inputs.build-args }}
71+
cache-from: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.name }}-${{ inputs.platform }}-${{ inputs.cache-tag-suffix }}
72+
cache-to: type=registry,ref=ghcr.io/${{ github.repository }}-buildcache:${{ inputs.name }}-${{ inputs.platform }}-${{ inputs.cache-tag-suffix }},mode=max

0 commit comments

Comments
 (0)