From 4e234d93e0056814997f6f297a9d7739bd481e2f Mon Sep 17 00:00:00 2001 From: github-actions Date: Fri, 11 Oct 2024 19:03:14 +0000 Subject: [PATCH] chore: sync files Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- .github/workflows/build-and-test-arm64.yaml | 64 +++++++++++++++ .../build-and-test-differential-arm64.yaml | 78 +++++++++++++++++++ .../build-and-test-differential.yaml | 59 ++++++-------- .github/workflows/build-and-test.yaml | 14 ++-- .../workflows/clang-tidy-differential.yaml | 61 +++++++++++++++ .github/workflows/pre-commit-optional.yaml | 2 +- .github/workflows/pre-commit.yaml | 2 +- .../workflows/spell-check-differential.yaml | 2 +- .markdownlint.yaml | 1 + .pre-commit-config.yaml | 20 ++--- 10 files changed, 247 insertions(+), 56 deletions(-) create mode 100644 .github/workflows/build-and-test-arm64.yaml create mode 100644 .github/workflows/build-and-test-differential-arm64.yaml create mode 100644 .github/workflows/clang-tidy-differential.yaml diff --git a/.github/workflows/build-and-test-arm64.yaml b/.github/workflows/build-and-test-arm64.yaml new file mode 100644 index 00000000..9a16d8a9 --- /dev/null +++ b/.github/workflows/build-and-test-arm64.yaml @@ -0,0 +1,64 @@ +name: build-and-test-arm64 + +on: + schedule: + - cron: 0 0 * * * + workflow_dispatch: + +jobs: + build-and-test-arm64: + runs-on: [self-hosted, linux, ARM64] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + 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 + + - name: Get self packages + id: get-self-packages + uses: autowarefoundation/autoware-github-actions/get-self-packages@v1 + + - name: Build + if: ${{ steps.get-self-packages.outputs.self-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.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 }} + target-packages: ${{ steps.get-self-packages.outputs.self-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Upload coverage to CodeCov + if: ${{ steps.test.outputs.coverage-report-files != '' }} + uses: codecov/codecov-action@v4 + with: + files: ${{ steps.test.outputs.coverage-report-files }} + fail_ci_if_error: false + verbose: true + flags: total-arm64 + + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/build-and-test-differential-arm64.yaml b/.github/workflows/build-and-test-differential-arm64.yaml new file mode 100644 index 00000000..fc38c44a --- /dev/null +++ b/.github/workflows/build-and-test-differential-arm64.yaml @@ -0,0 +1,78 @@ +name: build-and-test-differential-arm64 + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + +jobs: + make-sure-label-is-present: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: type:arm64 + + build-and-test-differential-arm64: + needs: make-sure-label-is-present + if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }} + runs-on: [self-hosted, linux, ARM64] + container: ${{ matrix.container }} + strategy: + fail-fast: false + matrix: + rosdistro: + - humble + include: + - rosdistro: humble + container: ros:humble + build-depends-repos: build_depends.repos + steps: + - name: Set PR fetch depth + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" + + - name: Checkout PR branch and all PR commits + uses: actions/checkout@v4 + with: + 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 + + - name: Get modified packages + id: get-modified-packages + uses: autowarefoundation/autoware-github-actions/get-modified-packages@v1 + + - name: Build + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-build@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Test + id: test + if: ${{ steps.get-modified-packages.outputs.modified-packages != '' }} + uses: autowarefoundation/autoware-github-actions/colcon-test@v1 + with: + rosdistro: ${{ matrix.rosdistro }} + target-packages: ${{ steps.get-modified-packages.outputs.modified-packages }} + build-depends-repos: ${{ matrix.build-depends-repos }} + + - name: Upload coverage to CodeCov + if: ${{ steps.test.outputs.coverage-report-files != '' }} + uses: codecov/codecov-action@v4 + with: + files: ${{ steps.test.outputs.coverage-report-files }} + fail_ci_if_error: false + verbose: true + flags: differential-arm64 + + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/build-and-test-differential.yaml b/.github/workflows/build-and-test-differential.yaml index ad55102f..74242fea 100644 --- a/.github/workflows/build-and-test-differential.yaml +++ b/.github/workflows/build-and-test-differential.yaml @@ -2,9 +2,21 @@ name: build-and-test-differential on: pull_request: + types: + - opened + - synchronize + - reopened + - labeled jobs: + make-sure-label-is-present: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: tag:run-build-and-test-differential + build-and-test-differential: + needs: make-sure-label-is-present + if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }} runs-on: ubuntu-latest container: ${{ matrix.container }} strategy: @@ -17,10 +29,17 @@ jobs: container: ros:humble build-depends-repos: build_depends.repos steps: - - name: Check out repository + - name: Set PR fetch depth + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" + + - 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 @@ -55,37 +74,5 @@ jobs: verbose: true flags: differential - clang-tidy-differential: - runs-on: ubuntu-latest - container: ros:humble - needs: build-and-test-differential - steps: - - name: Check out repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Remove exec_depend - uses: autowarefoundation/autoware-github-actions/remove-exec-depend@v1 - - - name: Get modified packages - 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@v45 - with: - files: | - **/*.cpp - **/*.hpp - - - name: Run clang-tidy - if: ${{ steps.get-modified-files.outputs.all_changed_files != '' }} - uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 - with: - 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 + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/build-and-test.yaml b/.github/workflows/build-and-test.yaml index aeff29fe..5a227b52 100644 --- a/.github/workflows/build-and-test.yaml +++ b/.github/workflows/build-and-test.yaml @@ -23,14 +23,11 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v4 - - - 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 + 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 @@ -64,3 +61,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/clang-tidy-differential.yaml b/.github/workflows/clang-tidy-differential.yaml new file mode 100644 index 00000000..6133f833 --- /dev/null +++ b/.github/workflows/clang-tidy-differential.yaml @@ -0,0 +1,61 @@ +name: clang-tidy-differential + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + +jobs: + make-sure-label-is-present: + uses: autowarefoundation/autoware-github-actions/.github/workflows/make-sure-label-is-present.yaml@v1 + with: + label: tag:run-clang-tidy-differential + + clang-tidy-differential: + needs: make-sure-label-is-present + if: ${{ needs.make-sure-label-is-present.outputs.result == 'true' }} + runs-on: ubuntu-latest + container: ros:humble + steps: + - name: Set PR fetch depth + run: echo "PR_FETCH_DEPTH=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}" + + - name: Checkout PR branch and all PR commits + uses: actions/checkout@v4 + with: + 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 + + - name: Get modified packages + 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-files.outputs.all_changed_files != '' }} + uses: autowarefoundation/autoware-github-actions/clang-tidy@v1 + with: + 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 + + - name: Show disk space after the tasks + run: df -h diff --git a/.github/workflows/pre-commit-optional.yaml b/.github/workflows/pre-commit-optional.yaml index 38738196..12f536c5 100644 --- a/.github/workflows/pre-commit-optional.yaml +++ b/.github/workflows/pre-commit-optional.yaml @@ -5,7 +5,7 @@ on: jobs: pre-commit-optional: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.github/workflows/pre-commit.yaml b/.github/workflows/pre-commit.yaml index c724885f..4d005e84 100644 --- a/.github/workflows/pre-commit.yaml +++ b/.github/workflows/pre-commit.yaml @@ -6,7 +6,7 @@ on: jobs: pre-commit: if: ${{ github.event.repository.private }} # Use pre-commit.ci for public repositories - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Generate token id: generate-token diff --git a/.github/workflows/spell-check-differential.yaml b/.github/workflows/spell-check-differential.yaml index 1fbf2ff4..f030a452 100644 --- a/.github/workflows/spell-check-differential.yaml +++ b/.github/workflows/spell-check-differential.yaml @@ -5,7 +5,7 @@ on: jobs: spell-check-differential: - runs-on: ubuntu-latest + runs-on: ubuntu-22.04 steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/.markdownlint.yaml b/.markdownlint.yaml index babaaa1f..7b7359fe 100644 --- a/.markdownlint.yaml +++ b/.markdownlint.yaml @@ -7,5 +7,6 @@ MD029: style: ordered MD033: false MD041: false +MD045: false MD046: false MD049: false diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 1b5849ba..08afaa48 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.6.0 + rev: v4.5.0 hooks: - id: check-json - id: check-merge-conflict @@ -18,23 +18,23 @@ repos: args: [--markdown-linebreak-ext=md] - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.41.0 + rev: v0.38.0 hooks: - id: markdownlint args: [-c, .markdownlint.yaml, --fix] - repo: https://github.com/pre-commit/mirrors-prettier - rev: v4.0.0-alpha.8 + rev: v4.0.0-alpha.4 hooks: - id: prettier - repo: https://github.com/adrienverge/yamllint - rev: v1.35.1 + rev: v1.33.0 hooks: - id: yamllint - repo: https://github.com/tier4/pre-commit-hooks-ros - rev: v0.10.0 + rev: v0.8.0 hooks: - id: flake8-ros - id: prettier-xacro @@ -44,29 +44,29 @@ repos: - id: sort-package-xml - repo: https://github.com/shellcheck-py/shellcheck-py - rev: v0.10.0.1 + rev: v0.9.0.6 hooks: - id: shellcheck - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.8.0-1 + rev: v3.7.0-4 hooks: - id: shfmt args: [-w, -s, -i=4] - repo: https://github.com/pycqa/isort - rev: 5.13.2 + rev: 5.13.0 hooks: - id: isort - repo: https://github.com/psf/black - rev: 24.8.0 + rev: 23.11.0 hooks: - id: black args: [--line-length=100] - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v18.1.8 + rev: v17.0.6 hooks: - id: clang-format types_or: [c++, c, cuda]