forked from tpm2-software/tpm2-abrmd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
85 lines (79 loc) · 3.55 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
language: c
compiler:
- gcc
- clang
# Requring sudo as a work around for https://github.com/travis-ci/travis-ci/issues/8082
sudo: required
dist: trusty
addons:
apt:
packages:
- autoconf-archive
- dbus
- dbus-x11
- cmake
- libglib2.0-dev
- libdbus-1-dev
- realpath
- valgrind
coverity_scan:
project:
name: 01org/tpm2-abrmd
description: Build submitted via Travis-CI
notification_email: flihp@twobit.us
build_command_prepend: "./configure; make clean"
build_command: "make -j$(nproc)"
branch_pattern: coverity_scan
env:
global:
# COVERITY_SCAN_TOKEN created by coverity using 'travis encrypt' using
# project repo public key
- secure: "hWep+zj8S3ahEGUpOaFbsHVqJ/1Gpf7+4Vos0Op1jyCF0Iw3r/MRxC1AABhxOjPhlNNf9q19b0IjVzVWh+owiFItK/NCgNG+daSuCk945F5tREYKFui+b9JrLMGx8+zfrL+KAy3BVDUUobLrh7vBTdbr9Wg4Kbryt6lBh0wpPnbMqCuUKEwAYw8K9YpoviqGdW1AWwWEpApoXtjukiF3Virc+sfRN/3xpDpHyc7LESzREE/xkZe879e1pFGLys7perOf2JhgKdj0B0otQXPcPuoB8ppFsxTQwbZbcfpZW/l7Vo6aUjmoXw6+DTZK+skne2K9uCP2gjuVwLnkzgBhX8OYVyHscmA+xl0wLIwkTkPcW76bfOVZPkgaKGdKBW7mdl2Tk8DBZfF10XZ0zSLAOEwUeYkIr4vc4ybGRcw9xS6ixXeENzW9BR1NUktSdQBrMSYnrRvDQkEKiUpd7f4uFOKQT0evvjvAI8rXEcC5eo8ODJYHni0Zep/c/rKEPduUsZgZQ18F86q/G3DtIl+69/gDEEUKnDXSFejFfzO+NGWp+jL5aybE0pjzXsiLmwklDiY6po+dgkiTbL3SKlMl8a+miteNu2fgar8D443afGiHABUpiRwNYN/47WombgYst5ZcnnDFmUIYa7SYoxZAeCsCTySdyTso02POFAKYz5U="
# run coverity scan on gcc build to keep from DOSing coverity
- coverity_scan_run_condition='"$CC" = gcc'
- PREFIX=/usr
- DESTDIR="${TRAVIS_BUILD_DIR}/destdir"
- PKG_CONFIG_PATH="${DESTDIR}${PREFIX}/lib/pkgconfig:${PKG_CONFIG_PATH}"
- LD_LIBRARY_PATH="${DESTDIR}${PREFIX}/lib:${LD_LIBRARY_PATH}"
- CFLAGS="-I${DESTDIR}${PREFIX}/include"
- CMOCKA_LIBS="-L${DESTDIR}${PREFIX}/lib -lcmocka"
install:
- mkdir ${DESTDIR}
- wget https://cmocka.org/files/1.1/cmocka-1.1.1.tar.xz
- tar -Jxvf cmocka-1.1.1.tar.xz
- mkdir cmocka-1.1.1/build && pushd cmocka-1.1.1/build
- cmake ../ -DCMAKE_INSTALL_PREFIX=${PREFIX} -DCMAKE_BUILD_TYPE=Release
- make -j$(nproc) install
- popd
- git clone -b master --single-branch https://github.com/01org/tpm2-tss.git
- pushd tpm2-tss
- ./bootstrap
- ./configure --prefix=${PREFIX}
- make -j$(nproc) install
- popd
- sed -i -e "s&\(\/usr\/lib\/lib.*\.la\)&$(pwd)/destdir\1&" ${DESTDIR}${PREFIX}/lib/*.la
- wget https://downloads.sourceforge.net/project/ibmswtpm2/ibmtpm974.tar.gz
- sha256sum ibmtpm974.tar.gz | grep -q ^8e45d86129a0adb95fee4cee51f4b1e5b2d81ed3e55af875df53f98f39eb7ad7
- mkdir ibmtpm
- tar axf ibmtpm974.tar.gz -C ibmtpm
- make -C ibmtpm/src -j$(nproc)
before_script:
- ./bootstrap
script :
- echo 'Configuring source code...' && echo -en 'travis_fold:start:tabrmd-configure\\r'
- ./configure --enable-unit --enable-valgrind --with-simulatorbin=$(pwd)/ibmtpm/src/tpm_server
- echo -en 'travis_fold:end:tabrmd-configure\\r'
- echo "Running make 'distcheck' target..." && echo -en 'travis_fold:start:tabrmd-distcheck\\r'
- dbus-launch make -j$(nproc) distcheck
- echo -en 'travis_fold:end:tabrmd-distcheck\\r'
- echo "Running make 'check-valgrind' target..." && echo -en 'travis_fold:start:tabrmd-check-valgrind\\r'
- dbus-launch make -j$(nproc) check-valgrind
- echo -en 'travis_fold:end:tabrmd-check-valgrind\\r'
- echo 'Dumping unit test logs...' && echo -en 'travis_fold:start:tabrmd-unit-logs\\r'
- |
cat test-suite*.log
for LOG in $(ls -1 test/*.log); do
echo "${LOG}"
cat ${LOG}
done
- echo -en 'travis_fold:end:tabrmd-unit-logs\\r'