ci: install libtinfo5, clang dependency; add workflow comments

This commit is contained in:
Ivan Grokhotkov 2022-12-05 22:28:19 +01:00
parent 9d3971c57c
commit b55c12a928
No known key found for this signature in database
GPG Key ID: 1E050E141B280628
1 changed files with 19 additions and 11 deletions

View File

@ -15,6 +15,21 @@ jobs:
- uses: actions/checkout@v3
with:
submodules: 'true'
- name: Install libtinfo (esp-clang dependency)
run: |
export DEBIAN_FRONTEND=noninteractive
apt update && apt-get install -y libtinfo5
- name: Install esp-clang
run: |
${IDF_PATH}/tools/idf_tools.py --non-interactive install esp-clang
- name: Install clang-tidy-sarif
run: |
curl -sSL https://github.com/psastras/sarif-rs/releases/download/clang-tidy-sarif-v0.3.3/clang-tidy-sarif-x86_64-unknown-linux-gnu -o clang-tidy-sarif
chmod +x clang-tidy-sarif
- name: Install pyclang
run: |
. ${IDF_PATH}/export.sh
pip install pyclang~=0.2.0
- name: Run code analysis
shell: bash
env:
@ -22,21 +37,14 @@ jobs:
IDF_TARGET: esp32
working-directory: test_app
run: |
${IDF_PATH}/tools/idf_tools.py --non-interactive install esp-clang
. ${IDF_PATH}/export.sh
which -a clang-tidy || true
pip install pyclang~=0.2.0
curl -sSL https://raw.githubusercontent.com/espressif/llvm-project/xtensa_release_12.0.1/clang-tools-extra/clang-tidy/tool/run-clang-tidy.py -o run-clang-tidy.py
chmod +x run-clang-tidy.py
curl -sSL https://github.com/psastras/sarif-rs/releases/download/clang-tidy-sarif-v0.3.3/clang-tidy-sarif-x86_64-unknown-linux-gnu -o clang-tidy-sarif
chmod +x clang-tidy-sarif
idf.py clang-check --include-paths $GITHUB_WORKSPACE --exclude-paths $PWD --run-clang-tidy-py run-clang-tidy
cp warnings.txt ../
- name: Convert clang-tidy results into SARIF output
run: |
export PATH=$PWD:$PATH
idf.py clang-check --include-paths $GITHUB_WORKSPACE --exclude-paths $PWD
./clang-tidy-sarif -o results.sarif.raw warnings.txt
python3 $GITHUB_WORKSPACE/.github/filter_sarif.py -o results.sarif --include-prefix ${GITHUB_WORKSPACE}/ results.sarif.raw
cp results.sarif ../
cp results.sarif.raw ../
cp warnings.txt ../
- uses: actions/upload-artifact@v2
with:
path: |