Skip to content
This repository was archived by the owner on Mar 22, 2023. It is now read-only.

Commit 19b0f3d

Browse files
Merge pull request #917 from lukaszstolarczuk/move-coverity-to-gha
Move Coverity job to GHA
2 parents 216012a + c0d4cf5 commit 19b0f3d

6 files changed

Lines changed: 38 additions & 46 deletions

File tree

.github/workflows/coverity.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
2+
name: CPP-coverity
3+
4+
on:
5+
schedule:
6+
# run this job at 00:00 UTC everyday
7+
- cron: '0 0 * * *'
8+
9+
env:
10+
REPO: libpmemobj-cpp
11+
GITHUB_REPO: pmem/libpmemobj-cpp
12+
DOCKERHUB_REPO: pmem/libpmemobj-cpp
13+
14+
jobs:
15+
linux:
16+
name: Linux-coverity
17+
runs-on: ubuntu-latest
18+
env:
19+
COVERITY_SCAN_NOTIFICATION_EMAIL: ${{ secrets.COVERITY_SCAN_NOTIFICATION_EMAIL }}
20+
COVERITY_SCAN_TOKEN: ${{ secrets.COVERITY_SCAN_TOKEN }}
21+
HOST_WORKDIR: /home/runner/work/libpmemobj-cpp/libpmemobj-cpp
22+
WORKDIR: utils/docker
23+
strategy:
24+
matrix:
25+
CONFIG: ["TYPE=coverity OS=ubuntu OS_VER=20.04"]
26+
steps:
27+
- name: Print out the current date and time
28+
run: date
29+
30+
- name: Clone the git repo
31+
uses: actions/checkout@v2
32+
33+
- name: Pull or rebuild the image
34+
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh
35+
36+
- name: Run the build
37+
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh

.travis.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

travis.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

utils/docker/build.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,6 @@ doc_variables_error="To build documentation and upload it as a Github pull reque
2323
variables 'DOC_UPDATE_BOT_NAME', 'DOC_REPO_OWNER' and 'DOC_UPDATE_GITHUB_TOKEN' have to be provided. \
2424
For more details please read CONTRIBUTING.md"
2525

26-
if [[ "$CI_EVENT_TYPE" != "cron" && "$CI_BRANCH" != "coverity_scan" \
27-
&& "$TYPE" == "coverity" ]]; then
28-
echo "INFO: Skip Coverity scan job if build is triggered neither by " \
29-
"'cron' nor by a push to 'coverity_scan' branch"
30-
exit 0
31-
fi
32-
3326
if [[ -z "$OS" || -z "$OS_VER" ]]; then
3427
echo "ERROR: The variables OS and OS_VER have to be set " \
3528
"(eg. OS=fedora, OS_VER=31)."

utils/docker/pull-or-rebuild-image.sh

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,6 @@ set -e
2525
source $(dirname $0)/set-ci-vars.sh
2626
source $(dirname $0)/set-vars.sh
2727

28-
if [[ "$CI_EVENT_TYPE" != "cron" && "$CI_BRANCH" != "coverity_scan" \
29-
&& "$TYPE" == "coverity" ]]; then
30-
echo "INFO: Skip Coverity scan job if build is triggered neither by " \
31-
"'cron' nor by a push to 'coverity_scan' branch"
32-
exit 0
33-
fi
34-
3528
if [[ -z "$OS" || -z "$OS_VER" ]]; then
3629
echo "ERROR: The variables OS and OS_VER have to be set properly " \
3730
"(eg. OS=fedora, OS_VER=31)."

utils/docker/run-coverity.sh

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ cd build
3939
PKG_CONFIG_PATH=/opt/pmdk/lib/pkgconfig/ cmake .. -DCMAKE_BUILD_TYPE=Debug
4040

4141
export COVERITY_SCAN_PROJECT_NAME="$CI_REPO_SLUG"
42-
[[ "$CI_EVENT_TYPE" == "cron" ]] \
43-
&& export COVERITY_SCAN_BRANCH_PATTERN="master" \
44-
|| export COVERITY_SCAN_BRANCH_PATTERN="coverity_scan"
42+
export COVERITY_SCAN_BRANCH_PATTERN="master"
4543
export COVERITY_SCAN_BUILD_COMMAND="make -j$(nproc)"
4644

4745
#

0 commit comments

Comments
 (0)