0

I am trying to run CodeQL on my windows repo. The "Initialize CodeQL" step is taking more than 15 mins and eventually times out as our runers enforce a 15 min time out. How to troubleshoot why it takes this long. There is nothing in the log messages. We could extend the timeout limit but it wont helpm us get to the root case.

here is our YAML file

name: "CodeQL"

on:
  push:
    branches: [ main, release** ]
  pull_request:
    branches: [ main, release** ]

jobs:
  analyze:
    name: Analyze
    runs-on: [self-hosted, windows]
    permissions:
      actions: read
      contents: read
      security-events: write

    strategy:
      fail-fast: false
      matrix:
        language: [ 'csharp' ]

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

    - name: Initialize CodeQL
      uses: github/codeql-action/init@v2
      with:
        languages: ${{ matrix.language }}

    - name: build
      shell: powershell
      run: |
        nuget restore .\src\talent.sln
        msbuild .\src\talent.sln -t:clean,rebuild /p:UseSharedCompilation=false
    - name: Perform CodeQL Analysis
      uses: github/codeql-action/analyze@v2

enter image description here

user2297083
  • 168
  • 11
  • Have you given it more time already and was the analysis successful in that case? If so, you can click on the gear icon at the top right of the job log and then enable "Show timestamps". The timestamps of the log messages might then give a hint where it takes the most time. Also, does your machine have a good internet connection? The CodeQL binaries are ~500 MB, so maybe downloading them is what takes so long for you. – Marcono1234 Aug 02 '23 at 22:16

0 Answers0