-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (56 loc) · 2.29 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
51
52
53
54
55
56
57
58
59
60
61
62
63
language: c
sudo: required
services:
- docker
env:
global:
- ci_env=`bash <(curl -s https://codecov.io/env)`
- COVERITY_SCAN_PROJECT_NAME="jluebbe/rauc"
- COVERITY_SCAN_NOTIFICATION_EMAIL="[email protected]"
- COVERITY_SCAN_BRANCH_PATTERN="master"
- COVERITY_SCAN_BUILD_COMMAND_PREPEND="cov-configure --comptype gcc --compiler gcc-6 --template && ./autogen.sh && ./configure CC=gcc-6"
- COVERITY_SCAN_BUILD_COMMAND="make V=1"
before_script:
- docker pull rauc/testing:latest
script:
# Prepare environment for Coverity tool
- |
PLATFORM=`uname`
export TOOL_BASE="/tmp/coverity-scan-analysis"
export SCAN_URL="https://scan.coverity.com"
export UPLOAD_URL="https://scan.coverity.com/builds"
export TOOL_ARCHIVE="/tmp/cov-analysis-${PLATFORM}.tgz"
# Get Coverity tool
# - test/get-coverity.sh
# - TOOL_DIR="$(find $TOOL_BASE -type d -name 'cov-analysis*' || exit 0)"
# Create container and export env variables for Coverity scan
- env | grep -E "TRAVIS|COV|TOOL|URL" > .cov-env
- |
docker run -dit --env-file .cov-env \
-v "$PWD":/home/travis -w /home/travis \
--tmpfs /tmp/uml:exec,mode=777 \
--tmpfs /tmp:exec \
-v ${TOOL_BASE}:${TOOL_BASE} \
-u travis $ci_env \
--name rauc-ci rauc/testing:latest bash
# Make sure Coverity script is executable
# - docker cp test/run-coverity.sh rauc-ci:/usr/local/bin
# Run Coverity Analysis
# - docker exec -it rauc-ci run-coverity.sh build
# - docker exec -it rauc-ci run-coverity.sh upload
- docker exec -it rauc-ci ./autogen.sh
- docker exec -it rauc-ci ./configure --enable-code-coverage
- docker exec -it rauc-ci make clean
- docker exec -it rauc-ci make -j2
- docker exec -it rauc-ci make doc SPHINXOPTS=-W
- docker exec -it rauc-ci make check TESTS=
- docker exec -it rauc-ci /bin/sh -c 'export TMPDIR=/tmp/uml && ./uml-test'
- docker exec -it rauc-ci make distcheck
- docker exec -it rauc-ci /bin/sh -c 'cd /home/travis/contrib/cgi && ./autogen.sh && ./configure && make clean && make -j2 && make distcheck'
- ./uncrustify.sh && git diff --exit-code
after_success:
- docker exec -it rauc-ci /usr/bin/codecov -t $CODECOV_TOKEN
after_failure:
- cat test/*.log || true
- cat test-suite.log || true
- cat rauc-*/_build/sub/test-suite.log || true