Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add easystacks arg and bootstrap improvements #801

Open
wants to merge 1 commit into
base: 2023.06-software.eessi.io
Choose a base branch
from
Open
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
32 changes: 26 additions & 6 deletions EESSI-install-software.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
display_help() {
echo "usage: $0 [OPTIONS]"
echo " --build-logs-dir - location to copy EasyBuild logs to for failed builds"
echo " --easystacks - comma-separated list of easystack files"
echo " -g | --generic - instructs script to build for generic architecture target"
echo " -h | --help - display this usage information"
echo " -x | --http-proxy URL - provides URL for the environment variable http_proxy"
Expand Down Expand Up @@ -57,6 +58,10 @@ POSITIONAL_ARGS=()

while [[ $# -gt 0 ]]; do
case $1 in
--easystacks)
export arg_easystacks="${2}"
shift 2
;;
-g|--generic)
EASYBUILD_OPTARCH="GENERIC"
shift
Expand Down Expand Up @@ -136,7 +141,8 @@ else
source $TOPDIR/init/minimal_eessi_env

# make sure directory exists (since it's expected by init/eessi_environment_variables when using archdetect)
mkdir -p ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}
echo " Creating software directory at '${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}/software'"
mkdir -p ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}/software
)
fi

Expand Down Expand Up @@ -273,7 +279,16 @@ unset EESSI_PROJECT_INSTALL
unset EESSI_SITE_INSTALL
export EESSI_CVMFS_INSTALL=1
module unload EESSI-extend
module load EESSI-extend/${EESSI_VERSION}-easybuild
eessi_extend_module=EESSI-extend/${EESSI_VERSION}-easybuild
module avail ${eessi_extend_module} 2>&1 | grep "${eessi_extend_module}"
ec=$?
if [ ${ec} -eq 0 ]; then
module load ${eessi_extend_module}
else
echo "Did not find ${eessi_extend_module} module; setting EASYBUILD_INSTALLPATH and EASYBUILD_EXPERIMENTAL manually"
export EASYBUILD_INSTALLPATH=${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}
export EASYBUILD_EXPERIMENTAL=1
fi
Comment on lines +285 to +291
Copy link
Member

@ocaisa ocaisa Oct 31, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This creates an alternative installation setup that is dependent on whether the ${eessi_extend_module} is available or not. Rather than do that we should just have a script that ensures this module is in place (something we already have for EasyBuild itself, https://github.com/EESSI/software-layer/blob/2023.06-software.eessi.io/load_easybuild_module.sh).

I'll look into extending the existing script to also/alternatively install EESSI-extend

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion for this in trz42#76


if [ ! -z "${shared_fs_path}" ]; then
shared_eb_sourcepath=${shared_fs_path}/easybuild/sources
Expand Down Expand Up @@ -304,12 +319,17 @@ else
echo_green ">> MODULEPATH set up: ${MODULEPATH}"
fi

# assume there's only one diff file that corresponds to the PR patch file
pr_diff=$(ls [0-9]*.diff | head -1)
if [ -z ${arg_easystacks} ]; then
# assume there's only one diff file that corresponds to the PR patch file
pr_diff=$(ls [0-9]*.diff | head -1)


# use PR patch file to determine in which easystack files stuff was added
changed_easystacks=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep 'easystacks/.*yml$' | egrep -v 'known-issues|missing')
# use PR patch file to determine in which easystack files stuff was added
changed_easystacks=$(cat ${pr_diff} | grep '^+++' | cut -f2 -d' ' | sed 's@^[a-z]/@@g' | grep 'easystacks/.*yml$' | egrep -v 'known-issues|missing')
else
changed_easystacks=$(echo "${arg_easystacks}" | tr ',' '\n')
fi

if [ -z "${changed_easystacks}" ]; then
echo "No missing installations, party time!" # Ensure the bot report success, as there was nothing to be build here
else
Expand Down