Skip to content

Commit

Permalink
Use Ubuntu 18.04 based containers for GCC >= 12 and Clang >= 14
Browse files Browse the repository at this point in the history
  • Loading branch information
Croydon committed Oct 22, 2022
1 parent 899cad4 commit 70a36e0
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions bincrafters/prepare_env.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,16 @@ def _set_env_variable(var_name: str, value: str):
if docker_image == "":
compiler_lower = compiler.lower()
version_without_dot = compiler_version.replace(".", "")
if (compiler == "GCC" and float(compiler_version) >= 11) or \
image_suffix = ""
# Use "modern" CDT containers for newer compilers
if (compiler == "GCC" and float(compiler_version) >= 12) or \
(compiler == "CLANG" and float(compiler_version) >= 14):
image_suffix = "-ubuntu18.04"
elif (compiler == "GCC" and float(compiler_version) >= 11) or \
(compiler == "CLANG" and float(compiler_version) >= 12):
# Use "modern" CDT containers for newer compilers
docker_image = "conanio/{}{}-ubuntu16.04".format(compiler_lower, version_without_dot)
else:
docker_image = "conanio/{}{}".format(compiler_lower, version_without_dot)
image_suffix = "-ubuntu16.04"

docker_image = "conanio/{}{}{}".format(compiler_lower, version_without_dot, image_suffix)
_set_env_variable("CONAN_DOCKER_IMAGE", docker_image)

if build_type != "":
Expand Down

0 comments on commit 70a36e0

Please sign in to comment.