You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.1KB

  1. #!/usr/bin/env bash
  2. set -e
  3. set -o pipefail
  4. if [[ "${CI_TARGET}" == lint ]]; then
  5. exit
  6. fi
  7. CI_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
  8. source "${CI_DIR}/common/build.sh"
  9. # Test some of the configuration variables.
  10. if [[ -n "${GCOV}" ]] && [[ ! $(type -P "${GCOV}") ]]; then
  11. echo "\$GCOV: '${GCOV}' is not executable."
  12. exit 1
  13. fi
  14. if [[ -n "${LLVM_SYMBOLIZER}" ]] && [[ ! $(type -P "${LLVM_SYMBOLIZER}") ]]; then
  15. echo "\$LLVM_SYMBOLIZER: '${LLVM_SYMBOLIZER}' is not executable."
  16. exit 1
  17. fi
  18. echo "before_script.sh: ccache stats (will be cleared)"
  19. ccache -s
  20. # Reset ccache stats for real results in before_cache.
  21. ccache --zero-stats
  22. if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
  23. # Adds user to a dummy group.
  24. # That allows to test changing the group of the file by `os_fchown`.
  25. sudo dscl . -create /Groups/chown_test
  26. sudo dscl . -append /Groups/chown_test GroupMembership "${USER}"
  27. fi
  28. # Compile dependencies.
  29. build_deps
  30. # Install cluacov for Lua coverage.
  31. if [[ "$USE_LUACOV" == 1 ]]; then
  32. "${DEPS_BUILD_DIR}/usr/bin/luarocks" install cluacov
  33. fi
  34. rm -rf "${LOG_DIR}"
  35. mkdir -p "${LOG_DIR}"