Skip to content

Commit

Permalink
Supporting C++20
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Bang committed Jul 24, 2020
1 parent d2f979b commit 84d19f3
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
12 changes: 10 additions & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

WORKDIR /setup-ci

Expand All @@ -9,9 +9,17 @@ ADD install_bazelisk.sh /setup-ci
ADD install_protobuf.sh /setup-ci
ADD install_format_tools.sh /setup-ci

ENV DEBIAN_FRONTEND noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN true

RUN echo "tzdata tzdata/Areas select US" > /tmp/preseed.txt; \
echo "tzdata tzdata/Zones/Europe select Chicago" >> /tmp/preseed.txt; \
debconf-set-selections /tmp/preseed.txt && \
apt-get update && \
apt-get install -y tzdata

RUN /setup-ci/setup_ci_environment.sh \
&& /setup-ci/setup_cmake.sh \
&& /setup-ci/install_gcc48.sh \
&& /setup-ci/install_bazelisk.sh \
&& /setup-ci/install_protobuf.sh \
&& /setup-ci/install_format_tools.sh
1 change: 1 addition & 0 deletions ci/do_ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ if [[ "$1" == "cmake.test" ]]; then
make test
exit 0
elif [[ "$1" == "cmake.c++20.test" ]]; then
echo "${BUILD_DIR}"
cd "${BUILD_DIR}"
rm -rf *
cmake -DCMAKE_BUILD_TYPE=Debug \
Expand Down
13 changes: 9 additions & 4 deletions ci/run_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@
set -e

BUILD_IMAGE=opentelemetry-cpp-build
BUILD_IMAGE2=opentelemetry-cpp-build2
docker image inspect "$BUILD_IMAGE" &> /dev/null || {
docker build -t "$BUILD_IMAGE" ci
}

if [[ $# -ge 1 ]]; then
docker run -v "$PWD":/src -w /src -it "$BUILD_IMAGE" "$@"
if [ $2 == cmake.c++20.test ]; then
docker run -v "$PWD":/src -w /src -it "$BUILD_IMAGE2" "$@"
else
docker run -v "$PWD":/src -w /src --privileged -it "$BUILD_IMAGE" /bin/bash -l
fi
if [[ $# -ge 1 ]]; then
docker run -v "$PWD":/src -w /src -it "$BUILD_IMAGE" "$@"
else
docker run -v "$PWD":/src -w /src --privileged -it "$BUILD_IMAGE" /bin/bash -l
fi
fi
3 changes: 2 additions & 1 deletion ci/setup_ci_environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ apt-get install --no-install-recommends --no-install-suggests -y \
build-essential \
ca-certificates \
wget \
git
git \
g++-10
apt-get install -y lcov

0 comments on commit 84d19f3

Please sign in to comment.