Repository navigation
89 lines (77 loc) · 1.94 KB
/
Copy pathcodeql.yml
File metadata and controls
89 lines (77 loc) · 1.94 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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# SPDX-FileCopyrightText: 2026 Jarosław Pelczar <jarek@jpelczar.com>
#
# SPDX-License-Identifier: BSD-2-Clause
name: CodeQL
on:
push:
branches:
- master
pull_request:
branches:
- master
types:
- opened
- synchronize
- reopened
- ready_for_review
- converted_to_draft
schedule:
- cron: "27 3 * * 1"
workflow_dispatch:
permissions:
actions: read
contents: read
packages: read
pull-requests: read
security-events: write
concurrency:
group: codeql-${{ github.ref }}
cancel-in-progress: true
jobs:
changes:
name: Detect analysis changes
runs-on: ubuntu-26.04
timeout-minutes: 5
outputs:
build: ${{ steps.filter.outputs.build }}
steps:
- uses: actions/checkout@v7
- name: Classify changed files
id: filter
uses: dorny/paths-filter@v4
with:
filters: |
build:
- ".github/workflows/codeql.yml"
- "CMakeLists.txt"
- "cmake/**"
- "include/**"
- "tests/**"
- "scripts/run-native-ci.sh"
analyze:
needs: changes
if: >-
(github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch' ||
needs.changes.outputs.build == 'true') &&
(github.event_name != 'pull_request' ||
github.event.pull_request.draft == false)
name: Analyze C++
runs-on: ubuntu-26.04
timeout-minutes: 45
steps:
- uses: actions/checkout@v7
- name: Initialize CodeQL
uses: github/codeql-action/init@v4
with:
languages: c-cpp
build-mode: manual
queries: security-extended
- name: Build and test
run: >-
./scripts/run-native-ci.sh build RelWithDebInfo
-DJPLCZ_RELOCO_ENABLE_STRICT_WARNINGS=OFF
- name: Analyze
uses: github/codeql-action/analyze@v4
with:
category: /language:c-cpp