From 517ccac210b70d8c02ee276d893e96d1cbb16e86 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 29 Jan 2020 00:50:12 +0300 Subject: Travis: multi-stage Docker builds --- .travis/Dockerfile | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.travis/Dockerfile b/.travis/Dockerfile index 1973e9f..24cbb35 100644 --- a/.travis/Dockerfile +++ b/.travis/Dockerfile @@ -1,4 +1,6 @@ -FROM ubuntu:focal +FROM ubuntu:focal AS base + +FROM base AS builder RUN apt-get update -yq && \ apt-get install -yq --no-install-recommends \ @@ -30,8 +32,12 @@ RUN ./cmake/boost/build/ci/travis.py \ --with-filesystem \ --with-program_options && \ ./cmake/cmake/build/ci/travis.py \ - --install "$HOME/install" \ + --install /opt/pdb-repo \ -- \ -D "CMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/cmake/toolchains/mingw-w64-$platform.cmake" \ -D "BOOST_ROOT=$HOME/boost_1_65_0" \ -D "BOOST_LIBRARYDIR=$HOME/boost_1_65_0/stage/$platform/$configuration/lib" + +FROM base + +COPY --from=builder ["/opt/pdb-repo", "/opt/pdb-repo"] -- cgit v1.2.3