travis-coverity.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #! /bin/sh
  2. #
  3. # Travis CI script for weekly (cron) use:
  4. # - use the coverity tool to build and and upload results
  5. #
  6. test -n "$COVERITY_SCAN_TOKEN" || exit 1
  7. test -n "$BUILDDIR" || exit 1
  8. test -n "$SRCDIR" || exit 1
  9. test -d $BUILDDIR || exit 1
  10. test -d $SRCDIR || exit 1
  11. test -f $SRCDIR/CMakeLists.txt || exit 1
  12. cd $BUILDDIR || exit 1
  13. curl -k -o coverity_tool.tar.gz \
  14. -d "token=$COVERITY_SCAN_TOKEN&project=calamares%2Fcalamares" \
  15. https://scan.coverity.com/download/cxx/linux64 || exit 1
  16. mkdir "$BUILDDIR/coveritytool"
  17. tar xvf coverity_tool.tar.gz -C "$BUILDDIR/coveritytool" --strip-components 2
  18. export PATH="$BUILDDIR/coveritytool/bin:$PATH"
  19. cmake -DCMAKE_BUILD_TYPE=Debug -DWEBVIEW_FORCE_WEBKIT=1 -DKDE_INSTALL_USE_QT_SYS_PATHS=ON $SRCDIR || exit 1
  20. cov-build --dir cov-int make -j2
  21. tar caf calamares-ci.tar.xz cov-int
  22. curl -k --form token=$COVERITY_SCAN_TOKEN \
  23. --form email=groot@kde.org \
  24. --form file=@calamares-ci.tar.xz \
  25. --form version="master-`date -u +%Y%m%d`" \
  26. --form description="master on `date -u`" \
  27. https://scan.coverity.com/builds?project=calamares%2Fcalamares