forked from valkey-io/libvalkey
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The scan will run weekly or by demand. Signed-off-by: Björn Svensson <[email protected]>
- Loading branch information
Showing
1 changed file
with
17 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,32 @@ | ||
name: "Coverity" | ||
name: Coverity Scan | ||
on: | ||
push: | ||
workflow_dispatch: | ||
schedule: | ||
- cron: '0 1 * * 0' | ||
- cron: '0 10 * * 1' # Mon 10.00 UTC | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
if: github.repository == 'Nordix/hiredis-cluster' | ||
coverity: | ||
# if: github.repository == 'valkey-io/libvalkey' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Download Coverity | ||
run: | | ||
cd .. | ||
wget -q https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_TOKEN}&project=hiredis-cluster" -O coverity_tool.tgz | ||
mkdir coverity | ||
tar xzf coverity_tool.tgz --strip 1 -C coverity | ||
echo "$(pwd)/coverity/bin" >> $GITHUB_PATH | ||
env: | ||
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }} | ||
|
||
- name: Prepare | ||
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | ||
- name: Install dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@a6c3917cc929dd0345bfb2d3feaf9101823370ad # v1.4.2 | ||
with: | ||
packages: libevent-dev cmake | ||
packages: libevent-dev | ||
version: 1.0 | ||
|
||
- name: Build with Coverity | ||
- name: Prepare | ||
run: | | ||
mkdir build; cd build | ||
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_SSL=ON .. | ||
cov-build --dir cov-int make | ||
- name: Submit the result to Coverity | ||
run: | | ||
tar czvf hiredis_cluster.tgz cov-int | ||
curl \ | ||
--form token=${COVERITY_TOKEN} \ | ||
--form [email protected] \ | ||
--form file=@hiredis_cluster.tgz \ | ||
--form version=${GITHUB_SHA} \ | ||
https://scan.coverity.com/builds?project=hiredis-cluster | ||
working-directory: build | ||
env: | ||
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }} | ||
- name: Build, scan and report | ||
uses: vapier/coverity-scan-action@2068473c7bdf8c2fb984a6a40ae76ee7facd7a85 # v1.8.0 | ||
with: | ||
project: libvalkey | ||
token: ${{ secrets.COVERITY_TOKEN }} | ||
email: [email protected] | ||
working-directory: build |