bitcoin/ci/test/04_install.sh

172 lines
7.6 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
#
# Copyright (c) 2018-2022 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
2018-08-07 11:50:05 +02:00
export LC_ALL=C.UTF-8
if [[ $QEMU_USER_CMD == qemu-s390* ]]; then
export LC_ALL=C
fi
2019-11-29 20:46:49 +01:00
# Create folders that are mounted into the docker
mkdir -p "${CCACHE_DIR}"
mkdir -p "${PREVIOUS_RELEASES_DIR}"
2019-01-16 17:49:01 +01:00
export ASAN_OPTIONS="detect_stack_use_after_return=1:check_initialization_order=1:strict_init_order=1"
export LSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/lsan"
2020-05-30 13:56:31 +02:00
export TSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/tsan:halt_on_error=1:log_path=${BASE_SCRATCH_DIR}/sanitizer-output/tsan"
export UBSAN_OPTIONS="suppressions=${BASE_ROOT_DIR}/test/sanitizer_suppressions/ubsan:print_stacktrace=1:halt_on_error=1:report_error_type=1"
env | grep -E '^(BITCOIN_CONFIG|BASE_|QEMU_|CCACHE_|LC_ALL|BOOST_TEST_RANDOM|DEBIAN_FRONTEND|CONFIG_SHELL|(ASAN|LSAN|TSAN|UBSAN)_OPTIONS|PREVIOUS_RELEASES_DIR)' | tee /tmp/env
2020-11-09 10:17:00 +01:00
if [[ $BITCOIN_CONFIG = *--with-sanitizers=*address* ]]; then # If ran with (ASan + LSan), Docker needs access to ptrace (https://github.com/google/sanitizers/issues/764)
CI_CONTAINER_CAP="--cap-add SYS_PTRACE"
fi
2019-11-22 19:58:53 +01:00
export P_CI_DIR="$PWD"
export BINS_SCRATCH_DIR="${BASE_SCRATCH_DIR}/bins/"
2019-11-22 19:58:53 +01:00
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Creating $CI_IMAGE_NAME_TAG container to run in"
LOCAL_UID=$(id -u)
LOCAL_GID=$(id -g)
# the name isn't important, so long as we use the same UID
LOCAL_USER=nonroot
${CI_RETRY_EXE} docker pull "$CI_IMAGE_NAME_TAG"
2019-08-11 17:57:21 +02:00
if [ -n "${RESTART_CI_DOCKER_BEFORE_RUN}" ] ; then
echo "Restart docker before run to stop and clear all containers started with --rm"
systemctl restart docker
fi
2021-11-07 13:13:39 +01:00
# shellcheck disable=SC2086
CI_CONTAINER_ID=$(docker run $CI_CONTAINER_CAP --rm --interactive --detach --tty \
--mount type=bind,src=$BASE_ROOT_DIR,dst=/ro_base,readonly \
--mount type=bind,src=$CCACHE_DIR,dst=$CCACHE_DIR \
--mount type=bind,src=$DEPENDS_DIR,dst=$DEPENDS_DIR \
--mount type=bind,src=$PREVIOUS_RELEASES_DIR,dst=$PREVIOUS_RELEASES_DIR \
-w $BASE_ROOT_DIR \
--env-file /tmp/env \
--name $CONTAINER_NAME \
$CI_IMAGE_NAME_TAG)
2023-01-09 10:42:19 +01:00
export CI_CONTAINER_ID
# Create a non-root user inside the container which matches the local user.
#
# This prevents the root user in the container modifying the local file system permissions
# on the mounted directories
docker exec "$CI_CONTAINER_ID" useradd -u "$LOCAL_UID" -o -m "$LOCAL_USER"
docker exec "$CI_CONTAINER_ID" groupmod -o -g "$LOCAL_GID" "$LOCAL_USER"
docker exec "$CI_CONTAINER_ID" chown -R "$LOCAL_USER":"$LOCAL_USER" "${BASE_ROOT_DIR}"
export CI_EXEC_CMD_PREFIX_ROOT="docker exec -u 0 $CI_CONTAINER_ID"
export CI_EXEC_CMD_PREFIX="docker exec -u $LOCAL_UID $CI_CONTAINER_ID"
2019-08-11 17:57:21 +02:00
else
echo "Running on host system without docker wrapper"
fi
2020-05-30 13:56:56 +02:00
CI_EXEC () {
$CI_EXEC_CMD_PREFIX bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
2020-05-30 13:56:56 +02:00
}
CI_EXEC_ROOT () {
$CI_EXEC_CMD_PREFIX_ROOT bash -c "export PATH=${BINS_SCRATCH_DIR}:\$PATH && cd \"$P_CI_DIR\" && $*"
}
export -f CI_EXEC
export -f CI_EXEC_ROOT
2019-08-11 17:57:21 +02:00
CI_EXEC mkdir -p "${BINS_SCRATCH_DIR}"
if [ -n "$DPKG_ADD_ARCH" ]; then
CI_EXEC_ROOT dpkg --add-architecture "$DPKG_ADD_ARCH"
fi
if [[ $CI_IMAGE_NAME_TAG == *centos* ]]; then
${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y install epel-release
${CI_RETRY_EXE} CI_EXEC_ROOT dnf -y --allowerasing install "$CI_BASE_PACKAGES" "$PACKAGES"
2020-03-26 13:30:02 +01:00
elif [ "$CI_USE_APT_INSTALL" != "no" ]; then
if [[ "${ADD_UNTRUSTED_BPFCC_PPA}" == "true" ]]; then
# Ubuntu 22.04 LTS and Debian 11 both have an outdated bpfcc-tools packages.
# The iovisor PPA is outdated as well. The next Ubuntu and Debian releases will contain updated
# packages. Meanwhile, use an untrusted PPA to install an up-to-date version of the bpfcc-tools
# package.
# TODO: drop this once we can use newer images in GCE
CI_EXEC_ROOT add-apt-repository ppa:hadret/bpfcc
fi
2023-01-17 21:55:37 +01:00
if [[ -n "${APPEND_APT_SOURCES_LIST}" ]]; then
CI_EXEC_ROOT echo "${APPEND_APT_SOURCES_LIST}" >> /etc/apt/sources.list
fi
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get update
${CI_RETRY_EXE} CI_EXEC_ROOT apt-get install --no-install-recommends --no-upgrade -y "$PACKAGES" "$CI_BASE_PACKAGES"
fi
if [ -n "$PIP_PACKAGES" ]; then
if [ "$CI_OS_NAME" == "macos" ]; then
sudo -H pip3 install --upgrade pip
# shellcheck disable=SC2086
IN_GETOPT_BIN="$(brew --prefix gnu-getopt)/bin/getopt" ${CI_RETRY_EXE} pip3 install --user $PIP_PACKAGES
else
2021-11-07 13:13:39 +01:00
# shellcheck disable=SC2086
${CI_RETRY_EXE} CI_EXEC pip3 install --user $PIP_PACKAGES
2021-04-13 06:40:15 +02:00
fi
fi
if [ "$CI_OS_NAME" == "macos" ]; then
ci: Use debian to avoid apt install 404 errors The default ubuntu mirror does not have s390x or armhf packages: Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [19.2 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6781 B] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB] Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Err:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages 404 Not Found [IP: 91.189.88.174 80] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1057 kB] Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1322 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [32.7 kB] Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Get:30 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4244 B] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Get:32 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Err:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Fetched 17.4 MB in 2s (7076 kB/s) Reading package lists... E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/multiverse/binary-armhf/Packages 404 Not Found [IP: 91.189.88.174 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/restricted/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Some index files failed to download. They have been ignored, or old ones used instead.
2019-12-17 21:22:41 +01:00
top -l 1 -s 0 | awk ' /PhysMem/ {print}'
echo "Number of CPUs: $(sysctl -n hw.logicalcpu)"
else
CI_EXEC free -m -h
CI_EXEC echo "Number of CPUs \(nproc\):" \$\(nproc\)
CI_EXEC echo "$(lscpu | grep Endian)"
ci: Use debian to avoid apt install 404 errors The default ubuntu mirror does not have s390x or armhf packages: Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [19.2 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6781 B] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB] Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Err:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages 404 Not Found [IP: 91.189.88.174 80] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1057 kB] Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1322 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [32.7 kB] Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Get:30 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4244 B] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Get:32 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Err:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Fetched 17.4 MB in 2s (7076 kB/s) Reading package lists... E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/multiverse/binary-armhf/Packages 404 Not Found [IP: 91.189.88.174 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/restricted/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Some index files failed to download. They have been ignored, or old ones used instead.
2019-12-17 21:22:41 +01:00
fi
CI_EXEC echo "Free disk space:"
CI_EXEC df -h
ci: Use debian to avoid apt install 404 errors The default ubuntu mirror does not have s390x or armhf packages: Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB] Get:2 http://archive.ubuntu.com/ubuntu bionic InRelease [242 kB] Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Get:5 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB] Get:6 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [19.2 kB] Get:7 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [6781 B] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Get:9 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [761 kB] Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Get:12 http://archive.ubuntu.com/ubuntu bionic/restricted amd64 Packages [13.5 kB] Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:14 http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1344 kB] Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Get:17 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [795 kB] Get:18 http://archive.ubuntu.com/ubuntu bionic/multiverse amd64 Packages [186 kB] Get:19 http://archive.ubuntu.com/ubuntu bionic/universe amd64 Packages [11.3 MB] Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Err:4 http://security.ubuntu.com/ubuntu bionic-security/multiverse armhf Packages 404 Not Found [IP: 91.189.88.174 80] Ign:8 http://security.ubuntu.com/ubuntu bionic-security/universe armhf Packages Ign:15 http://security.ubuntu.com/ubuntu bionic-security/main armhf Packages Ign:16 http://security.ubuntu.com/ubuntu bionic-security/restricted armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Get:21 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [1057 kB] Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Get:23 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [10.5 kB] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Get:26 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1322 kB] Get:27 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [32.7 kB] Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Get:30 http://archive.ubuntu.com/ubuntu bionic-backports/universe amd64 Packages [4244 B] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Get:32 http://archive.ubuntu.com/ubuntu bionic-backports/main amd64 Packages [2496 B] Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Ign:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:10 http://archive.ubuntu.com/ubuntu bionic/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:11 http://archive.ubuntu.com/ubuntu bionic/restricted armhf Packages Ign:13 http://archive.ubuntu.com/ubuntu bionic/multiverse armhf Packages Ign:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Ign:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Ign:20 http://archive.ubuntu.com/ubuntu bionic/universe armhf Packages Err:22 http://archive.ubuntu.com/ubuntu bionic-updates/restricted armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:24 http://archive.ubuntu.com/ubuntu bionic-updates/main armhf Packages Ign:25 http://archive.ubuntu.com/ubuntu bionic-updates/universe armhf Packages Ign:28 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse armhf Packages Err:29 http://archive.ubuntu.com/ubuntu bionic-backports/main armhf Packages 404 Not Found [IP: 91.189.88.149 80] Ign:31 http://archive.ubuntu.com/ubuntu bionic-backports/universe armhf Packages Fetched 17.4 MB in 2s (7076 kB/s) Reading package lists... E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/multiverse/binary-armhf/Packages 404 Not Found [IP: 91.189.88.174 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/restricted/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/main/binary-armhf/Packages 404 Not Found [IP: 91.189.88.149 80] E: Some index files failed to download. They have been ignored, or old ones used instead.
2019-12-17 21:22:41 +01:00
if [ "$RUN_FUZZ_TESTS" = "true" ]; then
export DIR_FUZZ_IN=${DIR_QA_ASSETS}/fuzz_seed_corpus/
if [ ! -d "$DIR_FUZZ_IN" ]; then
CI_EXEC git clone --depth=1 https://github.com/bitcoin-core/qa-assets "${DIR_QA_ASSETS}"
fi
elif [ "$RUN_UNIT_TESTS" = "true" ] || [ "$RUN_UNIT_TESTS_SEQUENTIAL" = "true" ]; then
export DIR_UNIT_TEST_DATA=${DIR_QA_ASSETS}/unit_test_data/
if [ ! -d "$DIR_UNIT_TEST_DATA" ]; then
CI_EXEC mkdir -p "$DIR_UNIT_TEST_DATA"
CI_EXEC curl --location --fail https://github.com/bitcoin-core/qa-assets/raw/main/unit_test_data/script_assets_test.json -o "${DIR_UNIT_TEST_DATA}/script_assets_test.json"
fi
fi
CI_EXEC mkdir -p "${BASE_SCRATCH_DIR}/sanitizer-output/"
if [[ ${USE_MEMORY_SANITIZER} == "true" ]]; then
2022-11-25 14:13:29 +01:00
CI_EXEC_ROOT "update-alternatives --install /usr/bin/clang++ clang++ \$(which clang++-12) 100"
CI_EXEC_ROOT "update-alternatives --install /usr/bin/clang clang \$(which clang-12) 100"
CI_EXEC "mkdir -p ${BASE_SCRATCH_DIR}/msan/build/"
CI_EXEC "git clone --depth=1 https://github.com/llvm/llvm-project -b llvmorg-12.0.0 ${BASE_SCRATCH_DIR}/msan/llvm-project"
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && cmake -DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi' -DCMAKE_BUILD_TYPE=Release -DLLVM_USE_SANITIZER=MemoryWithOrigins -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_TARGETS_TO_BUILD=X86 ../llvm-project/llvm/"
CI_EXEC "cd ${BASE_SCRATCH_DIR}/msan/build/ && make $MAKEJOBS cxx"
fi
2022-04-11 21:45:22 +02:00
if [[ "${RUN_TIDY}" == "true" ]]; then
2022-04-29 15:07:11 +02:00
export DIR_IWYU="${BASE_SCRATCH_DIR}/iwyu"
if [ ! -d "${DIR_IWYU}" ]; then
CI_EXEC "mkdir -p ${DIR_IWYU}/build/"
CI_EXEC "git clone --depth=1 https://github.com/include-what-you-use/include-what-you-use -b clang_14 ${DIR_IWYU}/include-what-you-use"
CI_EXEC "cd ${DIR_IWYU}/build && cmake -G 'Unix Makefiles' -DCMAKE_PREFIX_PATH=/usr/lib/llvm-14 ../include-what-you-use"
CI_EXEC_ROOT "cd ${DIR_IWYU}/build && make install $MAKEJOBS"
2022-04-29 15:07:11 +02:00
fi
2022-04-11 21:45:22 +02:00
fi
if [ -z "$DANGER_RUN_CI_ON_HOST" ]; then
echo "Create $BASE_ROOT_DIR"
CI_EXEC rsync -a /ro_base/ "$BASE_ROOT_DIR"
fi
2019-09-30 23:26:22 +02:00
if [ "$USE_BUSY_BOX" = "true" ]; then
echo "Setup to use BusyBox utils"
# tar excluded for now because it requires passing in the exact archive type in ./depends (fixed in later BusyBox version)
# ar excluded for now because it does not recognize the -q option in ./depends (unknown if fixed)
# shellcheck disable=SC1010
CI_EXEC for util in \$\(busybox --list \| grep -v "^ar$" \| grep -v "^tar$" \)\; do ln -s \$\(command -v busybox\) "${BINS_SCRATCH_DIR}/\$util"\; done
2019-09-30 23:26:22 +02:00
# Print BusyBox version
CI_EXEC patch --help
2019-09-30 23:26:22 +02:00
fi