Skip to content

Commit

Permalink
ci(clang-tidy-differential): split it out of build-and-test-different…
Browse files Browse the repository at this point in the history
…ial (#7331)

Signed-off-by: M. Fatih Cırıt <[email protected]>
  • Loading branch information
xmfcx authored and KhalilSelyan committed Jul 22, 2024
1 parent ba51c70 commit 43cc231
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 37 deletions.
37 changes: 0 additions & 37 deletions .github/workflows/build-and-test-differential.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,40 +74,3 @@ jobs:

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

clang-tidy-differential:
runs-on: ubuntu-latest
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- 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@v35
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
51 changes: 51 additions & 0 deletions .github/workflows/clang-tidy-differential.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: clang-tidy-differential

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

jobs:
prevent-no-label-execution:
uses: autowarefoundation/autoware-github-actions/.github/workflows/prevent-no-label-execution.yaml@v1
with:
label: tag:run-clang-tidy-differential

clang-tidy-differential:
runs-on: ubuntu-latest
container: ghcr.io/autowarefoundation/autoware:latest-prebuilt-cuda
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- 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@v35
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

0 comments on commit 43cc231

Please sign in to comment.