Skip to content

[WIP] Framework: Expand CodeQL job to run on all non-deprecated packages modified at a time #1022

[WIP] Framework: Expand CodeQL job to run on all non-deprecated packages modified at a time

[WIP] Framework: Expand CodeQL job to run on all non-deprecated packages modified at a time #1022

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: Linear Solvers"
on:
pull_request:
branches: [ "develop" ]
types:
- opened
- synchronize
schedule:
- cron: '41 23 * * 2'
permissions:
contents: read
jobs:
analyze:
name: Analyze (${{ matrix.language }})
runs-on: [self-hosted, gcc-10.3.0_openmpi-4.1.6]
if: ${{ github.event.action == 'synchronize' || github.event.action == 'opened' }}
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
strategy:
fail-fast: false
matrix:
include:
- language: c-cpp
build-mode: manual
steps:
- name: Checkout repository
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
config: |
query-filters:
- exclude:
tags: cpp/integer-multiplication-cast-to-long
- name: env
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
run: |
env
- name: module list
shell: bash -l {0}
run: |
module list
printenv PATH
- if: matrix.build-mode == 'manual'
name: Get dependencies
run: |
bash -lc "${GITHUB_WORKSPACE}/packages/framework/get_dependencies.sh --container"
- if: matrix.build-mode == 'manual'
name: Configure and Build Trilinos
shell: bash -lc {0}
run: |
mkdir -p trilinos_build
cd trilinos_build
source ${GITHUB_WORKSPACE}/packages/framework/GenConfig/gen-config.sh --force --cmake-fragment fragment.cmake rhel8_gcc-openmpi_debug_shared_no-kokkos-arch_no-asan_complex_no-fpic_mpi_no-pt_no-rdc_no-uvm_deprecated-on_no-package-enables
cmake -C fragment.cmake -DTrilinos_ENABLE_Tpetra=ON -DTrilinos_ENABLE_MueLu=ON ..
ninja -j 16
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@294a9d92911152fe08befb9ec03e240add280cb3 # v3.26.8
with:
category: "/language:${{matrix.language}}"