Skip to content
Snippets Groups Projects
  • Harmen Stoppels's avatar
    Fixes for codecov (#1370) · 89fda19d
    Harmen Stoppels authored
    - remove repeated CMAKE_BUILD_TYPE
    - bump lcov to 1.15
    - use new --exclude flag to skip generated sources
    
    With gcc 8 as a compiler + a new version of lcov (#1350) codecov started tracking generated source files and coverage dropped to < 60%. Not sure if this is a bug in lcov or not. I've added these new flags for lcov: `--exclude "*/ext/*" --exclude "*/test/*" --exclude "*/mechanisms/*"` to fix it.
    Unverified
    89fda19d
build.Dockerfile 1.61 KiB
FROM nvidia/cuda:10.2-devel-ubuntu18.04

WORKDIR /root

ARG MPICH_VERSION=3.3.2

ENV DEBIAN_FRONTEND noninteractive
ENV FORCE_UNSAFE_CONFIGURE 1
ENV MPICH_VERSION ${MPICH_VERSION}

# Install basic tools
RUN apt-get update -qq && apt-get install -qq -y --no-install-recommends \
    python3 \
    git tar wget curl \
    gcc-8 g++-8 make && \
    update-alternatives \
        --install /usr/bin/gcc gcc /usr/bin/gcc-8 60 \
        --slave /usr/bin/g++ g++ /usr/bin/g++-8 \
        --slave /usr/bin/gcov gcov /usr/bin/gcov-8 && \
    update-alternatives --config gcc && \
    rm -rf /var/lib/apt/lists/*

RUN wget -q "https://github.com/linux-test-project/lcov/archive/v1.15.tar.gz" && \
    tar -xzf v1.15.tar.gz && \
    cd lcov-1.15 && \
    make install -j$(nproc) && \
    rm -rf lcov-1.15 v1.15.tar.gz

# Install MPICH ABI compatible with Cray's lib on Piz Daint
RUN wget -q https://www.mpich.org/static/downloads/${MPICH_VERSION}/mpich-${MPICH_VERSION}.tar.gz && \
    tar -xzf mpich-${MPICH_VERSION}.tar.gz && \
    cd mpich-${MPICH_VERSION} && \
    ./configure --disable-fortran && \
    make install -j$(nproc) && \
    rm -rf mpich-${MPICH_VERSION}.tar.gz mpich-${MPICH_VERSION}


# Install cmake
RUN wget -qO- "https://github.com/Kitware/CMake/releases/download/v3.12.4/cmake-3.12.4-Linux-x86_64.tar.gz" | tar --strip-components=1 -xz -C /usr/local

# Install bundle tooling for creating small Docker images
RUN wget -q https://github.com/haampie/libtree/releases/download/v1.2.0/libtree_x86_64.tar.gz && \
    tar -xzf libtree_x86_64.tar.gz && \
    rm libtree_x86_64.tar.gz && \
    ln -s /root/libtree/libtree /usr/local/bin/libtree