Skip to content
Snippets Groups Projects
Commit 9209e8b2 authored by Alexander V. Tikhonov's avatar Alexander V. Tikhonov Committed by Kirill Yukhin
Browse files

github-ci: implement coverity check

Added standalone job with coverity check as described at [1]. This
job uploads results to coverity.com host to 'tarantool' project when
COVERITY_TOKEN environment is enabled. Main coverity functionality
added at .travis.mk make file as standalone targets:

  'test_coverity_debian_no_deps' - used in github-ci actions
  'coverity_debian' - additional target with needed tools check

This job configured by cron scheduler on each Saturday 04:00 am.

Closes #5600

[1] - https://scan.coverity.com/download?tab=cxx
parent 7aa0b018
No related branches found
No related tags found
No related merge requests found
name: CI
on:
schedule:
- cron: '0 4 * * 6'
env:
CI_MAKE: make -f .travis.mk
jobs:
coverity:
runs-on: ubuntu-latest
strategy:
fail-fast: false
# Image built by .gitlab.mk instructions and targets from .travis.mk.
# Also additional installation of coverity tool installation check
# exists in target deps_coverity_debian at .travis.mk file.
container: docker.io/tarantool/testing:debian-buster
steps:
- uses: actions/checkout@v1
- name: test
run: ${CI_MAKE} test_coverity_debian_no_deps
env:
COVERITY_TOKEN: ${{ secrets.COVERITY_TOKEN }}
- name: artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: debug
retention-days: 1000000
path: test/var/artifacts
......@@ -12,6 +12,8 @@ OOS_BUILD_PATH?=/rw_bins
OOS_BUILD_RULE?=test_oos_no_deps
BIN_DIR=/usr/local/bin
OSX_VARDIR?=/tmp/tnt
GIT_DESCRIBE=$(shell git describe HEAD)
COVERITY_BINS=/cov-analysis/bin
CLOJURE_URL="https://download.clojure.org/install/linux-install-1.10.1.561.sh"
LEIN_URL="https://raw.githubusercontent.com/technomancy/leiningen/stable/bin/lein"
......@@ -152,6 +154,36 @@ test_coverage_debian_no_deps: build_coverage_debian
coverage_debian: deps_debian test_coverage_debian_no_deps
# Coverity
build_coverity_debian: configure_debian
export PATH=${PATH}:${COVERITY_BINS} ; \
cov-build --dir cov-int make -j
test_coverity_debian_no_deps: build_coverity_debian
tar czvf tarantool.tgz cov-int
@if [ -n "$(COVERITY_TOKEN)" ]; then \
echo "Exporting code coverity information to scan.coverity.com"; \
curl --form token=$(COVERITY_TOKEN) \
--form email=tarantool@tarantool.org \
--form file=@tarantool.tgz \
--form version=${GIT_DESCRIBE} \
--form description="Tarantool Coverity" \
https://scan.coverity.com/builds?project=tarantool%2Ftarantool ; \
fi;
deps_coverity_debian: deps_debian
# check that coverity tools installed in known place
@ls -al ${COVERITY_BINS} || \
( echo "=================== ERROR: =====================" ; \
echo "Coverity binaries not found in: ${COVERITY_BINS}" ; \
echo "please install it there using instructions from:" ; \
echo " https://scan.coverity.com/download?tab=cxx" ; \
echo ; \
exit 1 )
coverity_debian: deps_coverity_debian test_coverity_debian_no_deps
# ASAN
build_asan_debian:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment