Update codeql-analysis.yml #2
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: "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 |