Skip to content

Commit

Permalink
Merge pull request #9 from DARMA-tasking/8-add-compatibility-with-vt-tv
Browse files Browse the repository at this point in the history
#8: Add compatibility with vt-tv
  • Loading branch information
cwschilly authored Jan 10, 2025
2 parents 9ba0544 + 8067110 commit 3071eba
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 3 deletions.
21 changes: 20 additions & 1 deletion ci/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

# Dependencies:
# The dependencies are command or scripts to run during a setup process
# - dependencies scripts: located under the `deps` directory. Use script same (no prefix) as key
# - dependencies scripts: located under the `deps` directory. Use script name (no prefix) as key
# - simple commands: use `cmd` as key. It will be added as is in the setup script.

# List of defaults and/or re-usable configuration nodes
Expand Down Expand Up @@ -67,6 +67,18 @@ setup:
deps:
packages: !extend [ *brew-packages, mpich ]

arm64-macos-14-clang-14-vtk-cpp:
label: macos-14-arm64, clang-14, mpich, vtk
env:
<<: *env
CC: mpicc
CXX: mpicxx++
deps:
packages: !extend [ *brew-packages, mpich]
cmake: ['3.23.4']
mesa: ~
vtk: '9.3.1'

# alpine linux
amd64-alpine-clang-13-cpp:
label: alpine-3.16, clang-13, mpich
Expand Down Expand Up @@ -116,6 +128,7 @@ setup:
<<: *develop-gcc
label: gcc-12, ubuntu, mpich, vtk
deps:
packages: !extend [ *apt-packages, gcc-12, g++-12, gcovr, lcov, xvfb ]
<<: *develop-gcc-deps
mesa: ~
vtk: '9.3.1'
Expand Down Expand Up @@ -211,6 +224,7 @@ setup:
<<: *develop-clang
label: clang-16, ubuntu, mpich, vtk
deps:
packages: !extend [ *apt-packages, clang-16, llvm-16, xvfb ]
<<: *develop-clang-deps
mesa: ~
vtk: '9.3.1'
Expand Down Expand Up @@ -443,6 +457,11 @@ runners:
runs-on: macos-14
setup: arm64-macos-14-clang-14-cpp

-
type: *runner-types
runs-on: macos-14
setup: arm64-macos-14-clang-14-vtk-cpp

