| language: c |
| compiler: |
| - gcc |
| - clang |
| |
| sudo: false |
| dist: trusty |
| |
| env: |
| global: |
| # COVERITY_SCAN_TOKEN |
| - secure: "ZD0KxBhO/CaSE/TOkW+H5nsBbaMolbIPv5DgctcjA1BlTckgc5lK4m+7BIR1Fft6gaeeLOoCY3qUm4kW++Bqk2bTsrx/HvrmVmrzMO572jA74x4E+5lynUnRVaAgBg7cVBcB0hZcUurx8FifNBbgnWlxT/nDWttVnglkz400GCE9/zy+VTJWqt4QAB+6qeKPiG3vRthQdWcHstBI8IIAbvp4rhSUajBBQeZ5ro5RPGNy+iHen+t6tyJmbjiP0Y4qjkKGbfwXHnsseEcuSJQuxSkQ9MWK6t93BFXFSPw5MjHIApMn+4CjRp2JMoVTVfe5fFeZEHxVUmAzy+e5eIeftrUtUlCI293UuxZnw/vpJczn3BWunlhhjqjsCwVeknzGHxlaT+ck8Et1Mdl/3nY/E9dt47/NOzXY2xrAz59GYsdKvvsPoCGgNlAub03Vl0W24I1kjppsmN/zFwazHGqoxIBTwrDOQUmZvPfXA3jAUozrfAdT3YjnRcCG7bbQmacFApqfUm/bqMgapAgozjjxpuBrO1wQSUjjH6NANZsP2Gpk0eAl7FOlBzbVgKPxCQozWCjpKOj3HMnXX458ZQWsboG5J00wwjw9DRNRCkeexLdi832L/BPhUY5JgRlTqqyKr9cr69DvogBF/pLytpSCciF6t9NqqGZYbBomXJLaG84=" |
| # COVERALLS_REPO_TOKEN |
| - secure: "BJUO7GJjP+WgMgSwTTteuc2KKum7Na++92pCLDa3hAzwZZ2OA+MbR9Zd25Yp0kT1K7bIPGDVdg0RksMI9P+Lbun3pajqLWfJpXrAF5IywllQx7bT4x1KeJridJeDnHZVSobTn4oAaGl5JrtpGgXAOjzpgLl1ljP0STyZUF+kC4RSK4Wt2DdT2acj5B8PT6cqR3btfStWgWKlm8t2nOFDGxTCbI4YIwcfgFhOG/ATx7Uc/z08MBI3z7lezy0nBt1/o2gDPZVb4Pa5A390P6Gv0g6mFu1te+P2IFmrWR6mF2Jh5GiJFWR7935rX5d2HxCkCNO7uEmncM4WeDk5PE9+TIcg7T2d9G1JR762aLMvNtUcmlfa6JX/EvveZK47ThwAictwvlD3tgfDy1E7Wdb1O6PtLsUIXRx50UocqBMeSQvOfR1330FuF/td9VGNFqxKW0wDWVIyl8QMK+p7t0aE+2py2Hb3IYVQEk98aWnffvEFeYfNPBywOiVD7trsTFEXKusVypAWDF3kvOmNuetL6ADfPnIfzvPw6DxQzwsxPUo0ahM2C2pzY/MavSlDM8+Q/EZiLkw9g39IgxjDsExD2EEu8U9jyz8iSmbKsrK6Z4L3BWO6a0gFakBAfWR1Rsb15UfVPYlJgPwtAdbgQ65ElgVeyTdkDCuE64iby2nZeP4=" |
| # run coverity scan on gcc build to keep from DOSing coverity |
| - coverity_scan_run_condition='"$CC" = gcc' |
| - PKG_CONFIG_PATH="$(pwd)/cmocka/lib/pkgconfig:/usr/lib/pkgconfig" |
| - LD_LIBRARY_PATH="$(pwd)/cmocka/lib:/usr/lib" |
| - CMOCKA_CFLAGS="-I$(pwd)/cmocka/include -I/usr/include" |
| - CMOCKA_LIBS="-L$(pwd)/cmocka/lib -lcmocka" |
| - PATH="$(pwd)/ibmtpm/src:${PATH}" |
| |
| addons: |
| apt: |
| packages: |
| - autoconf-archive |
| - cmake |
| - libgcrypt20-dev |
| - realpath |
| - lcov |
| - libssl-dev |
| - uthash-dev |
| coverity_scan: |
| project: |
| name: "01org/TPM2.0-TSS" |
| description: Build submitted via Travis-CI |
| notification_email: philip.b.tricca@intel.com |
| build_command_prepend: "./bootstrap && ./configure" |
| build_command: "make --jobs=$(nproc)" |
| branch_pattern: coverity_scan |
| |
| install: |
| - wget http://mirror.twobit.us/tpm2-deps/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) |
| - wget http://mirror.twobit.us/tpm2-deps/cmocka-1.1.1.tar.xz |
| - sha256sum cmocka-1.1.1.tar.xz | grep -q f02ef48a7039aa77191d525c5b1aee3f13286b77a13615d11bc1148753fc0389 |
| - tar -Jxvf cmocka-1.1.1.tar.xz |
| - mkdir cmocka |
| - cd cmocka-1.1.1 |
| - mkdir build |
| - cd build |
| - cmake ../ -DCMAKE_INSTALL_PREFIX=../../cmocka -DCMAKE_BUILD_TYPE=Release |
| - make |
| - make install |
| - cd ../../ |
| - wget http://mirror.twobit.us/tpm2-deps/autoconf-archive-2017.09.28.tar.xz |
| - sha256sum autoconf-archive-2017.09.28.tar.xz | grep -q 5c9fb5845b38b28982a3ef12836f76b35f46799ef4a2e46b48e2bd3c6182fa01 |
| - tar xJf autoconf-archive-2017.09.28.tar.xz |
| - cp autoconf-archive-2017.09.28/m4/ax_code_coverage.m4 m4/ |
| - pip install --user cpp-coveralls |
| |
| before_script: |
| - ./bootstrap |
| |
| script: |
| # short-circuit normal build if we've already done a coverity scan |
| - | |
| if [ "${COVERITY_SCAN_BRANCH}" == 1 ]; then |
| echo "COVERITY_SCAN_BRANCH set, not running normal build." |
| exit 0 |
| fi |
| # build with no tests enabled |
| - mkdir ./build-no-tests |
| - pushd ./build-no-tests |
| - ../configure |
| - make -j$(nproc) |
| - popd |
| # build with all tests enabled |
| - mkdir ./build |
| - pushd ./build |
| - | |
| if [ "$CC" == "gcc" ]; then |
| export CONFIGURE_OPTIONS="--enable-code-coverage"; |
| fi |
| - ../configure --enable-unit --enable-integration $CONFIGURE_OPTIONS |
| - make -j$(nproc) distcheck |
| - make -j$(nproc) check |
| - cat test-suite.log |
| - | |
| for LOG in $(ls -1 test/unit/*.log); do |
| echo "${LOG}" |
| cat ${LOG} |
| done |
| - | |
| for LOG in $(ls -1 test/integration/*.log); do |
| echo "${LOG}" |
| cat ${LOG} |
| done |
| - cat test/tpmclient/tpmclient.log |
| - popd |
| - | |
| if [ "$CC" == "gcc" -a -n "$COVERALLS_REPO_TOKEN" ]; then |
| coveralls --build-root=build --gcov-options '\-lp' |
| fi |