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 Apr 4, 2023
1 parent 8d86cea commit 0aa7b78
Show file tree
Hide file tree
Showing 2 changed files with 68 additions and 78 deletions.
6 changes: 3 additions & 3 deletions .env
Original file line number Diff line number Diff line change
@@ -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=
Expand Down
140 changes: 65 additions & 75 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -150,21 +141,18 @@ 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:
##############################################################################
# C++ builds of VT on ubuntu/alpine platform from container baseline
# 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}
Expand All @@ -173,14 +161,16 @@ 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:
<<: *ccache
<<: *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 @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 0aa7b78

Please sign in to comment.