1
+ name : ⚙️ Integration Test Bundle on PR (CPP)
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - ' main'
7
+ pull_request :
8
+ branches :
9
+ - ' main'
10
+ workflow_dispatch :
11
+
12
+ jobs :
13
+ analyze :
14
+ name : Analyze
15
+ runs-on : ubuntu-latest
16
+ permissions :
17
+ actions : read
18
+ contents : read
19
+ security-events : write
20
+ strategy :
21
+ fail-fast : false
22
+ matrix :
23
+ language : [ 'cpp' ]
24
+ steps :
25
+ - name : Checkout repository
26
+ uses : actions/checkout@4
27
+
28
+ - name : Install QLT
29
+ id : install-qlt
30
+ uses : ./.github/actions/install-qlt-local
31
+ with :
32
+ qlt-version : ' latest'
33
+ add-to-path : true
34
+
35
+ - name : Validate QLT Installation
36
+ shell : bash
37
+ run : |
38
+ echo -e "Checking QLT Version:"
39
+ echo "QLT Home: ${{ steps.install-qlt.outputs.qlt-home }}"
40
+ qlt version
41
+
42
+ - name : Create Bundle (compiled)
43
+ shell : bash
44
+ run : |
45
+ if ! qlt codeql run install --base example/ --custom-bundle ; then
46
+ echo "Failed to generate bundle."
47
+ exit 1
48
+ fi
49
+
50
+ # ensure bundle runs
51
+
52
+ if ! qlt query run install-packs --use-bundle --base example/ ; then
53
+ echo "Failed to install query packs with tool."
54
+ exit 1
55
+ fi
56
+
57
+ - name : Validate Bundle Existence
58
+ shell : bash
59
+ run : |
60
+ echo "Checking Bundle Existence"
61
+ ls -l ${{ env.QLT_CODEQL_HOME }}/../out/
62
+
63
+ - name : Initialize CodeQL
64
+ uses : github/codeql-action/init@v2
65
+ with :
66
+ languages : ${{ matrix.language }}
67
+ queries : security-extended
68
+ source-root : integration/cpp/src/ # Path containing the example application
69
+ tools : ${{ env.QLT_CODEQL_HOME }}/../out/codeql-bundle.tar.gz
70
+
71
+ - name : Autobuild
72
+ uses : github/codeql-action/autobuild@v2
73
+ with :
74
+ working-directory : integration/cpp/src/ # Path containing the example application
75
+
76
+ - name : Perform CodeQL Analysis
77
+ id : analysis
78
+ uses : github/codeql-action/analyze@v2
79
+
80
+ - name : Validate SARIF Location
81
+ shell : bash
82
+ run : |
83
+ # validate we have the actual sarif results
84
+ echo "Checking SARIF file location at: ${{ steps.analysis.outputs.sarif-output }}"
85
+ ls -l ${{ steps.analysis.outputs.sarif-output }}
0 commit comments