Skip to content

CodeQL

CodeQL #47

Workflow file for this run

# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"
on:
push:
branches: [ "main", "release_v*" ]
pull_request:
branches: [ "main", "release_v*" ]
schedule:
- cron: '28 22 * * 1'
jobs:
analyze:
name: Analyze
runs-on: ${{ (matrix.language == 'c-cpp' && 'ubuntu-20.04-64core') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'c-cpp', 'javascript-typescript', 'python' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
lfs: true
submodules: 'recursive'
- if: matrix.language == 'c-cpp'
name: Setup environment
run: |
sudo apt update -y && sudo apt install -y --no-install-recommends \
git git-lfs gcc-11 g++-11 ninja-build ccache libgtest-dev libgmock-dev \
shellcheck curl doxygen python3 python3-pip python3-dev python3-distutils
- if: matrix.language == 'c-cpp'
name: Install Python Dependencies
run: |
python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale \
recommonmark graphviz numpy==1.24.1
- if: matrix.language == 'c-cpp'
name: Install CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.7.1'
linux-local-args: '["--toolkit"]'
- if: matrix.language == 'c-cpp'
name: Verify CUDA installation
run: |
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "CUDA install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
sudo ln -s ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/lib64/libcudart.so \
/usr/lib/x86_64-linux-gnu/libcuda.so
nvcc -V
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
queries: +security-and-quality
- if: matrix.language != 'c-cpp'
name: Autobuild
uses: github/codeql-action/autobuild@v2
- if: matrix.language == 'c-cpp'
name: Build CMake project
run: |
echo "Running CMake project build script"
./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF" $*
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"