travis_linux_before_install.sh 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #!/bin/bash
  2. set -ev
  3. if [ -z ${DOCKER+x} ]; then
  4. # Only on non-docker builds required
  5. echo "=== Installing from external package sources ===" && echo -en 'travis_fold:start:before_install.external\\r'
  6. if [ "$CC" = "clang" ]; then
  7. # the ubuntu repo has a somehow broken clang-3.9 compiler. We want to use the one from the llvm repo
  8. # See https://github.com/openssl/openssl/commit/404c76f4ee1dc51c0d200e2b60a6340aadb44e38
  9. sudo cp .travis-apt-pin.preferences /etc/apt/preferences.d/no-ubuntu-clang
  10. curl -sSL "http://apt.llvm.org/llvm-snapshot.gpg.key" | sudo -E apt-key add -
  11. echo "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-3.9 main" | sudo tee -a /etc/apt/sources.list > /dev/null
  12. sudo -E apt-add-repository -y "ppa:ubuntu-toolchain-r/test"
  13. sudo -E apt-get -yq update
  14. sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-3.9 clang-tidy-3.9 libfuzzer-3.9-dev
  15. fi
  16. if [ "$CC" = "tcc" ]; then
  17. mkdir tcc_install && cd tcc_install
  18. wget https://download.savannah.gnu.org/releases/tinycc/tcc-0.9.27.tar.bz2
  19. tar xf tcc-0.9.27.tar.bz2
  20. cd tcc-0.9.27
  21. ./configure
  22. make
  23. sudo make install
  24. cd ../..
  25. rm -rf tcc_install
  26. fi
  27. wget https://github.com/ARMmbed/mbedtls/archive/mbedtls-2.6.1.tar.gz
  28. tar xf mbedtls-2.6.1.tar.gz
  29. cd mbedtls-mbedtls-2.6.1
  30. cmake -DENABLE_TESTING=Off .
  31. make -j
  32. sudo make install
  33. echo -en 'travis_fold:end:script.before_install.external\\r'
  34. echo "=== Installing python packages ===" && echo -en 'travis_fold:start:before_install.python\\r'
  35. pip install --user cpp-coveralls
  36. pip install --user sphinx
  37. pip install --user sphinx_rtd_theme
  38. pip install --user cpplint
  39. echo -en 'travis_fold:end:script.before_install.python\\r'
  40. echo "=== Installed versions are ===" && echo -en 'travis_fold:start:before_install.versions\\r'
  41. clang --version
  42. g++ --version
  43. cppcheck --version
  44. valgrind --version
  45. echo -en 'travis_fold:end:script.before_install.versions\\r'
  46. fi