From 22a190bdd5cf8c8eb0c240ab6433fab5485c1fb9 Mon Sep 17 00:00:00 2001 From: ReenigneArcher <42013603+ReenigneArcher@users.noreply.github.com> Date: Sat, 7 Jun 2025 23:20:13 -0400 Subject: [PATCH] ci(code-ql): use no build mode CodeQL now supports no build mode for C++ analysis. See: https://github.blog/changelog/2025-06-03-codeql-can-be-enabled-at-scale-on-c-c-repositories-in-public-preview-using-build-free-scanning/ --- .github/workflows/codeql.yml | 28 ++++++++++++---------------- 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ccc9a08..8b5bc86 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -1,22 +1,13 @@ -# For most projects, this workflow file will not need changing; you simply need -# to commit it to your repository. -# -# You may wish to alter this file to override the set of languages analyzed, -# or to provide custom queries or build logic. -# -# ******** NOTE ******** -# We have attempted to detect the languages in your repository. Please check -# the `language` matrix defined below to confirm you have the correct set of -# supported CodeQL languages. -# +--- name: "CodeQL" on: push: - branches: [ "master" ] + branches: + - master pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] + branches: + - master schedule: - cron: '43 20 * * 3' @@ -29,7 +20,7 @@ jobs: # - https://gh.io/using-larger-runners # Consider using larger runners for possible analysis time improvements. runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} + timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 60 }} permissions: actions: read contents: read @@ -38,7 +29,8 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'cpp' ] + language: + - cpp # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby', 'swift' ] # Use only 'java' to analyze code written in Java, Kotlin or both # Use only 'javascript' to analyze code written in JavaScript, TypeScript or both @@ -54,6 +46,7 @@ jobs: - name: Initialize CodeQL uses: github/codeql-action/init@v2 with: + build-mode: none languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. # By default, queries listed here will override any specified in a config file. @@ -66,6 +59,9 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild + # CodeQL now supports no build mode for C++ + # See: https://github.blog/changelog/2025-06-03-codeql-can-be-enabled-at-scale-on-c-c-repositories-in-public-preview-using-build-free-scanning/ + if: false uses: github/codeql-action/autobuild@v2 # ℹ️ Command-line programs to run using the OS shell.