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/
This commit is contained in:
ReenigneArcher 2025-06-07 23:20:13 -04:00 committed by Cameron Gutman
parent f2f85efa33
commit 22a190bdd5

View File

@ -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.