Skip to content

Update README.rst

Update README.rst #370

# SPDX-License-Identifier: Apache-2.0
# Copyright (C) 2019-2021 Xilinx, Inc. All rights reserved.
on:
workflow_dispatch:
inputs:
sha:
description: Sha of pull request
default: 0
required: true
pr:
description: Pull request to review
default: 0
required: true
exclude:
description: Comma-separated list of files or patterns to exclude
default:
max_comments:
description: Max comments to add to review
default: 0
pull_request:
jobs:
clangtidy_review:
runs-on: ubuntu-latest
steps:
- name: Checkout XRT on pull request
if: github.event_name == 'pull_request'
uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Checkout XRT on dispatch
if: github.event_name == 'workflow_dispatch'
uses: actions/checkout@v2
with:
ref: ${{ github.event.inputs.sha }}
- name: Install dependencies
run: |
sudo apt update
sudo src/runtime_src/tools/scripts/xrtdeps.sh
sudo apt install clang-tidy-10
sudo pip3 install PyGithub~=1.51 unidiff~=0.6.0 requests~=2.23
- name: Create compile_commands.json
run: |
cmake -B build/Review -DCMAKE_EXPORT_COMPILE_COMMANDS=1 src
make -C build/Review pcie_emulation_generated_code edge_emulation_generated_code
env:
XRT_CLANGTIDY_REVIEW: 1
- name: Run the clang-tidy review on pull request
if: github.event_name == 'pull_request'
run: .github/scripts/clang-tidy-review.py --root . --build_dir=./build/Review --repo=${{ github.repository }} --token=${{ github.token }} --pr=${{ github.event.pull_request.number }} --clang_tidy_checks='' --clang_tidy_binary=clang-tidy-10 --max_comments=25 --exclude='*aie*,*/drm/*,*/driver/*,*/drv/*'
- name: Run the clang-tidy review on dispatch
if: github.event_name == 'workflow_dispatch'
run: .github/scripts/clang-tidy-review.py --root . --build_dir=./build/Review --repo=${{ github.repository }} --token=${{ github.token }} --pr=${{ github.event.inputs.pr }} --clang_tidy_checks='' --clang_tidy_binary=clang-tidy-10 --max_comments=${{ github.event.inputs.max_comments }} --exclude=${{ github.event.inputs.exclude }}