Skip to content

Commit

Permalink
#2: update setup script output
Browse files Browse the repository at this point in the history
  • Loading branch information
tlamonthezie committed Sep 30, 2024
1 parent db62189 commit 1950dbe
Show file tree
Hide file tree
Showing 13 changed files with 405 additions and 211 deletions.
2 changes: 1 addition & 1 deletion ci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,14 @@ setup:
# setup from vt
amd64-ubuntu-20.04-gcc-9-12.2.0-cpp: &amd64-ubuntu-20_04-gcc-9-12_2_0-cpp
label: vt, gcc-9, ubuntu, cuda 12.2, mpich
env: { <<: *env, CC: gcc-9, CXX: nvcc_wrapper }
deps:
packages: !extend [ *apt-packages, gcc-9, g++-9 ]
cmake: *cmake-args # 3.23.4 in vt but seems to be an error with vtk tiff build because error in Cmake CheckSize.
mpich:
env: { CC: gcc-9, CXX: g++9 }
args: ['3.3.2', '-j4']
nvcc_wrapper: ~
env: { <<: *env, CC: gcc-9, CXX: nvcc_wrapper }

amd64-ubuntu-20.04-gcc-9-11.2.2-cpp:
<<: *amd64-ubuntu-20_04-gcc-9-12_2_0-cpp
Expand Down
29 changes: 11 additions & 18 deletions ci/docker/base.dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Build an image with some configured packages and dependencies
# Base dockerfile to build images used in Darma testing.

ARG ARCH=amd64
ARG BASE=ubuntu:22.04
Expand All @@ -11,32 +11,25 @@ ARG FC=${FC:-""}

FROM --platform=${ARCH} ${BASE} as base

ARG SETUP_ID
ARG CC
ARG CXX
ARG GCOV
ARG MPICH_CC
ARG MPICH_CXX
ARG SETUP_ID \
CC \
CXX \
GCOV \
CMAKE_BUILD_TYPE \
CMAKE_CXX_STANDARD \
MPICH_CC \
MPICH_CXX

ARG CMAKE_BUILD_TYPE
ARG CMAKE_CXX_STANDARD

# Environment
# Test environment variables
ENV DOCKER_RUN=1 \
CC=$CC \
CXX=$CXX \
MPICH_CC=$MPICH_CC \
MPICH_CXX=$MPICH_CXX \
GCOV=$GCOV \
\
CONDA_INSTALL_DIR=/opt/conda \
CONDA_AUTO_ACTIVATE_BASE=false \
\
VTK_DIR=/opt/vtk/build \
\
LESSCHARSET=utf-8 \
\
PATH=/opt/cmake/bin:/opt/nvcc_wrapper/bin:/opt/vtk/bin:$PATH
PATH=/usr/lib/ccache:/opt/cmake/bin:/opt/nvcc_wrapper/bin:/opt/vtk/bin:$PATH

COPY ci/shared/scripts/setup-${SETUP_ID}.sh setup.sh

Expand Down
63 changes: 42 additions & 21 deletions ci/setup-template.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SCRIPTS_INSTALL_DIR=/opt/scripts/ci
# TODO: change 2-implement-common-docker-containers to master once scripts when PR is ready
SCRIPTS_DEPS_URL="https://raw.githubusercontent.com/DARMA-tasking/workflows/refs/heads/2-implement-common-docker-containers/ci/shared/scripts/deps"

echo "------------- Setup --------------"

OS=
OS_VERSION=
UNAME=$(uname)
Expand All @@ -28,27 +30,22 @@ then
OS_VERSION=$(cat /etc/os-release | grep -E "^VERSION_ID=*" | cut -d = -f 2 | tr -d '"')
fi

# Save setup environment
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc

echo "/////////////////////////////////////////////////"
echo "Setup script"
echo "/////////////////////////////////////////////////"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "Setup configuration:"
echo "> Setup Id (SETUP_ID): $SETUP_ID"
echo "> C Compiler (CC): $CC"
echo "> C++ Compiler (CXX): $CXX"
echo "> Fortran Compiler (FC): $FC"
echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE"
echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD"
echo "In docker: $DOCKER_RUN"
echo "----------------------------------"

echo "/////////////////////////////////////////////////"
# Save setup environment to ~/.setuprc (used by packages.sh dep for example)
echo "--"
echo "-- Sharing setup information (SETUP_ID, OS_NAME, OS_VERSION, DOCKER_RUN) into ~/.setuprc"
echo "--"
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc

