diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000..03accdddc9 Binary files /dev/null and b/.DS_Store differ diff --git a/ci/Dockerfile b/ci/Dockerfile index a1f43af928..1563dde858 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -5,13 +5,17 @@ WORKDIR /setup-ci ADD setup_ci_environment.sh /setup-ci ADD setup_cmake.sh /setup-ci ADD install_gcc48.sh /setup-ci +ADD install_gcc10.sh /setup-ci ADD install_bazelisk.sh /setup-ci ADD install_protobuf.sh /setup-ci ADD install_format_tools.sh /setup-ci + RUN /setup-ci/setup_ci_environment.sh \ && /setup-ci/setup_cmake.sh \ && /setup-ci/install_gcc48.sh \ + && /setup-ci/install_gcc10.sh \ && /setup-ci/install_bazelisk.sh \ && /setup-ci/install_protobuf.sh \ && /setup-ci/install_format_tools.sh + \ No newline at end of file diff --git a/ci/README.md b/ci/README.md index ff375ec4e3..608b5fa74b 100644 --- a/ci/README.md +++ b/ci/README.md @@ -17,4 +17,7 @@ CI tests can be run on docker by invoking the script `./ci/run_docker.sh ./ci/do * `code.coverage`: build cmake targets and run tests. Then upload coverage report to [codecov.io](https://codecov.io/). Additionally, `./ci/run_docker.sh` can be invoked with no arguments to get a docker shell where tests -can be run manually. +can be run manually, except for `cmake.c++20.test`. + +Note that `cmake.c++20.test` can only run in a Ubuntu version 20+ container, as earlier versions of Ubuntu do not support C++20 or g++-10. +To run said test, you must run it in the specified Ubuntu 20.04 container by invoking `./ci/run_docker.sh ./ci/do_ci.sh cmake.c++20.test`. diff --git a/ci/do_ci.sh b/ci/do_ci.sh index fb641aa701..0defbad1ff 100755 --- a/ci/do_ci.sh +++ b/ci/do_ci.sh @@ -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 \ diff --git a/ci/install_gcc10.sh b/ci/install_gcc10.sh new file mode 100755 index 0000000000..65ce5ebfc9 --- /dev/null +++ b/ci/install_gcc10.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +set -e +apt-get -y install software-properties-common +add-apt-repository -y ppa:ubuntu-toolchain-r/test +apt-get -y update +apt install -y gcc-10 +apt install -y g++-10 \ No newline at end of file diff --git a/ci/run_docker.sh b/ci/run_docker.sh index c09ca51ce4..8233aa13db 100755 --- a/ci/run_docker.sh +++ b/ci/run_docker.sh @@ -2,13 +2,13 @@ set -e -BUILD_IMAGE=opentelemetry-cpp-build +BUILD_IMAGE=opentelemetry-cpp-build-test + 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" "$@" else docker run -v "$PWD":/src -w /src --privileged -it "$BUILD_IMAGE" /bin/bash -l -fi +fi \ No newline at end of file