diff --git a/.clang-format b/.clang-format index 7762ec9d..b41fae91 100644 --- a/.clang-format +++ b/.clang-format @@ -4,6 +4,7 @@ BasedOnStyle: Google AccessModifierOffset: -2 AlignAfterOpenBracket: AlwaysBreak +AllowShortFunctionsOnASingleLine: InlineOnly BraceWrapping: AfterClass: true AfterFunction: true @@ -33,6 +34,9 @@ IncludeCategories: - Regex: .*_msgs/.* Priority: 3 CaseSensitive: true + - Regex: .*_srvs/.* + Priority: 3 + CaseSensitive: true # Other Package headers - Regex: <.*> Priority: 2 diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml index 3f3bf243..0264c035 100644 --- a/.github/dependabot.yaml +++ b/.github/dependabot.yaml @@ -6,5 +6,5 @@ updates: interval: daily open-pull-requests-limit: 1 labels: - - bot - - github-actions + - tag:bot + - type:github-actions diff --git a/.github/stale.yml b/.github/stale.yml index 84928d1b..bc99e438 100644 --- a/.github/stale.yml +++ b/.github/stale.yml @@ -4,7 +4,7 @@ daysUntilClose: false # Label to use when marking as stale -staleLabel: stale +staleLabel: status:stale # Comment to post when marking as stale markComment: > diff --git a/.github/workflows/build-and-test-differential-self-hosted.yaml b/.github/workflows/build-and-test-differential-self-hosted.yaml index 344f090a..b6840197 100644 --- a/.github/workflows/build-and-test-differential-self-hosted.yaml +++ b/.github/workflows/build-and-test-differential-self-hosted.yaml @@ -23,12 +23,8 @@ jobs: fail-fast: false matrix: rosdistro: - - galactic - humble include: - - rosdistro: galactic - container: ros:galactic - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index 5f71a791..ad9fc662 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -11,19 +11,12 @@ jobs: fail-fast: false matrix: rosdistro: - - galactic - humble include: - - rosdistro: galactic - container: ros:galactic - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.1 - - name: Check out repository uses: actions/checkout@v3 with: @@ -36,12 +29,6 @@ jobs: id: get-modified-packages uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 - - name: Install python3-pytest-cov - run: | - sudo apt-get update - sudo apt-get install -y python3-pytest-cov - shell: bash - - name: Build if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} uses: autowarefoundation/autoware-github-actions/colcon-build@v1 @@ -70,7 +57,7 @@ jobs: clang-tidy-differential: runs-on: ubuntu-latest - container: ros:galactic + container: ros:humble needs: build-and-test-differential steps: - name: Check out repository @@ -85,11 +72,20 @@ jobs: id: get-modified-packages uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 + - name: Get modified files + id: get-modified-files + uses: tj-actions/changed-files@v42 + with: + files: | + **/*.cpp + **/*.hpp + - name: Run clang-tidy - if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + if: ${{ steps.get-modified-files.outputs.all_changed_files != '' }} uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 with: - rosdistro: galactic + rosdistro: humble target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + target-files: ${{ steps.get-modified-files.outputs.all_changed_files }} clang-tidy-config-url: https://raw.githubusercontent.com/autowarefoundation/autoware/main/.clang-tidy build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test-self-hosted.yaml b/.github/workflows/build-and-test-self-hosted.yaml index 0aeb1a81..e1a4c0ba 100644 --- a/.github/workflows/build-and-test-self-hosted.yaml +++ b/.github/workflows/build-and-test-self-hosted.yaml @@ -13,12 +13,8 @@ jobs: fail-fast: false matrix: rosdistro: - - galactic - humble include: - - rosdistro: galactic - container: ros:galactic - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index 161e3ba2..60542272 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -15,12 +15,8 @@ jobs: fail-fast: false matrix: rosdistro: - - galactic - humble include: - - rosdistro: galactic - container: ros:galactic - build-depends-repos: build_depends.repos - rosdistro: humble container: ros:humble build-depends-repos: build_depends.repos @@ -28,6 +24,14 @@ jobs: - name: Check out repository uses: actions/checkout@v3 + - name: Free disk space (Ubuntu) + uses: jlumbroso/free-disk-space@v1.3.1 + with: + tool-cache: false + dotnet: false + swap-storage: false + large-packages: false + - name: Remove exec_depend uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 @@ -60,3 +64,6 @@ jobs: fail_ci_if_error: false verbose: true flags: total + + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/check-build-depends.yaml b/.github/workflows/check-build-depends.yaml index 28de5fa8..81618a1d 100644 --- a/.github/workflows/check-build-depends.yaml +++ b/.github/workflows/check-build-depends.yaml @@ -3,16 +3,22 @@ name: check-build-depends on: pull_request: paths: - - build_depends.repos + - build_depends*.repos jobs: check-build-depends: runs-on: ubuntu-latest - container: ros:galactic + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos steps: - - name: Cancel previous runs - uses: styfle/cancel-workflow-action@0.9.1 - - name: Check out repository uses: actions/checkout@v3 @@ -26,6 +32,6 @@ jobs: - name: Build uses: autowarefoundation/autoware-github-actions/colcon-build@v1 with: - rosdistro: galactic + rosdistro: ${{ matrix.rosdistro }} target-packages: ${{ steps.get-self-packages.outputs.self-packages }} - build-depends-repos: build_depends.repos + build-depends-repos: ${{ matrix.build-depends-repos }} diff --git a/.github/workflows/clang-tidy-pr-comments.yaml b/.github/workflows/clang-tidy-pr-comments.yaml index 22812106..baaa0fb8 100644 --- a/.github/workflows/clang-tidy-pr-comments.yaml +++ b/.github/workflows/clang-tidy-pr-comments.yaml @@ -9,7 +9,7 @@ on: jobs: clang-tidy-pr-comments: - if: ${{ github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success' }} + if: ${{ github.event.workflow_run.event == 'pull_request' && contains(fromJson('["success", "failure"]'), github.event.workflow_run.conclusion) }} runs-on: ubuntu-latest steps: - name: Check out repository @@ -17,18 +17,26 @@ jobs: - name: Download analysis results run: | - gh run download ${{ github.event.workflow_run.id }} -D /tmp + gh run download ${{ github.event.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 ::set-output name=pr-id::"$(cat /tmp/clang-tidy-result/pr-id.txt)" - echo ::set-output name=pr-head-repo::"$(cat /tmp/clang-tidy-result/pr-head-repo.txt)" - echo ::set-output name=pr-head-ref::"$(cat /tmp/clang-tidy-result/pr-head-ref.txt)" + 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@v3 with: repository: ${{ steps.set-variables.outputs.pr-head-repo }} @@ -36,15 +44,18 @@ jobs: 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 }} diff --git a/.github/workflows/github-release.yaml b/.github/workflows/github-release.yaml index 19e1e9c1..b426d0cb 100644 --- a/.github/workflows/github-release.yaml +++ b/.github/workflows/github-release.yaml @@ -26,11 +26,11 @@ jobs: REF_NAME="${{ github.ref_name }}" fi - echo ::set-output name=ref-name::"$REF_NAME" - echo ::set-output name=tag-name::"${REF_NAME#beta/}" + echo "ref-name=$REF_NAME" >> $GITHUB_OUTPUT + echo "tag-name=${REF_NAME#beta/}" >> $GITHUB_OUTPUT - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: fetch-depth: 0 ref: ${{ steps.set-tag-name.outputs.ref-name }} @@ -39,7 +39,7 @@ jobs: id: set-target-name run: | if [[ "${{ steps.set-tag-name.outputs.ref-name }}" =~ "beta/" ]]; then - echo ::set-output name=target-name::"${{ steps.set-tag-name.outputs.ref-name }}" + echo "target-name=${{ steps.set-tag-name.outputs.ref-name }}" >> $GITHUB_OUTPUT fi - name: Create a local tag for beta branches @@ -62,7 +62,7 @@ jobs: verb=edit fi - echo ::set-output name=verb::"$verb" + echo "verb=$verb" >> $GITHUB_OUTPUT env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pre-commit-optional.yaml b/.github/workflows/pre-commit-optional.yaml index 93e05dc2..38738196 100644 --- a/.github/workflows/pre-commit-optional.yaml +++ b/.github/workflows/pre-commit-optional.yaml @@ -8,9 +8,12 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Run pre-commit uses: autowarefoundation/autoware-github-actions/pre-commit@v1 with: pre-commit-config: .pre-commit-config-optional.yaml + base-branch: origin/${{ github.base_ref }} diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index 7fd1cc90..c724885f 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -5,26 +5,21 @@ on: jobs: pre-commit: - if: ${{ github.event.repository.private }} + if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories runs-on: ubuntu-latest steps: - name: Generate token id: generate-token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.ref }} - - name: Set git config - uses: autowarefoundation/autoware-github-actions/set-git-config@v1 - with: - token: ${{ steps.generate-token.outputs.token }} - - name: Run pre-commit uses: autowarefoundation/autoware-github-actions/pre-commit@v1 with: diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml index eb18ccdb..1fbf2ff4 100644 --- a/.github/workflows/spell-check-differential.yaml +++ b/.github/workflows/spell-check-differential.yaml @@ -8,7 +8,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Run spell-check uses: autowarefoundation/autoware-github-actions/spell-check@v1 diff --git a/.github/workflows/sync-files.yaml b/.github/workflows/sync-files.yaml index b9dc5907..51e523b8 100644 --- a/.github/workflows/sync-files.yaml +++ b/.github/workflows/sync-files.yaml @@ -18,7 +18,7 @@ jobs: steps: - name: Generate token id: generate-token - uses: tibdex/github-app-token@v1 + uses: tibdex/github-app-token@v2 with: app_id: ${{ secrets.APP_ID }} private_key: ${{ secrets.PRIVATE_KEY }} @@ -28,6 +28,6 @@ jobs: with: token: ${{ steps.generate-token.outputs.token }} pr-labels: | - bot - sync-files + tag:bot + tag:sync-files auto-merge-method: squash diff --git a/.markdown-link-check.json b/.markdown-link-check.json index dec3db1a..c71a3e42 100644 --- a/.markdown-link-check.json +++ b/.markdown-link-check.json @@ -4,6 +4,9 @@ { "pattern": "^http://localhost" }, + { + "pattern": "^http://127\\.0\\.0\\.1" + }, { "pattern": "^https://github.com/.*/discussions/new" } diff --git a/.markdownlint.yaml b/.markdownlint.yaml index df1f518d..babaaa1f 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -3,6 +3,8 @@ default: true MD013: false MD024: siblings_only: true +MD029: + style: ordered MD033: false MD041: false MD046: false diff --git a/.pre-commit-config-optional.yaml b/.pre-commit-config-optional.yaml index a805f120..8c9345e1 100644 --- a/.pre-commit-config-optional.yaml +++ b/.pre-commit-config-optional.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/tcort/markdown-link-check - rev: v3.10.0 + rev: v3.12.2 hooks: - id: markdown-link-check - args: [--config=.markdown-link-check.json] + args: [--quiet, --config=.markdown-link-check.json] diff --git a/.yamllint.yaml b/.yamllint.yaml index 6228c70f..2c7bd088 100644 --- a/.yamllint.yaml +++ b/.yamllint.yaml @@ -1,7 +1,6 @@ extends: default ignore: | - .clang-tidy *.param.yaml rules: