-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (47 loc) · 1.84 KB
/
Copy pathProfileBuild.yml
File metadata and controls
56 lines (47 loc) · 1.84 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
name: Profile Build
on: [workflow_dispatch]
jobs:
profile:
runs-on: windows-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Install ClangBuildAnalyzer
run: |
curl -L https://github.com/aras-p/ClangBuildAnalyzer/releases/download/v1.6.0/ClangBuildAnalyzer.exe -o ClangBuildAnalyzer.exe
echo "$github_workspace" >> $GITHUB_PATH
- name: Build Project
uses: ./.github/actions/Desktop-build
with:
os: ${{ runner.os }}
compiler: llvm
cmake_flags: -DCMAKE_CXX_FLAGS="-ftime-trace"
- name: Organize Traces
shell: pwsh
run: |
New-Item -ItemType Directory -Force -Path compile_traces
Get-ChildItem -Path build -Filter "*.json" -Recurse | Where-Object { $_.Name -ne "global_build_trace.json" } | Copy-Item -Destination compile_traces/
- name: Run ClangBuildAnalyzer
shell: pwsh
run: |
.\ClangBuildAnalyzer.exe --all compile_traces result
.\ClangBuildAnalyzer.exe --analyze result | Out-File -FilePath build_result.txt
Copy-Item build_result.txt -Destination compile_traces/
- name: Upload Per-File Compilation Traces
uses: actions/upload-artifact@v4
with:
name: clang-compile-details
path: compile_traces/
retention-days: 1
- name: Add Analysis to Job Summary
shell: pwsh
run: |
$content = Get-Content build_result.txt
echo "## 📊 Clang Build Analysis" >> $env:GITHUB_STEP_SUMMARY
echo "<details><summary>Click to expand full report</summary>" >> $env:GITHUB_STEP_SUMMARY
echo "" >> $env:GITHUB_STEP_SUMMARY
echo '```text' >> $env:GITHUB_STEP_SUMMARY
echo $content >> $env:GITHUB_STEP_SUMMARY
echo '```' >> $env:GITHUB_STEP_SUMMARY
echo "</details>" >> $env:GITHUB_STEP_SUMMARY