Skip to content

Commit 90c8395

Browse files
authored
Update Windows.yml
1 parent d03b220 commit 90c8395

File tree

1 file changed

+39
-7
lines changed

1 file changed

+39
-7
lines changed

.github/workflows/Windows.yml

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ env:
1616
VULKAN_VERSION: 1.4.321.1
1717
CLANG_VERSION: 21.1.1
1818
VULKAN_SDK_PATH: C:\VulkanSDK
19+
CLANG_PROFILE_PRESET: x64-ClangCL-Windows-Profile
1920

2021
jobs:
2122
build:
@@ -59,9 +60,8 @@ jobs:
5960
cmake -B "${{github.workspace}}/${{ env.BUILD_DIR }}" --preset "x64-MSVC-Windows-Debug" -Dmyproject_ENABLE_CPPCHECK="OFF" -DWINDOWS_CI=ON
6061
cmake --build "${{github.workspace}}/${{ env.BUILD_DIR }}"
6162
ctest
62-
63+
6364
########################################## CLANG-CL #############################################################
64-
6565
# for now cppcehck is buggy on windows 2025 github runner. so disable
6666
# a github runner has issues with running vulkan driver code; therefore just verify successful build :)
6767
- name: Prepare for ClangCL Debug
@@ -75,32 +75,64 @@ jobs:
7575
cmake -B "${{github.workspace}}/${{ env.BUILD_DIR }}" --preset "x64-ClangCL-Windows-Debug" -Dmyproject_ENABLE_CPPCHECK="OFF" -DWINDOWS_CI=ON
7676
cmake --build "${{github.workspace}}/${{ env.BUILD_DIR }}" --preset "x64-ClangCL-Windows-Debug"
7777
ctest
78-
78+
& "llvm-profdata.exe" merge -sparse "Test\compile\default.profraw" -o "${{ github.workspace }}/${{ env.BUILD_DIR }}/compileTestSuite.profdata"
79+
& "llvm-cov.exe" report "compileTestSuite.exe" -instr-profile="${{ github.workspace }}/${{ env.BUILD_DIR }}/compileTestSuite.profdata"
80+
& "llvm-cov.exe" export "compileTestSuite.exe" -format=text -instr-profile="${{ github.workspace }}/${{ env.BUILD_DIR }}/compileTestSuite.profdata" | Out-File -FilePath "coverage.json" -Encoding UTF8
81+
& "llvm-cov.exe" show "compileTestSuite.exe" -instr-profile="${{ github.workspace }}/${{ env.BUILD_DIR }}/compileTestSuite.profdata"
82+
7983
- name: Run clang-tidy
8084
shell: pwsh
8185
continue-on-error: true
8286
run: |
8387
$sourceFiles = Get-ChildItem -Path "Src" -Recurse -Include "*.cpp", "*.cc" | ForEach-Object { $_.FullName }
84-
clang-tidy -p="${{github.workspace}}/${{ env.BUILD_DIR }}/compile_commands.json" $sourceFiles
88+
clang-tidy -p="./${{ env.BUILD_DIR }}/compile_commands.json" $sourceFiles
8589
8690
- name: Run Clang static analysis (HTML)
8791
shell: pwsh
8892
continue-on-error: true
8993
run: |
9094
# HTML output (correct flag form)
9195
$sourceFiles = Get-ChildItem -Path "Src" -Recurse -Include "*.cpp", "*.cc" | ForEach-Object { $_.FullName }
92-
clang++ --analyze -Xanalyzer -analyzer-output=html $sourceFiles
96+
clang++ --analyze -DUSE_RUST=1 -Xanalyzer -analyzer-output=html $sourceFiles
9397
98+
#
9499
- name: Run Clang static analysis (scan-build)
95100
shell: pwsh
96101
continue-on-error: true
97102
run: |
98103
New-Item -ItemType Directory -Path "scan-build-reports" -Force
99-
scan-build -o scan-build-reports cmake --build "$env:WORKSPACE/$env:BUILD_DIR" --preset "$env:CLANG_DEBUG_PRESET"
104+
scan-build --use-analyzer="C:\Program Files\LLVM\bin\clang-cl.exe" -o scan-build-reports cmake --build "${{ github.workspace }}/${{ env.BUILD_DIR }}" --preset x64-ClangCL-Windows-Debug
105+
100106
#################################################################################################################
101-
################################### Now run release and build package for clang #################################
107+
############################# Now run on performance benchmarking/profiling #####################################
102108
#################################################################################################################
109+
- name: Prepare for Profiling
110+
run: |
111+
clang --version
112+
shell: pwsh
113+
114+
- name: Configure/build CMake for Profiling (select preset by compiler)
115+
shell: pwsh
116+
# cppcheck has weird bug
117+
run: |
118+
$PRESET = $env:CLANG_PROFILE_PRESET
119+
Write-Output "Using preset: $PRESET"
120+
cmake -B "${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}" --preset "$PRESET" -Dmyproject_ENABLE_CPPCHECK=OFF
121+
cmake --build "${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}" --preset "$PRESET"
122+
123+
- name: Run performance benchmarks
124+
working-directory: ${{ env.BUILD_DIR_RELEASE }}
125+
run: .\perfTestSuite.exe
103126

127+
#################################################################################################################
128+
################################### Now run release and build package for clang #################################
129+
#################################################################################################################
130+
- name: Prepare for Release
131+
run: |
132+
Remove-Item -Path "${{ github.workspace }}/${{ env.BUILD_DIR_RELEASE }}" -Recurse -Force
133+
clang --version
134+
shell: pwsh
135+
104136
- name: Configure CMake for Release (Clang only)
105137
# -DCPACK_GENERATOR=ZIP; NSIS has problems on github windows runner
106138
run: |

0 commit comments

Comments
 (0)