Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions ci/setup_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/usr/bin/env bash

set -exo pipefail

bake_target=${1}

docker buildx bake --print "$bake_target" | \
jq -r --arg t "$bake_target" '.target[$t].args | to_entries.[] | join("=")' \
>> .env
89 changes: 89 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@

# Volume will be created automatically for each combination of parameters.
volumes:
ubuntu-cpp:
name: "${IMAGE}-cache"

# Define basic rules for ccache used across multiple services. The beauty of
# docker compose with cached volumes is that similarly configured builds will
# reuse a ccache volume making build speeds much faster than a fresh build each
# time.
x-ccache: &ccache
CCACHE_COMPILERCHECK: content
CCACHE_COMPRESS: 1
CCACHE_COMPRESSLEVEL: 5
CCACHE_MAXSIZE: 700M
CCACHE_DIR: /build/ccache

# Define rules for VT configuration options across various services
x-vtopts: &vtopts
BUILD_SHARED_LIBS: ${VT_BUILD_SHARED_LIBS:-0}
CMAKE_BUILD_TYPE: ${BUILD_TYPE:-release}
CMAKE_CXX_STANDARD: ${CMAKE_CXX_STANDARD:-17}
CODECOV_TOKEN: ${CODECOV_TOKEN:-}
http_proxy: ${PROXY-}
https_proxy: ${PROXY-}
LSAN_OPTIONS: ${LSAN_OPTIONS-}
UBSAN_OPTIONS: ${UBSAN_OPTIONS-}
VT_ASAN_ENABLED: ${VT_ASAN:-0}
VT_BUILD_TRACE_ONLY: ${VT_TRACE_ONLY:-0}
VT_CI_BUILD: ${VT_CI_BUILD:-0}
VT_CI_TEST_LB_SCHEMA: ${VT_CI_TEST_LB_SCHEMA:-0}
VT_CODE_COVERAGE: ${VT_CODE_COVERAGE:-0}
VT_DEBUG_VERBOSE: ${VT_DEBUG_VERBOSE:-0}
VT_DIAGNOSTICS_ENABLED: ${VT_DIAGNOSTICS:-1}
VT_DIAGNOSTICS_RUNTIME_ENABLED: ${VT_DIAGNOSTICS_RUNTIME:-0}
VT_DOXYGEN_ENABLED: ${VT_DOCS:-0}
VT_EXTENDED_TESTS_ENABLED: ${VT_EXTENDED_TESTS:-1}
VT_EXTERNAL_FMT: ${VT_EXTERNAL_FMT:-0}
VT_FCONTEXT_ENABLED: ${VT_FCONTEXT:-0}
VT_INCLUSION_TYPE: ${VT_INCLUSION:-TPL}
VT_KOKKOS_ENABLED: ${VT_KOKKOS_ENABLED:-0}
VT_LB_ENABLED: ${VT_LB:-1}
VT_LDMS_ENABLED: ${VT_LDMS_ENABLED:-0}
VT_MIMALLOC_ENABLED: ${VT_MIMALLOC:-0}
VT_MPI_GUARD_ENABLED: ${VT_MPI_GUARD:-1}
VT_NO_COLOR_ENABLED: ${VT_NO_COLOR:-0}
VT_PERF_ENABLED: ${VT_PERF_ENABLED:-0}
VT_POOL_ENABLED: ${VT_POOL:-1}
VT_PRODUCTION_BUILD_ENABLED: ${VT_PRODUCTION_BUILD:-0}
VT_TESTS_NUM_NODES: ${VT_TESTS_NUM_NODES:-}
VT_TRACE_ENABLED: ${VT_TRACE:-0}
VT_TRACE_RUNTIME_ENABLED: ${VT_TRACE_RT:-0}
VT_TV_ENABLED: ${VT_TV_ENABLED:-0}
VT_UBSAN_ENABLED: ${VT_UBSAN:-0}
VT_UNITY_BUILD_ENABLED: ${VT_UNITY_BUILD:-0}
VT_WERROR_ENABLED: ${VT_WERROR:-1}
VT_ZOLTAN_ENABLED: ${VT_ZOLTAN:-0}

services:
##############################################################################
# C++ builds of LB on any platform from container baseline
lb-cpp:
image: ${REPO}:${IMAGE}
ulimits: &ulimits
core: ${ULIMIT_CORE}
environment:
<<: [*ccache, *vtopts]
volumes: &ubuntu-volumes
- .:/LB:delegated
- ${BUILD_ROOT}ubuntu-cpp:/build:delegated
command: &vt-cpp-command >
/bin/bash -c "
/LB/ci/build_cpp.sh /LB /build &&
/LB/ci/test_cpp.sh /LB /build"

##############################################################################
# Interactive C++ setup of LB on any platform from container baseline.
#
# After running:
# docker compose run vt-cpp-interactive
#
# $ /LB/ci/build_cpp.sh /LB /build
# $ /LB/ci/test_cpp.sh /LB /build
lb-cpp-interactive:
image: ${REPO}:${IMAGE}
ulimits: *ulimits
environment:
<<: [*ccache, *vtopts]
volumes: *ubuntu-volumes
Loading