obs-StreamFX/.github/workflows/codeql-analysis.yml

108 lines
3.3 KiB
YAML
Raw Normal View History

2021-06-15 21:21:07 +00:00
name: "CodeQL"
on:
push:
branches:
- 'master'
tags:
2021-06-15 21:21:07 +00:00
- '*'
pull_request:
branches:
- '*'
2021-06-15 21:21:07 +00:00
env:
OBS_VERSION: "27.0.0-ci"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
steps:
- name: "Clone"
uses: actions/checkout@v2
with:
submodules: recursive
fetch-depth: 0
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
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.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
# 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)
#- name: Autobuild
# uses: github/codeql-action/autobuild@v1
# 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
#- run: |
# make bootstrap
# make release
- name: "Prerequisites: Apt-Get"
shell: bash
run: |
sudo apt-get -qq update
sudo apt-get purge libjpeg9-dev:amd64 libjpeg8-dev:amd64 libjpeg-turbo8-dev:amd64
sudo apt-get install \
build-essential \
checkinstall \
pkg-config \
2021-06-15 21:21:07 +00:00
cmake \
ninja-build \
git \
qt5-default libqwt-qt5-dev libqt5svg5-dev \
libavcodec-dev libavdevice-dev libavfilter-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev \
libcurl4-openssl-dev
2021-06-15 21:21:07 +00:00
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 800 --slave /usr/bin/g++ g++ /usr/bin/g++-9
- name: "Dependencies: Cache"
if: ${{ github.event_name != 'pull_request' }}
2021-06-15 21:21:07 +00:00
uses: actions/cache@v2
with:
path: |
build/temp/autodeps
key: autodeps-${{ matrix.id }}-${{ env.CACHE_VERSION }}
2021-06-15 21:21:07 +00:00
- name: "StreamFX: Configure"
shell: bash
run: |
cmake -H. -B"build/temp" \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX="build/distrib" \
-DPACKAGE_NAME="streamfx-${{ matrix.id }}" \
-DPACKAGE_PREFIX="build/package"
2021-06-15 21:21:07 +00:00
- name: "StreamFX: Build"
shell: bash
run: |
cmake --build "build/temp" --config RelWithDebInfo --target install
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1