Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Coverity scan #1455

Open
wants to merge 37 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
8829458
Add Coverity scan workflow
omalyshe Jul 22, 2024
047a415
Fix indentation
omalyshe Jul 22, 2024
0f10ea0
Fix indentation -2
omalyshe Jul 22, 2024
e8c5bb6
Fix steps
omalyshe Jul 22, 2024
ae56588
Fix typo
omalyshe Jul 22, 2024
6d5b4b3
Replace slash / with the code %2F
omalyshe Jul 22, 2024
9b5df6d
Typo-2
omalyshe Jul 22, 2024
2e07c2a
Show download progress
omalyshe Jul 22, 2024
7798ca7
Remove the comment
omalyshe Jul 22, 2024
af044fb
Fix curl
omalyshe Jul 22, 2024
87aa7be
Try wget instead of curl to download
omalyshe Jul 22, 2024
134c9b2
Fix syntax
omalyshe Jul 22, 2024
32f8a81
Actions checkout v3
omalyshe Jul 22, 2024
add08ba
Remove comment
omalyshe Jul 22, 2024
cdd2df5
Use curl again
omalyshe Jul 22, 2024
cb9f737
Remove timeout
omalyshe Jul 22, 2024
d878f30
Cleanup
omalyshe Jul 22, 2024
8341edf
Try to download to /tmp
omalyshe Jul 23, 2024
1a95713
Check the file in tmp
omalyshe Jul 23, 2024
4f45942
Change runner
omalyshe Nov 8, 2024
ce8ffe3
Use workspace dir
omalyshe Nov 8, 2024
1460f60
Job permissions write
omalyshe Nov 8, 2024
c7ba3e4
Set write permission for workflow
omalyshe Nov 8, 2024
6feda75
Fix typos
omalyshe Nov 8, 2024
734b62a
Save artifact
omalyshe Nov 8, 2024
6500e72
Fix file name
omalyshe Nov 8, 2024
cc4d025
Fix github_sha usage
omalyshe Nov 8, 2024
bc1a777
Add status badge and clean-up the code
omalyshe Nov 12, 2024
291139a
Add back saving artifact
omalyshe Nov 14, 2024
b2fe19e
Exclude tests
omalyshe Nov 15, 2024
a257b5b
Don't create build directory
omalyshe Nov 15, 2024
7133067
Typo fix
omalyshe Nov 15, 2024
207ac14
Create build dir and cd to it to archive coverity results
omalyshe Nov 15, 2024
28568e1
Fix indentation
omalyshe Nov 15, 2024
d7628b4
Enable test again; fix saving artifacts
omalyshe Nov 15, 2024
018678f
Remove saving artifacts.
omalyshe Nov 18, 2024
9f2b62a
Run coverity only on merge to master
omalyshe Nov 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/coverity.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Coverity Scan

on:
push:
branches: [master]

permissions: read-all

env:
BUILD_CONCURRENCY: 4
COVERITY_PROJECT: oneapi-src%2FoneTBB

jobs:
coverity_linux:
name: Coverity Linux
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v4
- name: Download Linux 64 Coverity Tool
run: |
curl https://scan.coverity.com/download/cxx/linux64 --output ${GITHUB_WORKSPACE}/cov-linux64-tool.tar.gz \
--data "token=${{secrets.COVERITY_TOKEN}}&project=${{env.COVERITY_PROJECT}}"
ls -l ${GITHUB_WORKSPACE}
mkdir cov-linux64-tool
tar -xzf cov-linux64-tool.tar.gz --strip 1 -C cov-linux64-tool
- name: Build with cov-build
run: |
export PATH="${PWD}/cov-linux64-tool/bin:${PATH}"
mkdir build && cd build
cmake -DCMAKE_CXX_STANDARD=20 -DCMAKE_BUILD_TYPE=relwithdebinfo \
-DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc -DTBB_CPF=ON ..
cov-build --dir cov-int make VERBOSE=1 -j${{env.BUILD_CONCURRENCY}}
- name: Archive Coverity build results
run: |
cd build
tar -czvf cov-int.tgz cov-int
- name: Submit Coverity results for analysis
run: |
cd build
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}}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
[![Join the community on GitHub Discussions](https://badgen.net/badge/join%20the%20discussion/on%20github/blue?icon=github)](https://github.com/oneapi-src/oneTBB/discussions)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9125/badge)](https://www.bestpractices.dev/projects/9125)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/oneapi-src/oneTBB/badge)](https://securityscorecards.dev/viewer/?uri=github.com/oneapi-src/oneTBB)
[![Coverity Scan Build Status](https://img.shields.io/coverity/scan/30373.svg)](https://scan.coverity.com/projects/oneapi-src-onetbb)

oneTBB is a flexible C++ library that simplifies the work of adding parallelism
to complex applications, even if you are not a threading expert.
Expand Down
Loading