Skip to content

CodeQL

CodeQL #73

name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ master ]
schedule:
- cron: '26 11 * * 5'
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
analyze:
name: Analyze
runs-on: ${{ matrix.config.os }}
permissions:
actions: read
contents: read
security-events: write
strategy:
fail-fast: false
matrix:
config:
- { language: "cpp", os: ubuntu-latest }
- { language: "java", os: ubuntu-latest }
- { language: "python", os: ubuntu-latest }
- { language: "csharp", os: ubuntu-latest }
- { language: "csharp", os: windows-latest }
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive
- uses: ilammy/msvc-dev-cmd@v1
if: ${{ startsWith(matrix.config.os, 'windows') }}
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.config.language }}
config-file: ./.github/codeql/codeql-config.yml
- name: Autobuild Python
if: matrix.config.language == 'python'
uses: github/codeql-action/autobuild@v2
- name: Build C++
if: matrix.config.language == 'cpp'
run: |
sudo apt update
sudo apt install -y ninja-build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=Off
cmake --build build -t vw_cli_bin
- name: Build Java
if: matrix.config.language == 'java'
run: |
sudo apt update
sudo apt install -y ninja-build
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DBUILD_JAVA=On -DBUILD_TESTING=Off
cmake --build build -t vw_jni
- name: Build CSharp .NET Core
if: ${{ matrix.config.language == 'csharp' && startsWith(matrix.config.os, 'ubuntu') }}
run: |
sudo apt update
sudo apt install -y ninja-build
dotnet tool install --global dotnet-t4
cmake -S . -B build -G Ninja -Dvw_BUILD_NET_CORE=On -Dvw_DOTNET_USE_MSPROJECT=Off -DVW_FEAT_FLATBUFFERS=Off -DRAPIDJSON_SYS_DEP=Off -DFMT_SYS_DEP=Off -DSPDLOG_SYS_DEP=Off -DVW_ZLIB_SYS_DEP=Off -DVW_BOOST_MATH_SYS_DEP=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=Off -DBUILD_SHARED_LIBS=Off
cmake --build build --config Debug
- name: Build CSharp .NET Framework
if: ${{ matrix.config.language == 'csharp' && startsWith(matrix.config.os, 'windows') }}
run: |
cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -Dvw_BUILD_NET_FRAMEWORK=On -DVW_FEAT_FLATBUFFERS=Off -DRAPIDJSON_SYS_DEP=Off -DFMT_SYS_DEP=Off -DSPDLOG_SYS_DEP=Off -DVW_ZLIB_SYS_DEP=Off -DVW_BOOST_MATH_SYS_DEP=Off -DVW_BUILD_VW_C_WRAPPER=Off -DBUILD_TESTING=Off -DBUILD_SHARED_LIBS=Off
cmake --build build --config Debug -- /p:UseSharedCompilation=false
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2