Skip to content

Commit adb0a81

Browse files
authored
Add Coverity Windows job (#1751)
1 parent 54f3611 commit adb0a81

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

.github/workflows/coverity.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,31 @@ jobs:
6060
--form version="${GITHUB_SHA}" \
6161
--form description="" \
6262
"https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT}}"
63+
coverity_windows:
64+
name: Coverity Windows
65+
if: github.repository == 'uxlfoundation/oneTBB'
66+
runs-on: [windows-latest]
67+
steps:
68+
- uses: actions/checkout@v4
69+
- name: Download Windows 64 Coverity Tool
70+
run: |
71+
curl https://scan.coverity.com/download/cxx/win64 -o cov-win64-tool.zip -d "token=${{secrets.COVERITY_TOKEN}}&project=${{env.COVERITY_PROJECT}}"
72+
7z x cov-win64-tool.zip
73+
del cov-win64-tool.zip
74+
move cov-analysis-win64* cov-win64-tool
75+
- name: Setup MSBuild
76+
uses: microsoft/setup-msbuild@v2
77+
- name: Build with cov-build
78+
shell: bash
79+
run: |
80+
export PATH="${PWD}/cov-win64-tool/bin:${PATH}"
81+
cmake -DCMAKE_CXX_STANDARD=14 -DCMAKE_BUILD_TYPE=relwithdebinfo \
82+
-DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -DTBB_CPF=ON .
83+
cov-configure --msvc
84+
cov-build --dir cov-int msbuild.exe ALL_BUILD.vcxproj -m -v:n
85+
- name: Archive Coverity build results
86+
run: |
87+
7z a -r cov-int.zip cov-int
88+
- name: Submit Coverity results for analysis
89+
run: |
90+
curl --form token="${{ secrets.COVERITY_TOKEN }}" --form email="${{ secrets.COVERITY_EMAIL }}" --form [email protected] --form version="${GITHUB_SHA}" --form description="" "https://scan.coverity.com/builds?project=${{env.COVERITY_PROJECT}}"

0 commit comments

Comments
 (0)