diff options
Diffstat (limited to 'ci/test/04_install.sh')
-rwxr-xr-x | ci/test/04_install.sh | 44 |
1 files changed, 39 insertions, 5 deletions
diff --git a/ci/test/04_install.sh b/ci/test/04_install.sh index 409e87ce04..d0831a4c13 100755 --- a/ci/test/04_install.sh +++ b/ci/test/04_install.sh @@ -6,6 +6,32 @@ export LC_ALL=C.UTF-8 +if [ "$TRAVIS_OS_NAME" == "osx" ]; then + set +o errexit + pushd /usr/local/Homebrew || exit 1 + git reset --hard origin/master + popd || exit 1 + set -o errexit + ${CI_RETRY_EXE} brew update + # brew upgrade returns an error if any of the packages is already up to date + # Failure is safe to ignore, unless we really need an update. + brew upgrade $BREW_PACKAGES || true + + # install new packages (brew install returns an error if already installed) + for i in $BREW_PACKAGES; do + if ! brew list | grep -q $i; then + ${CI_RETRY_EXE} brew install $i + fi + done + + export PATH="/usr/local/opt/ccache/libexec:$PATH" + OPENSSL_PKG_CONFIG_PATH="/usr/local/opt/openssl@1.1/lib/pkgconfig" + export PKG_CONFIG_PATH=$OPENSSL_PKG_CONFIG_PATH:$PKG_CONFIG_PATH + + ${CI_RETRY_EXE} pip3 install $PIP_PACKAGES + +fi + mkdir -p "${BASE_SCRATCH_DIR}" ccache echo "Creating ccache dir if it didn't already exist" @@ -15,7 +41,7 @@ fi export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/ mkdir -p "${BASE_BUILD_DIR}/sanitizer-output/" -export ASAN_OPTIONS="" +export ASAN_OPTIONS="detect_stack_use_after_return=1" export LSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/lsan" export TSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/tsan:log_path=${BASE_BUILD_DIR}/sanitizer-output/tsan" export UBSAN_OPTIONS="suppressions=${BASE_BUILD_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1" @@ -42,11 +68,19 @@ else } fi -DOCKER_EXEC free -m -h -DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) +if [ "$TRAVIS_OS_NAME" == "osx" ]; then + top -l 1 -s 0 | awk ' /PhysMem/ {print}' + echo "Number of CPUs: $(sysctl -n hw.logicalcpu)" +else + DOCKER_EXEC free -m -h + DOCKER_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\) +fi -${CI_RETRY_EXE} DOCKER_EXEC apt-get update -${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES + +if [ "$TRAVIS_OS_NAME" != "osx" ]; then + ${CI_RETRY_EXE} DOCKER_EXEC apt-get update + ${CI_RETRY_EXE} DOCKER_EXEC apt-get install --no-install-recommends --no-upgrade -y $PACKAGES $DOCKER_PACKAGES +fi if [ "$USE_BUSY_BOX" = "true" ]; then echo "Setup to use BusyBox utils" |