Skip to content

Commit ef2e2e4

Browse files
authored
Merge pull request #16071 from github/calumgrant/cpp-analysis
Add C++ analysis in separate workflow
2 parents 73f71d8 + 03bf804 commit ef2e2e4

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed

Diff for: .github/workflows/cpp-swift-analysis.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: "Code scanning - C++"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- 'rc/*'
8+
pull_request:
9+
branches:
10+
- main
11+
- 'rc/*'
12+
paths:
13+
- 'swift/**'
14+
- '.github/codeql/**'
15+
- '.github/workflows/cpp-swift-analysis.yml'
16+
schedule:
17+
- cron: '0 9 * * 1'
18+
19+
jobs:
20+
CodeQL-Build:
21+
22+
runs-on: ubuntu-latest
23+
24+
permissions:
25+
contents: read
26+
security-events: write
27+
pull-requests: read
28+
29+
steps:
30+
- name: Checkout repository
31+
uses: actions/checkout@v4
32+
33+
# Initializes the CodeQL tools for scanning.
34+
- name: Initialize CodeQL
35+
uses: github/codeql-action/init@main
36+
# Override language selection by uncommenting this and choosing your languages
37+
with:
38+
languages: cpp
39+
config-file: ./.github/codeql/codeql-config.yml
40+
41+
- name: "[Ubuntu] Remove GCC 13 from runner image"
42+
shell: bash
43+
run: |
44+
sudo rm -f /etc/apt/sources.list.d/ubuntu-toolchain-r-ubuntu-test-jammy.list
45+
sudo apt-get update
46+
sudo apt-get install -y --allow-downgrades libc6=2.35-* libc6-dev=2.35-* libstdc++6=12.3.0-* libgcc-s1=12.3.0-*
47+
48+
- name: "Build Swift extractor using Bazel"
49+
run: |
50+
bazel clean --expunge
51+
bazel run //swift:create-extractor-pack --nouse_action_cache --noremote_accept_cached --noremote_upload_local_results --spawn_strategy=local --features=-layering_check
52+
bazel shutdown
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@main

0 commit comments

Comments
 (0)