From 0aa7b7824dcf3c6d1606a1ae3538c4429dbd4dae 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 | 6 +- docker-compose.yml | 140 +++++++++++++++++++++------------------------ 2 files changed, 68 insertions(+), 78 deletions(-) diff --git a/.env b/.env index 1ee99cf983..4000fab13d 100644 --- a/.env +++ b/.env @@ -1,9 +1,9 @@ REPO=lifflander1/vt ARCH=amd64 -UBUNTU=20.04 +UBUNTU=22.04 ULIMIT_CORE=0 -COMPILER=gcc-9 -HOST_COMPILER=gcc-9 +COMPILER=gcc-12 +HOST_COMPILER=gcc-12 COMPILER_TYPE=gnu PROXY= CACHE= diff --git a/docker-compose.yml b/docker-compose.yml index afe37ddb7f..961eac20c8 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -69,40 +69,31 @@ 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-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-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-clang-13-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-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-8-gcc-8-cache: + amd64-ubuntu-20.04-gcc-9-gcc-9-cache: + amd64-ubuntu-20.04-gcc-10-gcc-10-cache: + amd64-ubuntu-22.04-gcc-12-gcc-12-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-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-clang-13-clang-13-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-12-gcc-12-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: # Define basic rules for ccache used across multiple services. The beauty of # docker compose with cached volumes is that similarly configured builds will @@ -150,7 +141,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: ############################################################################## @@ -158,13 +148,11 @@ services: # Ubuntu gcc-12 debug build: # docker-compose run -e CMAKE_BUILD_TYPE=debug ubuntu-cpp ubuntu-cpp: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: context: . target: base dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-cpp.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp args: &default-args arch: ${ARCH} proxy: ${PROXY} @@ -173,6 +161,8 @@ services: ubuntu: ${UBUNTU} ubsan_enabled: ${VT_UBSAN:-0} zoltan_enabled: ${VT_ZOLTAN:-0} + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: &ulimits core: ${ULIMIT_CORE} environment: @@ -180,7 +170,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 && @@ -194,14 +184,14 @@ services: # Example: # docker-compose run ubuntu-cpp-clean ubuntu-cpp-clean: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: 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 @@ -221,14 +211,14 @@ services: # Example: # docker-compose run ubuntu-cpp-clean-noinstall ubuntu-cpp-clean-noinstall: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: 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 @@ -251,14 +241,14 @@ services: # $ /vt/ci/test_cpp.sh /vt /build # $ /vt/ci/build_vt_sample.sh /vt /build ubuntu-cpp-interactive: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: 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 @@ -273,14 +263,14 @@ services: # modifying all the other container/image names to be parameterized over # MPI requires a lot of changes. ubuntu-cpp-clean-openmpi: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: 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 @@ -293,14 +283,14 @@ services: # Interactive C++ setup of VT on ubuntu platform from container baseline for # OpenMPI. ubuntu-cpp-interactive-openmpi: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: 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 @@ -312,16 +302,16 @@ services: # Build C++ container with VT installed in the container on ubuntu platform # from container baseline. ubuntu-vt: - image: ${REPO}:vt-${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + image: ${REPO}:vt-${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp build: 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 @@ -335,16 +325,16 @@ services: # Build documentation for VT in the container on ubuntu platform from # container baseline. ubuntu-docs: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-docs + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-docs build: context: . target: base - dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile args: <<: *default-args token: ${TOKEN} + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -361,14 +351,14 @@ services: ############################################################################## # Build vt sample project using DARMA-vt installed from spack package. ubuntu-spack: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-openmpi-cpp + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-openmpi-cpp build: 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 @@ -381,15 +371,15 @@ services: # Interactive build documentation for VT in the container on ubuntu platform # from container baseline. ubuntu-docs-interactive: - image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-docs + image: ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-docs build: context: . target: base - dockerfile: ci/docker/ubuntu-${COMPILER_TYPE}-docs.dockerfile - cache_from: - - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${COMPILER}-cpp + dockerfile: ci/docker/ubuntu-${UBUNTU}-${COMPILER_TYPE}-docs.dockerfile args: <<: *default-args + cache_from: + - ${REPO}:${ARCH}-ubuntu-${UBUNTU}-${HOST_COMPILER}-${COMPILER}-cpp ulimits: *ulimits environment: <<: *ccache @@ -404,35 +394,35 @@ services: # C++ build of VT within an alpine linux container (limited to clang # compilers) alpine-cpp: - image: ${REPO}:${ARCH}-alpine-${COMPILER}-cpp + image: ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp build: 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 ############################################################################## # C++ build/test/clean target for VT on alpine platform from container # baseline. alpine-cpp-clean: - image: ${REPO}:${ARCH}-alpine-${COMPILER}-cpp + image: ${REPO}:${ARCH}-alpine-${HOST_COMPILER}-${COMPILER}-cpp build: 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