Skip to content

Commit

Permalink
#2082: Add HOST_COMPILER to cache names in docker compose
Browse files Browse the repository at this point in the history
  • Loading branch information
thearusable committed Mar 24, 2023
1 parent 03273e4 commit 91ffdd1
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 66 deletions.
4 changes: 3 additions & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
129 changes: 64 additions & 65 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
##############################################################################
Expand All @@ -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}
Expand All @@ -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 &&
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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

##############################################################################
Expand All @@ -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
Expand Down

0 comments on commit 91ffdd1

Please sign in to comment.