diff --git a/ci/config.yaml b/ci/config.yaml index 1f78df72..d9c6077a 100644 --- a/ci/config.yaml +++ b/ci/config.yaml @@ -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 @@ -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 @@ -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' @@ -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' @@ -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 diff --git a/ci/shared/matrix/azure.json b/ci/shared/matrix/azure.json index a7c890ab..78209105 100644 --- a/ci/shared/matrix/azure.json +++ b/ci/shared/matrix/azure.json @@ -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", diff --git a/ci/shared/matrix/github.json b/ci/shared/matrix/github.json index e35ba9a6..cffc0390 100644 --- a/ci/shared/matrix/github.json +++ b/ci/shared/matrix/github.json @@ -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", diff --git a/ci/shared/scripts/setup-amd64-ubuntu-22.04-gcc-12-vtk-cpp.sh b/ci/shared/scripts/setup-amd64-ubuntu-22.04-gcc-12-vtk-cpp.sh index c42b1cb3..7001c994 100644 --- a/ci/shared/scripts/setup-amd64-ubuntu-22.04-gcc-12-vtk-cpp.sh +++ b/ci/shared/scripts/setup-amd64-ubuntu-22.04-gcc-12-vtk-cpp.sh @@ -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 diff --git a/ci/shared/scripts/setup-amd64-ubuntu-24.04-clang-16-vtk-cpp.sh b/ci/shared/scripts/setup-amd64-ubuntu-24.04-clang-16-vtk-cpp.sh index dcfe5989..6801a92d 100644 --- a/ci/shared/scripts/setup-amd64-ubuntu-24.04-clang-16-vtk-cpp.sh +++ b/ci/shared/scripts/setup-amd64-ubuntu-24.04-clang-16-vtk-cpp.sh @@ -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" diff --git a/ci/shared/scripts/setup-arm64-macos-14-clang-14-vtk-cpp.sh b/ci/shared/scripts/setup-arm64-macos-14-clang-14-vtk-cpp.sh new file mode 100644 index 00000000..2f103938 --- /dev/null +++ b/ci/shared/scripts/setup-arm64-macos-14-clang-14-vtk-cpp.sh @@ -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 "--"