travis_linux_before_install.sh 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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 xvf 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. sudo add-apt-repository -y ppa:lttng/ppa
  28. sudo apt-get update -qq
  29. sudo apt-get install -y liburcu4 liburcu-dev
  30. echo -en 'travis_fold:end:script.before_install.external\\r'
  31. echo "=== Installing python packages ===" && echo -en 'travis_fold:start:before_install.python\\r'
  32. pip install --user cpp-coveralls
  33. pip install --user sphinx
  34. pip install --user sphinx_rtd_theme
  35. echo -en 'travis_fold:end:script.before_install.python\\r'
  36. echo "=== Installed versions are ===" && echo -en 'travis_fold:start:before_install.versions\\r'
  37. clang --version
  38. g++ --version
  39. cppcheck --version
  40. valgrind --version
  41. echo -en 'travis_fold:end:script.before_install.versions\\r'
  42. fi