.github/workflows/clangtidy.yml #544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
# scheduled workflows run on the latest commit on the default or base branch | |
schedule: | |
- cron: '0 4 * * 1/2' | |
# allow manual dispatch | |
workflow_dispatch: | |
jobs: | |
clangtidy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout XRT | |
uses: actions/checkout@v2 | |
- name: Store sha | |
run: echo ${{ github.sha }} > sha | |
- name: Compare sha | |
uses: actions/cache@v2 | |
id: cache-sha | |
with: | |
path: sha | |
key: clangtidy-${{ github.sha }} | |
- name: Install dependencies | |
if: steps.cache-sha.outputs.cache-hit != 'true' | |
run: | | |
sudo apt update | |
sudo src/runtime_src/tools/scripts/xrtdeps.sh | |
sudo pip3 install clang-html | |
- name: Build with clangtidy | |
if: steps.cache-sha.outputs.cache-hit != 'true' | |
run: | | |
build/build.sh -clangtidy -opt |& tee build.clangtidy.log | |
clang-tidy-html build.clangtidy.log | |
- name: Upload clang raw log | |
if: steps.cache-sha.outputs.cache-hit != 'true' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: clang-tidy-log | |
path: build.clangtidy.log | |
- name: Upload clang html | |
if: steps.cache-sha.outputs.cache-hit != 'true' | |
uses: actions/upload-artifact@v1 | |
with: | |
name: clang-tidy-html | |
path: clang.html |