This repository has been archived by the owner on Oct 13, 2023. It is now read-only.
Archive repo #36
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: Static Analysis | |
on: [push, pull_request] | |
env: | |
SCCACHE_DIR: ${{ github.workspace }}/.cache/sccache | |
jobs: | |
static-analysis: | |
runs-on: ubuntu-20.04 | |
env: | |
CC: clang-10 | |
CXX: clang++-10 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-deps | |
with: | |
path: .cache/deps | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/ThirdPartyDeps.cmake') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Cache build | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-build | |
with: | |
path: .cache/sccache | |
key: ${{ runner.os }}-build-${{ env.cache-name }} | |
- name: Install sccache | |
run: | | |
curl -SL https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz | tar xvz --strip-components=1 --wildcards "*/sccache" | |
chmod +x sccache | |
- name: Install install static analyzers | |
run: sudo apt install clang-tidy iwyu | |
- name: CMake configure | |
run: cmake -B build -DCMAKE_BUILD_TYPE=Debug -DENABLE_COVERAGE=OFF -DENABLE_TESTING=OFF -DENABLE_STATIC_ANALYSIS=ON | |
- name: CMake build | |
run: cmake --build build --config Debug -j --clean-first |