-
Notifications
You must be signed in to change notification settings - Fork 32
/
.travis.yml
50 lines (42 loc) · 1.84 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: cpp
sudo: required
dist: eoan
services:
- docker
matrix:
include:
- os: linux
env: MATRIX_EVAL="COMPILER=g++-7"
- os: linux
env: MATRIX_EVAL="COMPILER=clang-8"
before_install:
- eval "${MATRIX_EVAL}"
- docker run -itd --name pandora -v `pwd`:/pandora/package -e "COMPILER=$COMPILER" pandorapfa/pandorapfa_c17:latest /bin/bash
- if [[ ${TRAVIS_EVENT_TYPE} == cron && ${COMPILER} == g++* ]]; then
export COVERITY_BUILD=true;
export COVERITY_DESC=`date`;
export COVERITY_REPO=`echo ${TRAVIS_REPO_SLUG} | sed 's/\//\%2F/g'`;
else
export COVERITY_BUILD=false;
fi
install:
- if [[ "${COVERITY_BUILD}" == true ]]; then
echo "Downloading Coverity Scan tool...";
wget https://scan.coverity.com/download/linux64 --post-data "token=${COVERITY_SCAN_TOKEN}&project=${COVERITY_REPO}" --no-check-certificate -O ./coverity_tool.tgz; mkdir cov-analysis-linux64; tar -xf coverity_tool.tgz -C cov-analysis-linux64 --strip-components=1 > /dev/null 2>&1;
fi
- docker exec -it pandora /bin/bash -c "source pull_pandora_pfa.sh"
script:
- if [[ "${COVERITY_BUILD}" == true ]]; then
docker exec -it pandora /bin/bash -c "cd /pandora/package && source /pandora/build_pandora_sdk.sh coverity";
elif [[ "${TRAVIS_EVENT_TYPE}" == "cron" ]]; then
echo "Coverity does not use this build";
else
docker exec -it pandora /bin/bash -c "cd /pandora/package && source /pandora/build_pandora_sdk.sh";
fi
- if [[ "${COVERITY_BUILD}" == true ]]; then
curl --form token=${COVERITY_SCAN_TOKEN} --form email=${COVERITY_TARGET_EMAIL} --form file=@build/coverity_build.tgz --form version="master" --form description="${COVERITY_DESC}" https://scan.coverity.com/builds?project=${COVERITY_REPO};
fi
notifications:
email:
on_success: never
on_failure: always