CodeQL Analysis #26
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: | |
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' ] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install Python and Conan | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3-pip | |
pip3 install conan | |
- name: Create Conan Profile | |
run: | | |
conan profile detect | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y check | |
- name: Initialize the CodeQL tools | |
uses: github/codeql-action/init@v3 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Build the code | |
run: | | |
mkdir build | |
cd build | |
conan install ../c --build=libcheck/0.15.2 # Build libcheck from source if necessary | |
cmake .. -DCMAKE_BUILD_TYPE=Release | |
make | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v3 |