2020-09-09 13:54:59 +00:00
|
|
|
|
name: "CodeQL"
|
|
|
|
|
|
|
|
|
|
on:
|
|
|
|
|
push:
|
2022-09-01 05:53:50 +00:00
|
|
|
|
branches: [main]
|
2020-09-09 13:54:59 +00:00
|
|
|
|
pull_request:
|
|
|
|
|
# The branches below must be a subset of the branches above
|
|
|
|
|
branches: [master]
|
|
|
|
|
schedule:
|
|
|
|
|
- cron: '0 15 * * 5'
|
|
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
|
analyze:
|
|
|
|
|
name: Analyze
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
|
fail-fast: false
|
|
|
|
|
matrix:
|
|
|
|
|
# Override automatic language detection by changing the below list
|
|
|
|
|
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
|
|
|
|
language: ['cpp']
|
|
|
|
|
# Learn more...
|
|
|
|
|
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
|
|
|
|
|
|
|
|
|
steps:
|
|
|
|
|
- name: Checkout repository
|
2022-09-01 05:53:50 +00:00
|
|
|
|
uses: actions/checkout@v3
|
2020-09-09 13:54:59 +00:00
|
|
|
|
with:
|
|
|
|
|
# We must fetch at least the immediate parents so that if this is
|
|
|
|
|
# a pull request then we can checkout the head.
|
|
|
|
|
fetch-depth: 2
|
|
|
|
|
|
|
|
|
|
# If this run was triggered by a pull request event, then checkout
|
|
|
|
|
# the head of the pull request instead of the merge commit.
|
2022-02-08 15:42:05 +00:00
|
|
|
|
#- run: git checkout HEAD^2
|
|
|
|
|
# if: ${{ github.event_name == 'pull_request' }}
|
2020-09-09 13:54:59 +00:00
|
|
|
|
|
|
|
|
|
# Initializes the CodeQL tools for scanning.
|
|
|
|
|
- name: Initialize CodeQL
|
2023-01-16 20:30:04 +00:00
|
|
|
|
uses: github/codeql-action/init@v2
|
2020-09-09 13:54:59 +00:00
|
|
|
|
with:
|
|
|
|
|
languages: ${{ matrix.language }}
|
|
|
|
|
|
|
|
|
|
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
|
|
|
|
|
# If this step fails, then you should remove it and run the build manually (see below)
|
2020-10-30 07:25:10 +00:00
|
|
|
|
#- name: Autobuild
|
|
|
|
|
# uses: github/codeql-action/autobuild@v1
|
2020-09-09 13:54:59 +00:00
|
|
|
|
|
|
|
|
|
# ℹ️ Command-line programs to run using the OS shell.
|
|
|
|
|
# 📚 https://git.io/JvXDl
|
|
|
|
|
|
|
|
|
|
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
|
|
|
|
|
# and modify them (or add more) to build your code if your project
|
|
|
|
|
# uses a compiled language
|
|
|
|
|
|
2020-10-30 07:25:10 +00:00
|
|
|
|
- run: |
|
2022-02-08 08:50:13 +00:00
|
|
|
|
cmake -B build -D ELFIO_BUILD_EXAMPLES=ON
|
|
|
|
|
cmake --build build
|
2020-09-09 13:54:59 +00:00
|
|
|
|
|
|
|
|
|
- name: Perform CodeQL Analysis
|
2023-01-16 20:30:04 +00:00
|
|
|
|
uses: github/codeql-action/analyze@v2
|