aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/.travis/Dockerfile
blob: 9ca711c7d30ea06cb00a34b0f870e3b5ac1352ed (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
FROM ubuntu:focal AS base

FROM base AS builder

RUN apt-get update -yq && \
    apt-get install -yq --no-install-recommends \
        # Used to download Boost:
        ca-certificates \
        # Used to bootstrap Boost:
        g++             \
        # Build scripts:
        python3         \
        # Build tools:
        cmake           \
        make            \
        mingw-w64

ARG travis_boost_version=1.65.0
ARG platform=x86
ARG configuration=Debug

# We're on Travis, that's right.
ENV TRAVIS=1
ENV TRAVIS_BUILD_DIR=/usr/src

COPY ["cmake", "$TRAVIS_BUILD_DIR/cmake"]
WORKDIR "$TRAVIS_BUILD_DIR"

RUN ./cmake/boost/build/ci/travis.py \
        --link static \
        -- \
        --user-config="$TRAVIS_BUILD_DIR/cmake/boost/toolchains/mingw-w64-$platform.jam" \
        --with-filesystem \
        --with-program_options

COPY [".", "$TRAVIS_BUILD_DIR"]

RUN ./cmake/cmake/build/ci/travis.py \
        --install /opt/pdb-repo \
        -- \
        -D "CMAKE_TOOLCHAIN_FILE=$TRAVIS_BUILD_DIR/cmake/cmake/toolchains/mingw-w64-$platform.cmake" \
        -D "BOOST_ROOT=$HOME/boost" \
        -D "BOOST_LIBRARYDIR=$HOME/boost/stage/$platform/$configuration/lib"

FROM base

COPY --from=builder ["/opt/pdb-repo", "/opt/pdb-repo"]