ci: install libtinfo5, clang dependency; add workflow comments
This commit is contained in:
parent
9d3971c57c
commit
b55c12a928
|
@ -15,6 +15,21 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
submodules: 'true'
|
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
|
- name: Run code analysis
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
|
@ -22,21 +37,14 @@ jobs:
|
||||||
IDF_TARGET: esp32
|
IDF_TARGET: esp32
|
||||||
working-directory: test_app
|
working-directory: test_app
|
||||||
run: |
|
run: |
|
||||||
${IDF_PATH}/tools/idf_tools.py --non-interactive install esp-clang
|
|
||||||
. ${IDF_PATH}/export.sh
|
. ${IDF_PATH}/export.sh
|
||||||
which -a clang-tidy || true
|
idf.py clang-check --include-paths $GITHUB_WORKSPACE --exclude-paths $PWD --run-clang-tidy-py run-clang-tidy
|
||||||
pip install pyclang~=0.2.0
|
cp warnings.txt ../
|
||||||
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
|
- name: Convert clang-tidy results into SARIF output
|
||||||
chmod +x run-clang-tidy.py
|
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
|
|
||||||
export PATH=$PWD:$PATH
|
export PATH=$PWD:$PATH
|
||||||
idf.py clang-check --include-paths $GITHUB_WORKSPACE --exclude-paths $PWD
|
|
||||||
./clang-tidy-sarif -o results.sarif.raw warnings.txt
|
./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
|
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
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
|
|
Loading…
Reference in New Issue