summaryrefslogtreecommitdiff
path: root/.ci
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2019-06-25 12:11:33 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-06-25 12:11:33 -0400
commit4f0989f2904c20ad2768b8244190b82b701c0564 (patch)
tree214791646acc23c2c0b87452882d155a1351ada6 /.ci
parent8103b5687479385b3b2ba0fe5eddb9e6ce6b50c4 (diff)
ci: travis: add coverity build job to be run from cron
Summary: We finally have regular Coverity Scan runs back to our CI. It gets triggered from the cron jobs on Travis. As we are not able to identify if it comes from a daily or weekly cron build I added a check to only run the scan build on a Saturday so we should have a nice and fresh report on Monday morning in our mailboxes. Reviewers: zmike, bu5hm4n Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9175
Diffstat (limited to '.ci')
-rwxr-xr-x.ci/ci-configure.sh16
-rwxr-xr-x.ci/ci-make-benchmark.sh3
-rwxr-xr-x.ci/ci-make-check.sh4
-rwxr-xr-x.ci/ci-make-install.sh3
-rwxr-xr-x.ci/ci-make.sh11
-rwxr-xr-x.ci/coverity-tools-install.sh4
-rwxr-xr-x.ci/coverity-upload.sh8
7 files changed, 48 insertions, 1 deletions
diff --git a/.ci/ci-configure.sh b/.ci/ci-configure.sh
index 7802c6b409..cc1f8497d0 100755
--- a/.ci/ci-configure.sh
+++ b/.ci/ci-configure.sh
@@ -56,6 +56,17 @@ if [ "$DISTRO" != "" ] ; then
56 OPTS="$OPTS $RELEASE_READY_LINUX_COPTS" 56 OPTS="$OPTS $RELEASE_READY_LINUX_COPTS"
57 fi 57 fi
58 58
59 if [ "$1" = "coverity" ]; then
60 if [ $(date +%A) != "Saturday" ]; then
61 echo "Not Saturday so we are not running our weekly Coverity scan build."
62 exit 0
63 fi
64 OPTS="$OPTS $WAYLAND_LINUX_COPTS"
65 travis_fold cov-download cov-download
66 docker exec --env COVERITY_SCAN_TOKEN=$COVERITY_SCAN_TOKEN $(cat $HOME/cid) sh -c '.ci/coverity-tools-install.sh'
67 travis_endfold cov-download
68 fi
69
59 if [ "$1" = "mingw" ]; then 70 if [ "$1" = "mingw" ]; then
60 OPTS="$OPTS $MINGW_COPTS" 71 OPTS="$OPTS $MINGW_COPTS"
61 travis_fold cross-native cross-native 72 travis_fold cross-native cross-native
@@ -65,6 +76,11 @@ if [ "$DISTRO" != "" ] ; then
65 docker exec --env EIO_MONITOR_POLL=1 --env PKG_CONFIG_PATH="/ewpi-64-install/lib/pkgconfig/" \ 76 docker exec --env EIO_MONITOR_POLL=1 --env PKG_CONFIG_PATH="/ewpi-64-install/lib/pkgconfig/" \
66 $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS" 77 $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
67 travis_endfold meson 78 travis_endfold meson
79 elif [ "$1" = "coverity" ]; then
80 travis_fold meson meson
81 docker exec --env EIO_MONITOR_POLL=1 --env CFLAGS="-fdirectives-only" --env CC="gcc" --env CXX="g++"\
82 --env CXXFLAGS="-fdirectives-only" $(cat $HOME/cid) sh -c "mkdir build && meson build $OPTS"
83 travis_endfold meson
68 else 84 else
69 travis_fold meson meson 85 travis_fold meson meson
70 docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \ 86 docker exec --env EIO_MONITOR_POLL=1 --env CC="ccache gcc" \
diff --git a/.ci/ci-make-benchmark.sh b/.ci/ci-make-benchmark.sh
index d1689a2844..1fe0f9796f 100755
--- a/.ci/ci-make-benchmark.sh
+++ b/.ci/ci-make-benchmark.sh
@@ -5,6 +5,9 @@ set -e
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8if [ "$1" = "coverity" ] ; then
9 exit 0
10fi
8travis_fold benchmark "ninja benchmark" 11travis_fold benchmark "ninja benchmark"
9echo "Nothing to do here, the benchmarks don't seem to terminate" 12echo "Nothing to do here, the benchmarks don't seem to terminate"
10#else 13#else
diff --git a/.ci/ci-make-check.sh b/.ci/ci-make-check.sh
index d331993315..36f1f2de58 100755
--- a/.ci/ci-make-check.sh
+++ b/.ci/ci-make-check.sh
@@ -9,6 +9,10 @@ if [ "$1" = "mingw" ] ; then
9 exit 0 9 exit 0
10fi 10fi
11 11
12if [ "$1" = "coverity" ] ; then
13 exit 0
14fi
15
12#T7151 16#T7151
13if [ "$1" = "options-enabled" ] || [ "$1" = "options-disabled" ] ; then 17if [ "$1" = "options-enabled" ] || [ "$1" = "options-disabled" ] ; then
14 exit 0 18 exit 0
diff --git a/.ci/ci-make-install.sh b/.ci/ci-make-install.sh
index 0984b06cb9..74769896c3 100755
--- a/.ci/ci-make-install.sh
+++ b/.ci/ci-make-install.sh
@@ -5,6 +5,9 @@ set -e
5if [ "$1" = "release-ready" ] ; then 5if [ "$1" = "release-ready" ] ; then
6 exit 0 6 exit 0
7fi 7fi
8if [ "$1" = "coverity" ] ; then
9 exit 0
10fi
8travis_fold install "ninja install" 11travis_fold install "ninja install"
9if [ "$DISTRO" != "" ] ; then 12if [ "$DISTRO" != "" ] ; then
10 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install 13 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build install
diff --git a/.ci/ci-make.sh b/.ci/ci-make.sh
index 0e955bc4a7..70b56490cc 100755
--- a/.ci/ci-make.sh
+++ b/.ci/ci-make.sh
@@ -7,7 +7,16 @@ if [ "$1" = "release-ready" ] ; then
7fi 7fi
8travis_fold ninja ninja 8travis_fold ninja ninja
9if [ "$DISTRO" != "" ] ; then 9if [ "$DISTRO" != "" ] ; then
10 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build 10 if [ "$1" = "coverity" ] ; then
11 if [ $(date +%A) != "Saturday" ]; then
12 exit 0
13 fi
14 docker exec --env EIO_MONITOR_POLL=1 --env PATH="/src/cov-analysis-linux64-2019.03/bin:$PATH" $(cat $HOME/cid) sh -c "cov-build --dir cov-int ninja -C build"
15 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) sh -c "tar caf efl-$(git rev-parse --short HEAD).xz cov-int"
16 docker exec --env EIO_MONITOR_POLL=1 --env COVERITY_SCAN_TOKEN=$COVERITY_SCAN_TOKEN $(cat $HOME/cid) sh -c ".ci/coverity-upload.sh"
17 else
18 docker exec --env EIO_MONITOR_POLL=1 $(cat $HOME/cid) ninja -C build
19 fi
11else 20else
12 export PATH="$(brew --prefix gettext)/bin:$PATH" 21 export PATH="$(brew --prefix gettext)/bin:$PATH"
13 ninja -C build 22 ninja -C build
diff --git a/.ci/coverity-tools-install.sh b/.ci/coverity-tools-install.sh
new file mode 100755
index 0000000000..08dd9d1811
--- /dev/null
+++ b/.ci/coverity-tools-install.sh
@@ -0,0 +1,4 @@
1#!/bin/sh
2
3wget https://scan.coverity.com/download/linux64 --post-data="token=$COVERITY_SCAN_TOKEN&project=Enlightenment+Foundation+Libraries" -O coverity_tool.tgz
4tar xzf coverity_tool.tgz
diff --git a/.ci/coverity-upload.sh b/.ci/coverity-upload.sh
new file mode 100755
index 0000000000..0b68bcb70b
--- /dev/null
+++ b/.ci/coverity-upload.sh
@@ -0,0 +1,8 @@
1#!/bin/sh
2
3curl --form token=$COVERITY_SCAN_TOKEN \
4 --form email=stefan@datenfreihafen.org \
5 --form file=@efl-$(git rev-parse --short HEAD).xz \
6 --form version=$(git rev-parse --short HEAD) \
7 --form description="Submission from Travis CI" \
8 https://scan.coverity.com/builds?project=Enlightenment+Foundation+Libraries