Adding a second Dockerfile supporting C++20 for cmake C++20 tests#211
Adding a second Dockerfile supporting C++20 for cmake C++20 tests#211dabangarang wants to merge 10 commits into
Conversation
Codecov Report
@@ Coverage Diff @@
## master #211 +/- ##
=======================================
Coverage 93.94% 93.94%
=======================================
Files 146 146
Lines 6538 6538
=======================================
Hits 6142 6142
Misses 396 396 |
There was a problem hiding this comment.
Just wondering, it could have done in single Dockerfile - i..e, installing both gcc-48 and gcc-10 version in ubuntu18 docker container. This can be done by creating ci/install-gcc10.sh with below contents
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
And then while running cmake on tests, set CC/CXX to point to correct compiler.
…-cpp Please enter a commit message to explain why this merge is necessary,
|
@lalitb apologies for the accidental early commit. I had revised my pull request to implement your suggestion, and the current commit should reflect this. Where/what parameters would I need to change in the do_ci.sh file to identify a different compiler for Cmake20? It seems as though simply changing c++ vesrion to 20 does not change GNU compiler to a compatible version. |
|
You don't necessarily need to build a custom docker image. As Ubuntu-20.04 is readily available on GitHub Actions. You can use GitHub Actions matrix build feature to build with older and newer Ubuntu as follows: |
| BUILD_IMAGE=opentelemetry-cpp-build-test | ||
|
|
||
| docker image inspect "$BUILD_IMAGE" &> /dev/null || { | ||
| docker build -t "$BUILD_IMAGE" ci |
There was a problem hiding this comment.
It's probably adding considerable amount of CI time to build an image. Have you considered running the ci scripts without a docker, to deploy the tools in one of the readily available GitHub Action images?
https://raw.githubusercontent.com/maxgolov/opentelemetry-cpp/master/.github/workflows/build-ubuntu.yml
Main idea is that total compute and run time for each PR is going to be less, since you won't need to build an image.
|
@danielbang907, please address comments from @maxgolov and get the CI pass. |
|
This PR is stale, closing for now. @danielbang907 please feel free to reopen it if you have time to work on it. |
…what_you_use-0.x Update dependency depend_on_what_you_use to v0.8.0

This pull request is a response to issue #148.
I added in support to run cmake.c++20.test within a new docker container that is based off Ubuntu 20.04 and supports C++20 and g++-10. This docker container will automatically be built and run when it is specified that cmake.c++20.test is to be run. Other tests will be run on the standard Docker container, which runs on Ubuntu 18.04, as C++ 20 is not needed for these tests.