Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

# Modified from https://github.com/ament/ament_lint/blob/master/ament_clang_format/ament_clang_format/configuration/.clang-format
Language: Cpp
BasedOnStyle: Google

AccessModifierOffset: -2
AlignAfterOpenBracket: AlwaysBreak
AllowShortFunctionsOnASingleLine: InlineOnly
BraceWrapping:
AfterClass: true
AfterFunction: true
Expand Down Expand Up @@ -33,6 +38,9 @@ IncludeCategories:
- Regex: .*_msgs/.*
Priority: 3
CaseSensitive: true
- Regex: .*_srvs/.*
Priority: 3
CaseSensitive: true
# Other Package headers
- Regex: <.*>
Priority: 2
Expand Down
1 change: 1 addition & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"solvepnp",
"sqpnp",
"srvs",
"stringop",
"subsampled",
"subsamples",
"subsampling",
Expand Down
11 changes: 8 additions & 3 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

version: 2
updates:
- package-ecosystem: github-actions
directory: /
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#scheduleinterval
schedule:
interval: daily
interval: monthly
open-pull-requests-limit: 1
labels:
- bot
- github-actions
- tag:bot
- type:github-actions
26 changes: 17 additions & 9 deletions .github/sync-files.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
- repository: autowarefoundation/autoware
- repository: autowarefoundation/sync-file-templates
files:
- source: .github/dependabot.yaml
- source: .github/workflows/build-and-test.yaml
- source: .github/workflows/build-and-test-differential.yaml
- source: .github/workflows/cancel-previous-workflows.yaml
- source: .github/workflows/check-build-depends.yaml
- source: .github/workflows/clang-tidy-pr-comments.yaml
- source: .github/workflows/clang-tidy-pr-comments-manually.yaml
- source: .github/workflows/pre-commit.yaml
- source: .github/workflows/pre-commit-optional.yaml
- source: .github/workflows/semantic-pull-request.yaml
- source: .github/workflows/spell-check-differential.yaml
pre-commands: |
sd " with:\n" " with:\n local-cspell-json: .cspell.json\n" {source}
- source: .github/workflows/spell-check-daily.yaml
pre-commands: |
sd " with:\n" " with:\n local-cspell-json: .cspell.json\n" {source}
- source: .github/workflows/sync-files.yaml
- source: .clang-format
- source: .markdown-link-check.json
- source: .markdownlint.yaml
- source: .pre-commit-config-optional.yaml
- source: .pre-commit-config.yaml
- source: .prettierignore
- source: .prettierrc.yaml
- source: .yamllint.yaml
- source: CODE_OF_CONDUCT.md
- source: CONTRIBUTING.md
- source: CPPLINT.cfg
- source: LICENSE
- source: setup.cfg

- repository: autowarefoundation/autoware_common
files:
- source: .github/workflows/build-and-test.yaml
- source: .github/workflows/build-and-test-differential.yaml
- source: .github/workflows/check-build-depends.yaml
- source: .github/workflows/clang-tidy-pr-comments.yaml
- source: .github/workflows/sync-files.yaml
41 changes: 36 additions & 5 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
@@ -1,29 +1,57 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

name: build-and-test-differential

on:
pull_request:
types:
- opened
- synchronize
- reopened
- labeled

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
require-label:
uses: autowarefoundation/autoware-github-actions/.github/workflows/require-label.yaml@v1
with:
label: run:build-and-test-differential

build-and-test-differential:
runs-on: ubuntu-latest
needs: require-label
if: ${{ needs.require-label.outputs.result == 'true' }}
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
- jazzy
include:
- rosdistro: humble
container: ros:humble
build-depends-repos: build_depends.repos
- rosdistro: jazzy
container: ros:jazzy
build-depends-repos: build_depends.repos
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
- name: Set PR fetch depth
run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"

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

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

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
Expand Down Expand Up @@ -57,3 +85,6 @@ jobs:
fail_ci_if_error: false
verbose: true
flags: differential

