update static analyzer #3
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
name: CLang Static Analyzer | ||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | ||
cancel-in-progress: true | ||
permissions: | ||
contents: read | ||
jobs: | ||
clang_static_analyzer: | ||
runs-on: ubuntu-22.04 | ||
run: | | ||
sudo apt-get install clang | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set reusable strings | ||
id: strings | ||
shell: bash | ||
run: | | ||
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" | ||
- name: install deps | ||
run: | | ||
apt-get update && apt-get install build-essential -y && snap install cmake --classic && wget https://apt.llvm.org/llvm.sh && chmod u+x llvm.sh && sudo ./llvm.sh 19 all | ||
mkdir build | ||
cd build | ||
- name: Configure CMake | ||
run: > | ||
scan-build-19 cmake .. | ||
-DCMAKE_BUILD_TYPE=Release | ||
-S ${{ github.workspace }} | ||
- name: Build | ||
# Build your program with the given configuration. | ||
run: scan-build-19 make | ||