Skip to content

Produce qlpacks as a build artifact #743

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 24 additions & 5 deletions .github/workflows/code-scanning-pack-gen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
- main
- next
- "rc/**"

push:
branches:
- main
Expand Down Expand Up @@ -98,15 +97,35 @@ jobs:
CODEQL_HOME: ${{ github.workspace }}/codeql_home
run: |
PATH=$PATH:$CODEQL_HOME/codeql

codeql query compile --precompile --threads 0 cpp
codeql query compile --precompile --threads 0 c
# Precompile all queries, and use a compilation cache larger than default
# to ensure we cache all the queries for later steps
codeql query compile --precompile --threads 0 --compilation-cache-size=1024 cpp c

cd ..
zip -r codeql-coding-standards/code-scanning-cpp-query-pack.zip codeql-coding-standards/c/ codeql-coding-standards/cpp/ codeql-coding-standards/.codeqlmanifest.json codeql-coding-standards/supported_codeql_configs.json codeql-coding-standards/scripts/configuration codeql-coding-standards/scripts/reports codeql-coding-standards/scripts/shared codeql-coding-standards/scripts/guideline_recategorization codeql-coding-standards/schemas

- name: Upload GHAS Query Pack
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: code-scanning-cpp-query-pack.zip
path: code-scanning-cpp-query-pack.zip

- name: Create qlpack bundles
env:
CODEQL_HOME: ${{ github.workspace }}/codeql_home
run: |
PATH=$PATH:$CODEQL_HOME/codeql

codeql pack bundle --output=common-cpp-coding-standards.tgz cpp/common/src
codeql pack bundle --output=common-c-coding-standards.tgz c/common/src
codeql pack bundle --output=misra-c-coding-standards.tgz c/misra/src
codeql pack bundle --output=cert-c-coding-standards.tgz c/cert/src
codeql pack bundle --output=cert-cpp-coding-standards.tgz -vvv cpp/cert/src
codeql pack bundle --output=autosar-cpp-coding-standards.tgz -vvv cpp/autosar/src
codeql pack bundle --output=report-cpp-coding-standards.tgz cpp/report/src

- name: Upload qlpack bundles
uses: actions/upload-artifact@v4
with:
name: coding-standards-qlpacks
path: '*-coding-standards.tgz'
4 changes: 4 additions & 0 deletions scripts/release/release-layout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ layout:
- workflow-artifact:
name: "Code Scanning Query Pack Generation"
artifact: code-scanning-cpp-query-pack.zip
coding-standards-qlpacks.zip:
- workflow-artifact:
name: "Code Scanning Query Pack Generation"
artifact: coding-standards-qlpacks
supported_rules_list.csv:
- shell: |
python ${{ coding-standards.root }}/scripts/release/create_supported_rules_list.py --csv > supported_rules_list.csv
Expand Down
Loading