Skip to content

try codeql

try codeql #1

Workflow file for this run

name: "CodeQL"
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
schedule:
- cron: "42 19 * * 4"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ python, cpp ]
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Install Packages (cpp)
if: ${{ matrix.language == 'cpp' }}
run: |
sudo apt-get update
sudo apt-get install --yes build-essential cmake python3 python3-pip openmpi-bin libopenmpi-dev
- name: Configure (cpp)
if: ${{ matrix.language == 'cpp' }}
run: |
BD=$PWD
SAMRAI_GIT=https://github.com/PHARCHIVE/SAMRAI_export
SAMRAI_DIR=/opt/work/samrai
git submodule update --init
python3 -m pip install pip --upgrade
python3 -m pip install -r requirements.txt --upgrade
git clone $SAMRAI_GIT --depth 1 $SAMRAI_DIR -b ubuntu_18_04_openmpi
cd $SAMRAI_DIR; ./unzip.sh;
cd $BD; mkdir build; cd build; cmake .. -DSAMRAI_ROOT=$SAMRAI_DIR -DHighFive=OFF -DforceGetPybind=ON
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/codeql-config.yml
languages: ${{ matrix.language }}
queries: +security-and-quality
- name: Autobuild
uses: github/codeql-action/autobuild@v2
if: ${{ matrix.language == 'python' }}
- name: Build cpp
if: ${{ matrix.language == 'cpp' }}
run: |
cd build; make
ctest --output-on-failure
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{ matrix.language }}"