1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66
|
name: "Static Analysis"
on: [push]
jobs:
codeql:
name: CodeQL
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: apt-get install packages
run: sudo apt-get update -qq &&
sudo apt-get install --no-install-recommends -y
libyaml-dev
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- run: |
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
scan-build:
name: scan-build
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 1
- name: apt-get install packages
run: sudo apt-get update -qq &&
sudo apt-get install --no-install-recommends -y
libyaml-dev
clang-tools
- name: scan-build
run: |
make clean
scan-build -sarif -o build/sarif make
- name: upload scan-build
uses: github/codeql-action/upload-sarif@v2
with:
sarif_file: build/sarif
|