blob: f15ee768f5e998eebd7a7d6d6724e6a70ba3a04b [file] [log] [blame]
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '41 21 * * 3'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: true
- name: Cache pip
uses: actions/cache@v2
with:
key: codeql-analysis--${{ github.event.inputs.os }}--${{ github.event.inputs.python }}--${{ hashFiles('./requirements.txt') }}
path: ~/.cache/pip
- name: Setup python
uses: actions/setup-python@v3
with:
python-version: ${{ github.event.inputs.python }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
- name: Update pip
run: python -m pip install -U pip wheel setuptools
- name: Install requirements
run: python -m pip install -Ur requirements.txt
- name: Compile
run: make bdist_wheel
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1