Skip to content

CodeQL

CodeQL #223

---
name: "CodeQL"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '21 13 * * 4'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
# Ensure vcpkg builtin registry is up-to-date
- name: Update vcpkg builtin registry
run: |
cd $VCPKG_INSTALLATION_ROOT
git reset --hard
git pull
- name: Setup .NET SDK v8.0.x
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: cpp, csharp
# Expose GitHub Runtime environment variables for vcpkg caching.
- name: Expose GitHub Runtime
uses: crazy-max/ghaction-github-runtime@v3
- name: Build C++ library and CSharp projects
run: |
./build_unix.sh
dotnet build csharp.benchmark --configuration=Release
dotnet build csharp.test --configuration=Release
dotnet build csharp --configuration=Release
env:
VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3