- name: Show disk space after the tasks
run: df -h
22 changes: 21 additions & 1 deletion .github/workflows/build-and-test.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

name: build-and-test

on:
Expand All @@ -6,23 +10,36 @@ on:
- cron: 0 0 * * *
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build-and-test:
if: ${{ github.event_name != 'push' || github.ref_name == github.event.repository.default_branch }}
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
matrix:
rosdistro:
- humble
- jazzy
include:
- rosdistro: humble
container: ros:humble
build-depends-repos: build_depends.repos
- rosdistro: jazzy
container: ros:jazzy
build-depends-repos: build_depends.repos
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 1

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

- name: Remove exec_depend
uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1
Expand Down Expand Up @@ -56,3 +73,6 @@ jobs:
fail_ci_if_error: false
verbose: true
flags: total

- name: Show disk space after the tasks
run: df -h
20 changes: 20 additions & 0 deletions .github/workflows/cancel-previous-workflows.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

# Deprecated: Use concurrency in each workflow instead.

name: cancel-previous-workflows

on:
pull_request_target:

jobs:
cancel-previous-workflows:
runs-on: ubuntu-22.04
steps:
- name: Cancel previous runs
uses: styfle/cancel-workflow-action@0.12.1
with:
workflow_id: all
all_but_latest: true
10 changes: 9 additions & 1 deletion .github/workflows/check-build-depends.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

name: check-build-depends

on:
pull_request:
paths:
- build_depends*.repos

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-build-depends:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
container: ${{ matrix.container }}
strategy:
fail-fast: false
Expand Down
71 changes: 71 additions & 0 deletions .github/workflows/clang-tidy-pr-comments-manually.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# This file is automatically synced from:
# https://github.com/autowarefoundation/sync-file-templates
# To make changes, update the source repository and follow the guidelines in its README.

name: clang-tidy-pr-comments-manually

on:
workflow_dispatch:
inputs:
workflow_run_id_or_url:
description: The target workflow run ID or URL of the build-and-test-differential workflow
required: true

concurrency:
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true

jobs:
clang-tidy-pr-comments-manually:
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Download analysis results
run: |
workflow_run_id=$(echo "${{ inputs.workflow_run_id_or_url }}" | sed -e "s|.*runs/||" -e "s|/jobs.*||")
gh run download "$workflow_run_id" -D /tmp || true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Check if the fixes.yaml file exists
id: check-fixes-yaml-existence
uses: autowarefoundation/autoware-github-actions/check-file-existence@v1
with:
files: /tmp/clang-tidy-result/fixes.yaml

- name: Set variables
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
id: set-variables
run: |
echo "pr-id=$(cat /tmp/clang-tidy-result/pr-id.txt)" >> $GITHUB_OUTPUT
echo "pr-head-repo=$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" >> $GITHUB_OUTPUT
echo "pr-head-ref=$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" >> $GITHUB_OUTPUT

- name: Check out PR head
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
uses: actions/checkout@v4
with:
repository: ${{ steps.set-variables.outputs.pr-head-repo }}
ref: ${{ steps.set-variables.outputs.pr-head-ref }}
persist-credentials: false

- name: Replace paths in fixes.yaml
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
run: |
sed -i -e "s|/__w/|/home/runner/work/|g" /tmp/clang-tidy-result/fixes.yaml
cat /tmp/clang-tidy-result/fixes.yaml

- name: Copy fixes.yaml to access from Docker Container Action
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
run: |
cp /tmp/clang-tidy-result/fixes.yaml fixes.yaml

- name: Run clang-tidy-pr-comments action
if: ${{ steps.check-fixes-yaml-existence.outputs.exists == 'true' }}
uses: platisd/clang-tidy-pr-comments@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clang_tidy_fixes: fixes.yaml
pull_request_id: ${{ steps.set-variables.outputs.pr-id }}
Loading
Loading