Skip to content

Update codeql-analysis.yml #2

Update codeql-analysis.yml

Update codeql-analysis.yml #2

name: "CodeQL Analysis"
on:
push:
branches: [ "main" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "main" ]
schedule:
- cron: '0 2 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Conan
run: |
pip install conan
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y check
- name: Initialize the CodeQL tools
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build the code
run: |
mkdir build
cd build
conan install .. # Run conan to install dependencies
cmake ..
make
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2