Skip to content

fix: another attempt #6

fix: another attempt

fix: another attempt #6

# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# 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 Analyze"
on:
push:
branches:
- '*'
pull_request:
branches:
- '*'
schedule:
- cron: '38 21 * * 3'
workflow_dispatch:
jobs:
analyze:
name: Analyze"
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-20.04' }}
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
- name: Setup environment
if: matrix.language == 'c-cpp'
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
- name: Install Python Dependencies
if: matrix.language == 'c-cpp'
run: |
python3 -m pip install sphinx-rtd-theme sphinx==4.5.0 breathe exhale \
recommonmark graphviz numpy==1.24.1
- name: Install CUDA Toolkit
if: matrix.language == 'c-cpp'
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '11.7.1'
linux-local-args: '["--toolkit"]'
- name: Verify CUDA installation
if: matrix.language == 'c-cpp'
run: |
echo "Installed CUDA version is: ${{ steps.cuda-toolkit.outputs.cuda }}"
echo "CUDA install location: ${{ steps.cuda-toolkit.outputs.CUDA_PATH }}"
nvcc -V
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality
- name: Autobuild
if: matrix.language != 'c-cpp'
uses: github/codeql-action/autobuild@v2
- name: Build CMake project
if: matrix.language == 'c-cpp'
run: |
echo "Running CMake project build script"
./ci/build.sh $build_type $build_dir \
"-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_PYTHON=1" $*
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"