### UPDATE PACKAGE LIST AND INSTALL START-UP PACKAGES: git, wget, bash.
echo "--"
echo "-- Installing Core packages..."
if [ "$OS_NAME" = "Ubuntu" ]
then
apt-get update -y -q
Expand All @@ -65,7 +62,16 @@ else
exit 1
fi

echo "--"
echo "-- Core packages installed !"
echo "--"

### SETUP DEPENDENCIES

echo "--"
echo "-- Installing dependencies..."
echo "--"

mkdir -p $SCRIPTS_INSTALL_DIR
mkdir -p $SCRIPTS_INSTALL_DIR/deps
# 1. Download dependency installation script
Expand All @@ -82,6 +88,10 @@ if [ "$DOCKER_RUN" = "1" ]; then
rm -rf /var/lib/apt/lists/*
fi

echo "--"
echo "-- Dependencies installed !"
echo "--"

### CLEAN-UP
if [ "$OS_NAME" = "Ubuntu" ]
then
Expand All @@ -96,7 +106,18 @@ else
echo "No cleanup instructions defined for OS=$OS."
fi

if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ]
then
export CXX=nvcc_wrapper
fi
echo "---------- Setup OK ! ------------"
echo "--"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "--"
echo "Setup id: $SETUP_ID"
echo "--"
echo "Environment:"
echo " CC=$CC"
echo " CXX=$CXX"
echo " CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
echo " CMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD"
echo " FC=$FC"
echo "--"
echo "-------- Ready to test ! ---------"
echo "--"
3 changes: 0 additions & 3 deletions ci/shared/scripts/deps/mpich.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ cd ${mpich_name}
--enable-fast=all \
--enable-g=none \
--enable-timing=none \
CC=$CC \
CXX=$CXX \
FC=$FC \
${installation_prefix:+ --prefix"=${installation_prefix}"}
make ${make_flags}
make install
Expand Down
63 changes: 42 additions & 21 deletions ci/shared/scripts/setup-amd64-alpine-clang-13-clang-13-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SCRIPTS_INSTALL_DIR=/opt/scripts/ci
# TODO: change 2-implement-common-docker-containers to master once scripts when PR is ready
SCRIPTS_DEPS_URL="https://raw.githubusercontent.com/DARMA-tasking/workflows/refs/heads/2-implement-common-docker-containers/ci/shared/scripts/deps"

echo "------------- Setup --------------"

OS=
OS_VERSION=
UNAME=$(uname)
Expand All @@ -28,27 +30,22 @@ then
OS_VERSION=$(cat /etc/os-release | grep -E "^VERSION_ID=*" | cut -d = -f 2 | tr -d '"')
fi

# Save setup environment
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc

echo "/////////////////////////////////////////////////"
echo "Setup script"
echo "/////////////////////////////////////////////////"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "Setup configuration:"
echo "> Setup Id (SETUP_ID): $SETUP_ID"
echo "> C Compiler (CC): $CC"
echo "> C++ Compiler (CXX): $CXX"
echo "> Fortran Compiler (FC): $FC"
echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE"
echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD"
echo "In docker: $DOCKER_RUN"
echo "----------------------------------"

echo "/////////////////////////////////////////////////"
# Save setup environment to ~/.setuprc (used by packages.sh dep for example)
echo "--"
echo "-- Sharing setup information (SETUP_ID, OS_NAME, OS_VERSION, DOCKER_RUN) into ~/.setuprc"
echo "--"
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc

### UPDATE PACKAGE LIST AND INSTALL START-UP PACKAGES: git, wget, bash.
echo "--"
echo "-- Installing Core packages..."
if [ "$OS_NAME" = "Ubuntu" ]
then
apt-get update -y -q
Expand All @@ -65,7 +62,16 @@ else
exit 1
fi

echo "--"
echo "-- Core packages installed !"
echo "--"

### SETUP DEPENDENCIES

echo "--"
echo "-- Installing dependencies..."
echo "--"

mkdir -p $SCRIPTS_INSTALL_DIR
mkdir -p $SCRIPTS_INSTALL_DIR/deps
# 1. Download dependency installation script
Expand All @@ -84,6 +90,10 @@ if [ "$DOCKER_RUN" = "1" ]; then
rm -rf /var/lib/apt/lists/*
fi

echo "--"
echo "-- Dependencies installed !"
echo "--"

### CLEAN-UP
if [ "$OS_NAME" = "Ubuntu" ]
then
Expand All @@ -98,7 +108,18 @@ else
echo "No cleanup instructions defined for OS=$OS."
fi

if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ]
then
export CXX=nvcc_wrapper
fi
echo "---------- Setup OK ! ------------"
echo "--"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "--"
echo "Setup id: $SETUP_ID"
echo "--"
echo "Environment:"
echo " CC=$CC"
echo " CXX=$CXX"
echo " CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
echo " CMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD"
echo " FC=$FC"
echo "--"
echo "-------- Ready to test ! ---------"
echo "--"
63 changes: 42 additions & 21 deletions ci/shared/scripts/setup-amd64-ubuntu-20.04-gcc-9-11.2.2-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ SCRIPTS_INSTALL_DIR=/opt/scripts/ci
# TODO: change 2-implement-common-docker-containers to master once scripts when PR is ready
SCRIPTS_DEPS_URL="https://raw.githubusercontent.com/DARMA-tasking/workflows/refs/heads/2-implement-common-docker-containers/ci/shared/scripts/deps"

echo "------------- Setup --------------"

OS=
OS_VERSION=
UNAME=$(uname)
Expand All @@ -28,27 +30,22 @@ then
OS_VERSION=$(cat /etc/os-release | grep -E "^VERSION_ID=*" | cut -d = -f 2 | tr -d '"')
fi

# Save setup environment
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc

echo "/////////////////////////////////////////////////"
echo "Setup script"
echo "/////////////////////////////////////////////////"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "Setup configuration:"
echo "> Setup Id (SETUP_ID): $SETUP_ID"
echo "> C Compiler (CC): $CC"
echo "> C++ Compiler (CXX): $CXX"
echo "> Fortran Compiler (FC): $FC"
echo "> Build type (CMAKE_BUILD_TYPE): $CMAKE_BUILD_TYPE"
echo "> C++ Standard (CMAKE_CXX_STANDARD): $CMAKE_CXX_STANDARD"
echo "In docker: $DOCKER_RUN"
echo "----------------------------------"

echo "/////////////////////////////////////////////////"
# Save setup environment to ~/.setuprc (used by packages.sh dep for example)
echo "--"
echo "-- Sharing setup information (SETUP_ID, OS_NAME, OS_VERSION, DOCKER_RUN) into ~/.setuprc"
echo "--"
echo "export SETUP_ID=\"$SETUP_ID\"" >> ~/.setuprc
echo "export DOCKER_RUN=\"$DOCKER_RUN\"" >> ~/.setuprc
echo "export OS_NAME=\"$OS_NAME\"" >> ~/.setuprc
echo "export OS_VERSION=\"$OS_VERSION\"" >> ~/.setuprc

### UPDATE PACKAGE LIST AND INSTALL START-UP PACKAGES: git, wget, bash.
echo "--"
echo "-- Installing Core packages..."
if [ "$OS_NAME" = "Ubuntu" ]
then
apt-get update -y -q
Expand All @@ -65,7 +62,16 @@ else
exit 1
fi

echo "--"
echo "-- Core packages installed !"
echo "--"

### SETUP DEPENDENCIES

echo "--"
echo "-- Installing dependencies..."
echo "--"

mkdir -p $SCRIPTS_INSTALL_DIR
mkdir -p $SCRIPTS_INSTALL_DIR/deps
# 1. Download dependency installation script
Expand All @@ -88,6 +94,10 @@ if [ "$DOCKER_RUN" = "1" ]; then
rm -rf /var/lib/apt/lists/*
fi

echo "--"
echo "-- Dependencies installed !"
echo "--"

### CLEAN-UP
if [ "$OS_NAME" = "Ubuntu" ]
then
Expand All @@ -102,7 +112,18 @@ else
echo "No cleanup instructions defined for OS=$OS."
fi

if [ -e "opt/nvcc_wrapper/bin/nvcc_wrapper" ]
then
export CXX=nvcc_wrapper
fi
echo "---------- Setup OK ! ------------"
echo "--"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "--"
echo "Setup id: $SETUP_ID"
echo "--"
echo "Environment:"
echo " CC=$CC"
echo " CXX=$CXX"
echo " CMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE"
echo " CMAKE_CXX_STANDARD=$CMAKE_CXX_STANDARD"
echo " FC=$FC"
echo "--"
echo "-------- Ready to test ! ---------"
echo "--"
Loading

0 comments on commit 1950dbe

Please sign in to comment.