Skip to content

[#485] Add CodeQL queries for AUTOSAR #4

[#485] Add CodeQL queries for AUTOSAR

[#485] Add CodeQL queries for AUTOSAR #4

Workflow file for this run

name: "CodeQL Autosar"
on:
push:
branches: [ "master", '*-ci' ]
pull_request:
branches: [ "master" ]
jobs:
analyze:
name: Analyze
runs-on: ${{ 'ubuntu-latest' }}
timeout-minutes: ${{ 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- name: Clone CodeQL queries which support various Coding Standards
run: git clone https://github.com/github/codeql-coding-standards.git ./3rdparty/cpp/codeql-coding-standards
- name: Install dependencies
run: sudo apt-get install cmake doxygen graphviz
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install virtualenv
python -m pip install gcovr
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config: |
queries:
- uses: ./3rdparty/cpp/codeql-coding-standards/cpp/autosar/src/codeql-suites/autosar-default.qls
paths-ignore:
- '3rdparty/**/*'
- run: |
echo "Run, Build Application using script"
if [[ "${{matrix.language}}" == "cpp" ]] ; then
./scripts/build.sh cpp_rt-linux64-clang
fi
env:
CMAKE_EXTRA_ARGS: "-DCMAKE_BUILD_TYPE=Release"
CMAKE_BUILD_OPTIONS: "-j2"
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"