name: "Code Scanning - Action"

permissions:
  security-events: write

on:
  push:
    branches: 
      - main
  pull_request:
  schedule:
    - cron: '0 0 * * 0'

jobs:
  CodeQL-Build:

    strategy:
      fail-fast: false


    # CodeQL runs on ubuntu-latest, windows-latest, and macos-latest
    runs-on: ubuntu-latest

    steps:
    - name: Checkout repository
      uses: actions/checkout@v4

    # Initializes the CodeQL tools for scanning.
    - name: Initialize CodeQL
      uses: github/codeql-action/init@v3
      # Override language selection by uncommenting this and choosing your languages
      # with:
      #   languages: go, javascript, csharp, python, cpp, java

    - name: Manual build
      run : |
        ./dev.sh layout Release linux-x64
      working-directory: src

    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v3
