mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Fix potential travis failures due to network failures (#2795)
* Manually pull builder base image and let travis retry it on failure * Split base package installation in Dockerfile.builder into multiple RUN lines This allows better local cache usage on failure and retry. * Use travis_retry for docker build
This commit is contained in:
parent
02db06658e
commit
3ead8cd85d
@ -59,7 +59,8 @@ install:
|
||||
- ls -lah $HOST_CACHE_DIR && ls -lah $HOST_CACHE_DIR/depends && ls -lah $HOST_CACHE_DIR/ccache && ls -lah $HOST_CACHE_DIR/docker
|
||||
# Load cached builder image
|
||||
- if [ -f $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz ]; then zcat $HOST_CACHE_DIR/docker/dash-builder-$BUILD_TARGET.tar.gz | docker load || true; fi
|
||||
- docker build --pull -t $BUILDER_IMAGE_NAME --build-arg=USER_ID=$UID --build-arg=GROUP_ID=$UID --build-arg=BUILD_TARGET=$BUILD_TARGET -f ci/Dockerfile.builder ci
|
||||
- travis_retry docker pull ubuntu:bionic
|
||||
- travis_retry docker build -t $BUILDER_IMAGE_NAME --build-arg=USER_ID=$UID --build-arg=GROUP_ID=$UID --build-arg=BUILD_TARGET=$BUILD_TARGET -f ci/Dockerfile.builder ci
|
||||
before_script:
|
||||
# Make sure stdout is in blocking mode. Otherwise builds will fail due to large writes to stdout
|
||||
# See https://github.com/travis-ci/travis-ci/issues/4704. If this gets fixed, this line can also be removed.
|
||||
|
@ -2,18 +2,15 @@ FROM ubuntu:bionic
|
||||
|
||||
# Build and base stuff
|
||||
# (zlib1g-dev and libssl-dev are needed for the Qt host binary builds, but should not be used by target binaries)
|
||||
RUN apt-get update && apt-get install -y \
|
||||
git \
|
||||
g++ \
|
||||
autotools-dev libtool m4 automake autoconf pkg-config \
|
||||
zlib1g-dev \
|
||||
libssl1.0-dev \
|
||||
curl \
|
||||
ccache \
|
||||
bsdmainutils \
|
||||
python3-pip python3-dev \
|
||||
cmake \
|
||||
&& rm -rf /var/lib/apt/lists
|
||||
# We split this up into multiple RUN lines as we might need to retry multiple times on Travis. This way we allow better
|
||||
# cache usage.
|
||||
RUN apt-get update
|
||||
RUN apt-get update && apt-get install -y git
|
||||
RUN apt-get update && apt-get install -y g++
|
||||
RUN apt-get update && apt-get install -y autotools-dev libtool m4 automake autoconf pkg-config
|
||||
RUN apt-get update && apt-get install -y zlib1g-dev libssl1.0-dev curl ccache bsdmainutils cmake
|
||||
RUN apt-get update && apt-get install -y python3 python3-dev
|
||||
RUN apt-get update && apt-get install -y python3-pip
|
||||
|
||||
# Python stuff
|
||||
RUN pip3 install pyzmq # really needed?
|
||||
@ -36,7 +33,7 @@ ARG BUILD_TARGET=linux64
|
||||
ADD matrix.sh /tmp/matrix.sh
|
||||
RUN . /tmp/matrix.sh && \
|
||||
if [ -n "$DPKG_ADD_ARCH" ]; then dpkg --add-architecture "$DPKG_ADD_ARCH" ; fi && \
|
||||
if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES && rm -rf /var/lib/apt/lists; fi
|
||||
if [ -n "$PACKAGES" ]; then apt-get update && apt-get install -y --no-install-recommends --no-upgrade $PACKAGES; fi
|
||||
|
||||
# Make sure std::thread and friends is available
|
||||
# Will fail on non-win builds, but we ignore this
|
||||
|
Loading…
Reference in New Issue
Block a user