Routing use c++17 features (e.g. structured binding) ref: https://en.cppreference.com/w/cpp/language/structured_binding
19 lines
564 B
Docker
19 lines
564 B
Docker
# Create a virtual environment with all tools installed
|
|
# ref: https://hub.docker.com/_/archlinux/
|
|
FROM archlinux/base AS env
|
|
LABEL maintainer="corentinl@google.com"
|
|
# Install system build dependencies
|
|
ENV PATH=/usr/local/bin:$PATH
|
|
RUN pacman -Syu --noconfirm git base-devel bazel
|
|
CMD [ "/bin/bash" ]
|
|
|
|
FROM env AS devel
|
|
WORKDIR /home/lib
|
|
COPY . .
|
|
|
|
FROM devel as build
|
|
RUN bazel build --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
|
|
|
|
FROM build as test
|
|
RUN bazel test -c opt --curses=no --cxxopt=-std=c++17 --copt='-Wno-sign-compare' //...:all
|