mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
47 lines
1.7 KiB
YAML
47 lines
1.7 KiB
YAML
name: "Compile all queries using the latest stable CodeQL CLI"
|
|
|
|
on:
|
|
push:
|
|
branches: # makes sure the cache gets populated - running on the branches people tend to merge into.
|
|
- main
|
|
- "rc/*"
|
|
- "codeql-cli-*"
|
|
pull_request:
|
|
paths:
|
|
- '**.ql'
|
|
- '**.qll'
|
|
- '**/qlpack.yml'
|
|
- '**.dbscheme'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
compile-queries:
|
|
if: github.repository_owner == 'github'
|
|
runs-on: ubuntu-latest-xl
|
|
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Setup CodeQL
|
|
uses: ./.github/actions/fetch-codeql
|
|
with:
|
|
channel: 'release'
|
|
- name: Cache compilation cache
|
|
id: query-cache
|
|
uses: ./.github/actions/cache-query-compilation
|
|
with:
|
|
key: all-queries
|
|
- name: check formatting
|
|
run: find shared */ql -type f \( -name "*.qll" -o -name "*.ql" \) -print0 | xargs -0 -n 3000 -P 10 codeql query format -q --check-only
|
|
- name: compile queries - check-only
|
|
# run with --check-only if running in a PR (github.sha != main)
|
|
if : ${{ github.event_name == 'pull_request' }}
|
|
shell: bash
|
|
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --check-only --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500 --ram=56000
|
|
- name: compile queries - full
|
|
# do full compile if running on main - this populates the cache
|
|
if : ${{ github.event_name != 'pull_request' }}
|
|
shell: bash
|
|
run: codeql query compile -q -j0 */ql/{src,examples} --keep-going --warnings=error --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}" --compilation-cache-size=500 --ram=56000
|