From 91ffdd1294bb91b3c84a44196d29a24016503c4b Mon Sep 17 00:00:00 2001 From: Arkadiusz Szczepkowicz Date: Fri, 24 Mar 2023 13:36:48 +0100 Subject: [PATCH] #2082: Add HOST_COMPILER to cache names in docker compose --- .env | 4 +- docker-compose.yml | 129 ++++++++++++++++++++++----------------------- 2 files changed, 67 insertions(+), 66 deletions(-) diff --git a/.env b/.env index 1ee99cf983..20434a75ee 100644 --- a/.env +++ b/.env @@ -3,7 +3,9 @@ ARCH=amd64 UBUNTU=20.04 ULIMIT_CORE=0 COMPILER=gcc-9 -HOST_COMPILER=gcc-9 +# 'HOST_COMPILER' is only used for nvidia builds. +# For other compilers it should be empty - it will be populated with `COMPILER` value. +HOST_COMPILER= COMPILER_TYPE=gnu PROXY= CACHE= diff --git a/docker-compose.yml b/docker-compose.yml index ff9c6e98b1..592e9d9894 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -70,45 +70,45 @@ version: '3.5' # add it to this list. For example, for ARM64v8 on Ubuntu 20.04 with clang-9, # add `arm64v8-ubuntu-20.04-clang-9-cache`. volumes: - amd64-ubuntu-18.04-clang-4.0-cache: - amd64-ubuntu-18.04-clang-5.0-cache: - amd64-ubuntu-18.04-clang-6.0-cache: - amd64-ubuntu-18.04-clang-7-cache: - amd64-ubuntu-18.04-clang-8-cache: - amd64-ubuntu-18.04-clang-9-cache: - amd64-ubuntu-20.04-clang-10-cache: - amd64-ubuntu-22.04-clang-11-cache: - amd64-ubuntu-18.04-gcc-7-cache: - amd64-ubuntu-18.04-gcc-8-cache: - amd64-ubuntu-20.04-gcc-9-cache: - amd64-ubuntu-20.04-gcc-10-cache: - amd64-ubuntu-20.04-gcc-11-cache: - amd64-ubuntu-18.04-icpx-cache: - amd64-ubuntu-18.04-icpc-cache: - amd64-ubuntu-20.04-11.0.3-cache: - amd64-ubuntu-20.04-11.2.0-cache: - amd64-alpine-clang-4.0-cache: - amd64-alpine-clang-5.0-cache: - amd64-alpine-clang-6.0-cache: - amd64-alpine-clang-7-cache: - amd64-alpine-clang-8-cache: - amd64-alpine-clang-9-cache: - amd64-alpine-clang-10-cache: - amd64-alpine-clang-11-cache: - amd64-alpine-gcc-7-cache: - amd64-alpine-gcc-8-cache: - amd64-alpine-gcc-9-cache: - amd64-alpine-gcc-10-cache: - amd64-alpine-gcc-11-cache: - amd64-alpine-icc-18-cache: - amd64-alpine-icc-19-cache: - amd64-alpine-icc-20-cache: - amd64-alpine-icpx-cache: - amd64-alpine-icpc-cache: - amd64-alpine-11.0.3-cache: - amd64-alpine-11.2.0-cache: - arm64v8-ubuntu-18.04-gcc-7-cache: - arm64v8-alpine-gcc-7-cache: + amd64-ubuntu-18.04-clang-4.0-clang-4.0-cache: + amd64-ubuntu-18.04-clang-5.0-clang-5.0-cache: + amd64-ubuntu-18.04-clang-6.0-clang-6.0-cache: + amd64-ubuntu-18.04-clang-7-clang-7-cache: + amd64-ubuntu-18.04-clang-8-clang-8-cache: + amd64-ubuntu-18.04-clang-9-clang-9-cache: + amd64-ubuntu-20.04-clang-10-clang-10-cache: + amd64-ubuntu-22.04-clang-11-clang-11-cache: + amd64-ubuntu-18.04-gcc-7-gcc-7-cache: + amd64-ubuntu-18.04-gcc-8-gcc-8-cache: + amd64-ubuntu-20.04-gcc-9-gcc-9-cache: + amd64-ubuntu-20.04-gcc-10-gcc-10-cache: + amd64-ubuntu-20.04-gcc-11-gcc-11-cache: + amd64-ubuntu-18.04-icpx-icpx-cache: + amd64-ubuntu-18.04-icpc-icpc-cache: + amd64-ubuntu-20.04-gcc-9-11.0.3-cache: + amd64-ubuntu-20.04-gcc-9-11.2.0-cache: + amd64-alpine-clang-4.0-clang-4.0-cache: + amd64-alpine-clang-5.0-clang-5.0-cache: + amd64-alpine-clang-6.0-clang-6.0-cache: + amd64-alpine-clang-7-clang-7-cache: + amd64-alpine-clang-8-clang-8-cache: + amd64-alpine-clang-9-clang-9-cache: + amd64-alpine-clang-10-clang-10-cache: + amd64-alpine-clang-11-clang-11-cache: + amd64-alpine-gcc-7-gcc-7-cache: + amd64-alpine-gcc-8-gcc-8-cache: + amd64-alpine-gcc-9-gcc-9-cache: + amd64-alpine-gcc-10-gcc-10-cache: + amd64-alpine-gcc-11-gcc-11-cache: + amd64-alpine-icc-18-icc-18-cache: + amd64-alpine-icc-19-icc-19-cache: + amd64-alpine-icc-20-icc-20-cache: + amd64-alpine-icpx-icpx-cache: + amd64-alpine-icpc-icpc-cache: + amd64-alpine-gcc-9-11.0.3-cache: + amd64-alpine-gcc-9-11.2.0-cache: + arm64v8-ubuntu-18.04-gcc-7-gcc-7-cache: + arm64v8-alpine-gcc-7-gcc-7-cache: # Define basic rules for ccache used across multiple services. The beauty of # docker compose with cached volumes is that similarly configured builds will @@ -156,7 +156,6 @@ x-vtopts: &vtopts CODECOV_TOKEN: ${CODECOV_TOKEN:-} TEST_LB_SCHEMA: ${TEST_LB_SCHEMA:-0} CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17} - HOST_COMPILER: ${HOST_COMPILER} services: ############################################################################## @@ -175,7 +174,7 @@ services: arch: ${ARCH} proxy: ${PROXY} compiler: ${COMPILER} - host_compiler: ${HOST_COMPILER} + host_compiler: ${HOST_COMPILER:-${COMPILER}} ubuntu: ${UBUNTU} ubsan_enabled: ${VT_UBSAN:-0} zoltan_enabled: ${VT_ZOLTAN:-0} @@ -186,7 +185,7 @@ services: <<: *vtopts volumes: &ubuntu-volumes - .:/vt:delegated - - ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cache:/build:delegated + - ${CACHE}${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated command: &vt-cpp-command > /bin/bash -c " /vt/ci/build_cpp.sh /vt /build && @@ -205,9 +204,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -232,9 +231,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -262,9 +261,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -284,9 +283,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *ccache @@ -304,9 +303,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *ccache @@ -323,11 +322,11 @@ services: context: . target: build dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: <<: *default-args <<: *vtopts + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -346,11 +345,11 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: <<: *default-args token: ${TOKEN} + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -372,9 +371,9 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-openmpi-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp ulimits: *ulimits environment: <<: *vtopts @@ -392,10 +391,10 @@ services: context: . target: base dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: <<: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -415,16 +414,16 @@ services: context: . target: base dockerfile: ci/docker/alpine-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-alpine-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache <<: *vtopts volumes: &alpine-volumes - .:/vt:delegated - - ${CACHE}${ARCH}-alpine-${COMPILER}-cache:/build:delegated + - ${CACHE}${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cache:/build:delegated command: *vt-cpp-command ############################################################################## @@ -436,9 +435,9 @@ services: context: . target: base dockerfile: ci/docker/alpine-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-alpine-${COMPILER}-cpp args: *default-args + cache_from: + - ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache