Skip to content

CodeQL

CodeQL #263

name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 16 * * 6'
jobs:
analyze_main:
name: Analyze Local
if: github.repository_owner == 'ParadoxGameConverters'
runs-on: [self-hosted, linux]
strategy:
fail-fast: false
matrix:
language: ['cpp']
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- name: Build solution
run: |
chmod u+x build_linux.sh
./build_linux.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
- name: Cleanup
uses: colpal/actions-clean@v1
if: always()
analyze:
name: Analyze
if: github.repository_owner != 'ParadoxGameConverters'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: [ 'cpp' ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: recursive
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
- run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-11 g++-11
sudo apt-get install libgtest-dev
sudo ln -s /usr/bin/gcc-11 /usr/local/bin/gcc
sudo ln -s /usr/bin/g++-11 /usr/local/bin/g++
# Run your build commands next
chmod u+x ./build_linux_foreign.sh
bash ./build_linux_foreign.sh
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2