# alpine linux
-
type: *runner-types
Expand Down
6 changes: 6 additions & 0 deletions ci/shared/matrix/azure.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"setup": "arm64-macos-14-clang-14-cpp",
"name": "arm64-macos-14-clang-14-cpp"
},
"arm64-macos-14-clang-14-vtk-cpp": {
"label": "macos-14-arm64, clang-14, mpich, vtk",
"vmImage": "macos-14",
"setup": "arm64-macos-14-clang-14-vtk-cpp",
"name": "arm64-macos-14-clang-14-vtk-cpp"
},
"wf-amd64-alpine-clang-13-cpp": {
"label": "alpine-3.16, clang-13, mpich",
"vmImage": "ubuntu-latest",
Expand Down
6 changes: 6 additions & 0 deletions ci/shared/matrix/github.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
"setup": "arm64-macos-14-clang-14-cpp",
"name": "arm64-macos-14-clang-14-cpp"
},
{
"label": "macos-14-arm64, clang-14, mpich, vtk",
"runs-on": "macos-14",
"setup": "arm64-macos-14-clang-14-vtk-cpp",
"name": "arm64-macos-14-clang-14-vtk-cpp"
},
{
"label": "alpine-3.16, clang-13, mpich",
"runs-on": "ubuntu-latest",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ fi

chmod u+x *.sh
ls -l
./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev" "make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "gcc-12" "g++-12" "gcovr" "lcov"
./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev" "make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "gcc-12" "g++-12" "gcovr" "lcov" "xvfb"
./cmake.sh "3.23.4"
CC="gcc-12" CXX="g++-12" ./mpich.sh "4.0.2" "-j4"
./mesa.sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ fi

chmod u+x *.sh
ls -l
./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev" "make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "clang-16" "llvm-16"
./packages.sh "curl" "jq" "less" "libomp5" "libunwind-dev" "make-guile" "ninja-build" "valgrind" "zlib1g" "zlib1g-dev" "ccache" "python3" "clang-16" "llvm-16" "xvfb"
./cmake.sh "3.23.4"
./libunwind.sh "1.6.2"
./mpich.sh "4.0.2" "-j4"
Expand Down
141 changes: 141 additions & 0 deletions ci/shared/scripts/setup-arm64-macos-14-clang-14-vtk-cpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/usr/bin/env sh

#
# macos-14-arm64, clang-14, mpich, vtk - Installation
# Note: requires
# - `git` and `wget` installed.
# - run as root

#
# IMPORTANT: This file has been generated by a script. Please do not edit !
#

WF_TMP_DIR=${WF_TMP_DIR:-"/opt/workflows"}
WF_DEPS_URL=${WF_DEPS_URL:-"https://raw.githubusercontent.com/DARMA-tasking/workflows/refs/heads/master/ci/shared/scripts/deps"}

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

OS=
OS_VERSION=
UNAME=$(uname)
WF_DOCKER=${WF_DOCKER:-"0"}
if [ "$UNAME" = "Darwin" ]
then
OS_NAME=$(sw_vers -productName)
OS_VERSION=$(sw_vers -productVersion)
elif [ "$UNAME" = "Linux" ]
then
OS_NAME=$(cat /etc/os-release | grep -E "^NAME=*" | cut -d = -f 2 | tr -d '"')
OS_VERSION=$(cat /etc/os-release | grep -E "^VERSION_ID=*" | cut -d = -f 2 | tr -d '"')
fi

echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "WF_DOCKER=$WF_DOCKER"
echo "PATH=$PATH"
echo "CPATH=$CPATH"
echo "LIBRARY_PATH=$LIBRARY_PATH"
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
echo "----------------------------------"

# Save setup environment to ~/.setuprc (used by packages.sh dep for example)
echo "-- Set up variables (WF_SETUP_ID, WF_DOCKER, OS_NAME, OS_VERSION) > ~/.setuprc"
{
echo "export WF_SETUP_ID=\"$WF_SETUP_ID\""
echo "export WF_DOCKER=\"$WF_DOCKER\""
echo "export OS_NAME=\"$OS_NAME\""
echo "export OS_VERSION=\"$OS_VERSION\""
} >> ~/.setuprc

### UPDATE PACKAGE LIST AND INSTALL START-UP PACKAGES: git, wget, bash.
echo "-- Installing Core packages ($OS_NAME)..."
if [ "$OS_NAME" = "Ubuntu" ]
then
apt-get update -y -q
apt-get install -y -q --no-install-recommends ca-certificates wget git
elif [ "$OS_NAME" = "Alpine Linux" ]
then
apk update
apk add --no-cache wget git bash
elif [ "$OS_NAME" = "macOS" ]
then
brew update
else
echo "Error. Please implement the pre-setup instructions for OS=$OS_NAME"
exit 1
fi

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

set -e

### SETUP DEPENDENCIES

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

if [ "$WF_DOCKER" = "1" ]; then
# If a docker image is being built then deps are already available.
cd $WF_TMP_DIR/deps
else
# if setup is ru directly (for example by a CI runner) then fetch dependencies
# trigger deps download from the workflows repo.
mkdir -p $WF_TMP_DIR
mkdir -p $WF_TMP_DIR/deps
# 1. Download dependency installation script
cd $WF_TMP_DIR/deps
wget $WF_DEPS_URL/packages.sh
wget $WF_DEPS_URL/cmake.sh
wget $WF_DEPS_URL/mesa.sh
wget $WF_DEPS_URL/vtk.sh
fi

chmod u+x *.sh
ls -l
./packages.sh "ccache" "coreutils" "ninja" "mpich"
./cmake.sh "3.23.4"
./mesa.sh
./vtk.sh "9.3.1"

# Remove install scripts
rm -rf $WF_SCRIPTS_DIR

if [ "$WF_DOCKER" = "1" ]; then
rm -rf /var/lib/apt/lists/*
fi

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

### CLEAN-UP
if [ "$OS_NAME" = "Ubuntu" ]
then
rm -rf /var/lib/apt/lists/*
elif [ "$OS_NAME" = "Alpine Linux" ]
then
:
elif [ "$OS_NAME" = "macOS" ]
then
:
else
echo "No cleanup instructions defined for OS=$OS."
fi

echo "---------- Setup OK ! ------------"
echo "--"
echo "Operating system: $OS_NAME / Version: $OS_VERSION"
echo "--"
echo "Setup id: $WF_SETUP_ID"
echo "Docker: $WF_DOCKER"
echo "--"
echo "Environment:"
echo " CC=$CC"
echo " CXX=$CXX"
echo " FC=$FC"
echo " PATH=$PATH"
echo "--"
echo "-------- Ready to test ! ---------"
echo "--"

0 comments on commit 3071eba

Please sign in to comment.