diff --git a/CI/README.md b/CI/README.md index 65e6d1e8..161c4a48 100644 --- a/CI/README.md +++ b/CI/README.md @@ -28,7 +28,8 @@ It should define: - `REFRAME_VERSION` (mandatory): the version of ReFrame you'd like to use to drive the EESSI test suite in the CI pipeline. - `REFRAME_URL` (optional): the URL that will be used to `git clone` the ReFrame repository (in order to provide the `hpctestlib`). Typically this points to the official repository, but you may want to use another URL from a fork for development purposes. Default: `https://github.com/reframe-hpc/reframe.git`. - `REFRAME_BRANCH` (optional): the branch name to be cloned for the ReFrame repository (in order to provide the `hpctestlib`). Typically this points to the branch corresponding with `${REFRAME_VERSION}`, unless you want to run from a feature branch for development purposes. Default: `v${REFRAME_VERSION}`. -- `EESSI_VERSION` (mandatory): the version of the EESSI software stack you would like to be loaded & tested in the CI pipeline. +- `EESSI_CVMFS_REPO` (optional): the prefix for the CVMFS repository to use, e.g. `/cvmfs/software.eessi.io` +- `EESSI_VERSION` (optional): the version of the EESSI software stack you would like to be loaded & tested in the CI pipeline. - `EESSI_TESTSUITE_URL` (optional): the URL that will be used to `git clone` the `EESSI/test-suite` repository. Typically this points to the official repository, but you may want to use another URL from a fork for development purposes. Default: `https://github.com/EESSI/test-suite.git`. - `EESSI_TESTSUITE_VERSION` (optional): the version of the EESSI test-suite repository you want to use in the CI pipeline. Default: latest release. - `RFM_CONFIG_FILES` (optional): the location of the ReFrame configuration file to be used for this system. Default: `${TEMPDIR}/test-suite/config/${EESSI_CI_SYSTEM_NAME}.py`. @@ -44,6 +45,13 @@ echo "0 0 * * SUN EESSI_CI_SYSTEM_NAME=aws_citc ${HOME}/test-suite/CI/run_refram ``` Would create a cronjob running weekly on Sundays. See the crontab manual for other schedules. +Note that you can overwrite the settings in the ci_config.sh by setting environment variables in the crontab. E.g. the following crontab file would run single node and 2-node tests daily, and 1, 2, 4, 8, and 16-node tests weekly (on Sundays): +``` +# crontab file +0 0 * * * EESSI_CI_SYSTEM_NAME=aws_mc REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" ${HOME}/test-suite/CI/run_reframe_wrapper.sh +0 0 * * SUN EESSI_CI_SYSTEM_NAME=aws_mc REFRAME_ARGS="--tag CI --tag 1_node|2_nodes|4_nodes|8_nodes|16_nodes" ${HOME}/test-suite/CI/run_reframe_wrapper.sh +``` + ## Output of the CI pipeline The whole point of the `run_reframe_wrapper.sh` script is to easily get the stdout and stderr from your `run_reframe.sh` in a time-stamped logfile. By default, these are stored in `${HOME}/EESSI_CI_LOGS`. This can be changed by setting the environment variable `EESSI_CI_LOGDIR`. Again, you'd have to set this when creating your `crontab` file, e.g. ``` diff --git a/CI/aws_citc/ci_config.sh b/CI/aws_citc/ci_config.sh deleted file mode 100644 index 4eac6b3c..00000000 --- a/CI/aws_citc/ci_config.sh +++ /dev/null @@ -1,3 +0,0 @@ -# Configurable items -REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" -REFRAME_VERSION=4.4.1 # ReFrame version that will be pip-installed to drive the test suite diff --git a/CI/aws_mc/ci_config.sh b/CI/aws_mc/ci_config.sh index d7975420..1ea9d001 100644 --- a/CI/aws_mc/ci_config.sh +++ b/CI/aws_mc/ci_config.sh @@ -1,7 +1,8 @@ # Configurable items -REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" -REFRAME_VERSION=4.4.1 # ReFrame version that will be pip-installed to drive the test suite -# Latest release does not contain the `aws_mc.py` ReFrame config yet -# The custom EESSI_TESTSUITE_URL and EESSI_TESTSUITE_BRANCH can be removed in a follow-up PR -EESSI_TESTSUITE_URL='https://github.com/casparvl/test-suite.git' -EESSI_TESTSUITE_BRANCH='CI' +if [ -z "${REFRAME_ARGS}" ]; then + REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" +fi +# For now, software.eessi.io is not yet deployed on login nodes of the AWS MC cluster +if [ -z "${EESSI_CVMFS_REPO}" ]; then + EESSI_CVMFS_REPO="/cvmfs/pilot.eessi-hpc.org" +fi diff --git a/CI/it4i_karolina/ci_config.sh b/CI/it4i_karolina/ci_config.sh index d7975420..4bd95bef 100644 --- a/CI/it4i_karolina/ci_config.sh +++ b/CI/it4i_karolina/ci_config.sh @@ -1,7 +1,4 @@ # Configurable items -REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" -REFRAME_VERSION=4.4.1 # ReFrame version that will be pip-installed to drive the test suite -# Latest release does not contain the `aws_mc.py` ReFrame config yet -# The custom EESSI_TESTSUITE_URL and EESSI_TESTSUITE_BRANCH can be removed in a follow-up PR -EESSI_TESTSUITE_URL='https://github.com/casparvl/test-suite.git' -EESSI_TESTSUITE_BRANCH='CI' +if [ -z "${REFRAME_ARGS}" ]; then + REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" +fi diff --git a/CI/izum_vega/ci_config.sh b/CI/izum_vega/ci_config.sh index 4eac6b3c..4bd95bef 100644 --- a/CI/izum_vega/ci_config.sh +++ b/CI/izum_vega/ci_config.sh @@ -1,3 +1,4 @@ # Configurable items -REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" -REFRAME_VERSION=4.4.1 # ReFrame version that will be pip-installed to drive the test suite +if [ -z "${REFRAME_ARGS}" ]; then + REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" +fi diff --git a/CI/run_reframe.sh b/CI/run_reframe.sh index 534c6651..2068f03f 100755 --- a/CI/run_reframe.sh +++ b/CI/run_reframe.sh @@ -4,32 +4,40 @@ # Setup instructions: make sure you have your github access key configured in your .ssh/config # i.e. configure an entry with HostName github.com and IdentityFile pointing to the ssh key registered with Github +# Print on which host this CI is running +echo "Running CI on host $(hostname)" + # Get directory of the current script SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) - +echo $SCRIPT_DIR # Check if EESSI_CI_SYSTEM_NAME is defined if [ -z "${EESSI_CI_SYSTEM_NAME}" ]; then echo "You have to define the EESSI_CI_SYSTEM_NAME environment variable in order to run the EESSI test suite CI" > /dev/stderr + echo "Valid EESSI_CI_SYSTEM_NAME's are:" + echo "$(find $SCRIPT_DIR -mindepth 1 -maxdepth 1 -type d -exec basename {} \;)" exit 1 fi # Check if CI_CONFIG file file exists CI_CONFIG="${SCRIPT_DIR}/${EESSI_CI_SYSTEM_NAME}/ci_config.sh" if [ ! -f "${CI_CONFIG}" ]; then - echo "File ${CI_CONFIG} does not exist. Please check your RFM_CI_SYSTEM_NAME (${EESSI_CI_SYSTEM_NAME}) and make sure the directory in which the current script resides (${SCRIPT_DIR}) contains a subdirectory with that name, and a CI configuration file (ci_config.sh) inside". > /dev/stderr + echo "File ${CI_CONFIG} does not exist. Please check your EESSI_CI_SYSTEM_NAME (${EESSI_CI_SYSTEM_NAME}) and make sure the directory in which the current script resides (${SCRIPT_DIR}) contains a subdirectory with that name, and a CI configuration file (ci_config.sh) inside". > /dev/stderr exit 1 fi # Set the CI configuration for this system source "${CI_CONFIG}" -# Set default configuration +# Set default configuration, but let anything set by CI_CONFIG take priority if [ -z "${TEMPDIR}" ]; then TEMPDIR=$(mktemp --directory --tmpdir=/tmp -t rfm.XXXXXXXXXX) fi if [ -z "${REFRAME_ARGS}" ]; then REFRAME_ARGS="--tag CI --tag 1_node" fi +if [ -z "${REFRAME_VERSION}"]; then + REFRAME_VERSION=4.5.1 +fi if [ -z "${REFRAME_URL}" ]; then REFRAME_URL='https://github.com/reframe-hpc/reframe.git' fi @@ -40,10 +48,13 @@ if [ -z "${EESSI_TESTSUITE_URL}" ]; then EESSI_TESTSUITE_URL='https://github.com/EESSI/test-suite.git' fi if [ -z "${EESSI_TESTSUITE_BRANCH}" ]; then - EESSI_TESTSUITE_BRANCH='v0.1.0' + EESSI_TESTSUITE_BRANCH='v0.2.0' +fi +if [ -z "${EESSI_CVMFS_REPO}" ]; then + export EESSI_CVMFS_REPO=/cvmfs/software.eessi.io fi if [ -z "${EESSI_VERSION}" ]; then - EESSI_VERSION='latest' + export EESSI_VERSION=2023.06 fi if [ -z "${RFM_CONFIG_FILES}" ]; then export RFM_CONFIG_FILES="${TEMPDIR}/test-suite/config/${EESSI_CI_SYSTEM_NAME}.py" @@ -74,11 +85,7 @@ export PYTHONPATH="${PYTHONPATH}":"${TEMPDIR}"/test-suite/ # Start the EESSI environment unset MODULEPATH -if [ "${EESSI_VERSION}" = 'latest' ]; then - eessi_init_path=/cvmfs/pilot.eessi-hpc.org/latest/init/bash -else - eessi_init_path=/cvmfs/pilot.eessi-hpc.org/versions/"${EESSI_VERSION}"/init/bash -fi +eessi_init_path="${EESSI_CVMFS_REPO}"/versions/"${EESSI_VERSION}"/init/bash source "${eessi_init_path}" # Needed in order to make sure the reframe from our TEMPDIR is first on the PATH, diff --git a/CI/surf_snellius/ci_config.sh b/CI/surf_snellius/ci_config.sh index 4eac6b3c..4bd95bef 100644 --- a/CI/surf_snellius/ci_config.sh +++ b/CI/surf_snellius/ci_config.sh @@ -1,3 +1,4 @@ # Configurable items -REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" -REFRAME_VERSION=4.4.1 # ReFrame version that will be pip-installed to drive the test suite +if [ -z "${REFRAME_ARGS}" ]; then + REFRAME_ARGS="--tag CI --tag 1_node|2_nodes" +fi