Skip to content

Commit a887cd0

Browse files
committed
Separate workflow
1 parent d3b22c1 commit a887cd0

File tree

2 files changed

+78
-60
lines changed

2 files changed

+78
-60
lines changed

.github/workflows/coverity.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Coverity check
2+
name: Coverity
3+
4+
on:
5+
pull_request:
6+
7+
workflow_dispatch:
8+
inputs:
9+
cov_push_tarball:
10+
description: 'Send Coverity tarball'
11+
required: true
12+
default: 'true'
13+
type: boolean
14+
schedule:
15+
- cron: '0 0 * * *'
16+
17+
jobs:
18+
coverity:
19+
name: Coverity
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout repository
23+
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
24+
25+
- name: Install apt packages
26+
run: |
27+
sudo apt-get update
28+
sudo apt-get install -y cmake hwloc libhwloc-dev libjemalloc-dev libnuma-dev libtbb-dev
29+
30+
- name: Download Coverity
31+
run: |
32+
wget -nv https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=oneapi-src%2Funified-memory-framework" -O coverity_tool.tgz
33+
34+
- name: Extract Coverity
35+
run: |
36+
tar xzvf coverity_tool.tgz
37+
38+
- name: Configure CMake
39+
run: >
40+
cmake
41+
-B ${{github.workspace}}/build
42+
-DCMAKE_BUILD_TYPE=Release
43+
-DUMF_FORMAT_CODE_STYLE=OFF
44+
-DUMF_DEVELOPER_MODE=OFF
45+
-DUMF_ENABLE_POOL_TRACKING=ON
46+
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
47+
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
48+
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
49+
50+
- name: Build
51+
run: |
52+
export COVERITY_DIR=$(find . -maxdepth 1 -type d -name "cov-analysis-linux64-*" | head -n 1)
53+
if [ -n "$COVERITY_DIR" ]; then
54+
export PATH="$PATH:$COVERITY_DIR/bin"
55+
fi
56+
cov-build --dir ${{github.workspace}}/cov-int cmake --build ${{github.workspace}}/build --config Release -j$(nproc)
57+
58+
- name: Create tarball to analyze
59+
run: >
60+
tar czvf cov-int_umf.tgz cov-int
61+
62+
- name: Push to Coverity Scan
63+
if: ${{ github.event.inputs.cov_push_tarball == 'true' }}
64+
run: |
65+
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
66+
echo $BRANCH_NAME
67+
echo ${GITHUB_REF_NAME}
68+
COMMIT_ID=$(echo $GITHUB_SHA)
69+
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
70+
71+
--form file=@cov-int_umf.tgz \
72+
--form version="$COMMIT_ID" \
73+
--form description="$BRANCH_NAME:$COMMIT_ID" \
74+
https://scan.coverity.com/builds\?project\=oneapi-src%2Funified-memory-framework

.github/workflows/nightly.yml

Lines changed: 4 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ on:
66
workflow_dispatch:
77
inputs:
88
cov_push_tarball:
9-
description: 'Send Coverity tarball'
10-
required: true
11-
default: 'true'
12-
type: boolean
9+
description: 'Send Coverity tarball'
10+
required: true
11+
default: 'true'
12+
type: boolean
1313
schedule:
1414
- cron: '0 0 * * *'
1515

@@ -51,59 +51,3 @@ jobs:
5151

5252
- name: Run tests under valgrind
5353
run: ${{github.workspace}}/test/test_valgrind.sh ${{github.workspace}} ${{github.workspace}}/build ${{matrix.tool}}
54-
55-
coverity:
56-
name: Coverity
57-
runs-on: ubuntu-latest
58-
steps:
59-
- name: Checkout repository
60-
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
61-
62-
- name: Install apt packages
63-
run: |
64-
sudo apt-get update
65-
sudo apt-get install -y cmake hwloc libhwloc-dev libjemalloc-dev libnuma-dev libtbb-dev
66-
67-
- name: Download Coverity
68-
run: |
69-
wget -nv https://scan.coverity.com/download/linux64 --post-data "token=${{ secrets.COVERITY_SCAN_TOKEN }}&project=oneapi-src%2Funified-memory-framework" -O coverity_tool.tgz
70-
71-
- name: Extract Coverity
72-
run: |
73-
tar xzf coverity_tool.tgz
74-
75-
- name: Configure CMake
76-
run: >
77-
cmake
78-
-B ${{github.workspace}}/build
79-
-DCMAKE_BUILD_TYPE=Release
80-
-DUMF_FORMAT_CODE_STYLE=OFF
81-
-DUMF_DEVELOPER_MODE=OFF
82-
-DUMF_ENABLE_POOL_TRACKING=OFF
83-
-DUMF_BUILD_LIBUMF_POOL_SCALABLE=ON
84-
-DUMF_BUILD_LIBUMF_POOL_DISJOINT=ON
85-
-DUMF_BUILD_LIBUMF_POOL_JEMALLOC=ON
86-
87-
- name: Build
88-
run: |
89-
export COVERITY_DIR=$(find . -maxdepth 1 -type d -name "cov-analysis-linux64-*" | head -n 1)
90-
if [ -n "$COVERITY_DIR" ]; then
91-
export PATH="$PATH:$COVERITY_DIR/bin"
92-
fi
93-
cov-build --dir ${{github.workspace}}/cov-int cmake --build ${{github.workspace}}/build --config Release -j$(nproc)
94-
95-
- name: Create tarball to analyze
96-
run: >
97-
tar czvf cov-int_umf.tgz cov-int
98-
99-
- name: Push to Coverity Scan
100-
if: ${{ github.event.inputs.cov_push_tarball == 'true' }}
101-
run: |
102-
BRANCH_NAME=$(echo ${GITHUB_REF#refs/heads/})
103-
COMMIT_ID=$(echo $GITHUB_SHA)
104-
curl --form token=${{ secrets.COVERITY_SCAN_TOKEN }} \
105-
106-
--form file=@cov-int_umf.tgz \
107-
--form version="$COMMIT_ID" \
108-
--form description="$BRANCH_NAME:$COMMIT_ID" \
109-
https://scan.coverity.com/builds\?project\=oneapi-src%2Funified-memory-framework

0 commit comments

Comments
 (0)