-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
71 lines (60 loc) · 2.72 KB
/
action.yml
File metadata and controls
71 lines (60 loc) · 2.72 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: C/C++test with Make
on:
# Triggers the workflow on push or pull request events but only for the master (main) branch.
push:
branches: [ master, main ]
pull_request:
branches: [ master, main ]
# Allows you to run this workflow manually from the Actions tab.
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel.
jobs:
run-cpptest-make:
name: Analyze project with C/C++test
# Specifies required permissions for upload-sarif action
permissions:
# required for all workflows
security-events: write
# only required for workflows in private repositories
actions: read
contents: read
# Specifies the type of runner that the job will run on.
runs-on: self-hosted
# Steps represent a sequence of tasks that will be executed as part of the job.
steps:
# Checks out your repository under $GITHUB_WORKSPACE, so that your job can access it.
#- name: Checkout code
# uses: actions/checkout@v4
# Builds your Make project using 'cpptesttrace' to collect input data for code analysis.
# Be sure 'cpptesttrace' is available on $PATH.
#- name: Build project
# run: cpptesttrace make clean all
# Runs code analysis with C/C++test.
- name: Run C/C++test
# Use the 'run-cpptest-action' GitHub action.
uses: parasoft/run-cpptest-action@2.0.2
with:
# To enable SARIF reporting, put additional configuration entries into config.properties file:
# - for C/C++test 2021.1 or newer - using built-in SARIF reporting:
# report.format=sarif
# - for older versions of C/C++test - using legacy SARIF reporting:
# report.format=custom
# report.custom.extension=sarif
# report.custom.xsl.file=${PARASOFT_SARIF_PRO_XSL}
# report.location_details=true
# additionalParams: '-localsettings config.properties'
# commandLinePattern: '${cpptestcli} -data ../workspace -config "builtin://Recommended Rules" -report "$_report/" ${additionalParams}'
commandLinePattern: '${cpptestcli} -data d:\workspace\2024.1 -resource ATM -config "builtin://Recommended Rules" -report "_report/" -property "report.format=sarif"'
# Uploads analysis results in the SARIF format, so that they are displayed as GitHub code scanning alerts.
- name: Upload results (SARIF)
if: always()
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: _report/report.sarif
# Uploads an archive that includes all report files (.xml, .html, .sarif).
- name: Archive reports
if: always()
uses: actions/upload-artifact@v4
with:
name: Static analysis reports
path: _report/*.*