@@ -29,6 +29,11 @@ permissions:
2929jobs :
3030 build :
3131 runs-on : ubuntu-24.04
32+ strategy :
33+ fail-fast : false
34+ matrix :
35+ EESSI_VERSION :
36+ - ' 2023.06'
3237 steps :
3338 - name : checkout
3439 uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3944
4045 - name : test load_easybuild_module.sh script
4146 run : |
42- # bind current directory into container as /software-layer
43- export SINGULARITY_BIND="${PWD}:/software-layer"
47+ # bind current directory into container as /software-layer-scripts
48+ export SINGULARITY_BIND="${PWD}:/software-layer-scripts "
4449
4550 # can't test with EasyBuild versions older than v4.5.2 when using EESSI 2023.06,
4651 # since Python in compat layer is Python 3.11.x;
@@ -58,64 +63,65 @@ jobs:
5863 echo 'export TMPDIR=$(mktemp -d)' >> ${test_script}
5964 # set up environment to have utility functions in place that load_easybuild_module.sh script relies on,
6065 # along with $EESSI_* environment variables, and Lmod
61- echo 'ls -l /software-layer/' >> ${test_script}
62- echo 'source /software-layer/scripts/utils.sh' >> ${test_script}
63- echo 'source /software-layer/init/eessi_environment_variables' >> ${test_script}
66+ echo 'ls -l /software-layer-scripts/' >> ${test_script}
67+ echo 'sed -i "s/__EESSI_VERSION_DEFAULT__/${{matrix.EESSI_VERSION}}/g" init/eessi_defaults
68+ echo 'source /software-layer-scripts/scripts/utils.sh' >> ${test_script}
69+ echo 'source /software-layer-scripts/init/eessi_environment_variables' >> ${test_script}
6470 echo 'source ${EPREFIX}/usr/share/Lmod/init/bash' >> ${test_script}
6571 # minimal configuration for EasyBuild so we can test installation aspect of load_easybuild_module.sh script
6672 echo "export EASYBUILD_INSTALLPATH=/tmp/eb-${EB_VERSION}" >> ${test_script}
6773 echo 'module use ${EASYBUILD_INSTALLPATH}/modules/all' >> ${test_script}
6874 echo '' >> ${test_script}
69- echo "source /software-layer/load_easybuild_module.sh ${EB_VERSION}" >> ${test_script}
75+ echo "source /software-layer-scripts /load_easybuild_module.sh ${EB_VERSION}" >> ${test_script}
7076 echo 'module list' >> ${test_script}
7177 echo 'eb --version' >> ${test_script}
7278
7379 chmod u+x ${test_script}
7480
7581 # run wrapper script + capture & check output
7682 out="${PWD}/eb-${EB_VERSION}.out"
77- ./eessi_container.sh --access rw --mode run --verbose /software-layer/run_in_compat_layer_env.sh /software-layer/eb-${EB_VERSION}.sh 2>&1 | tee ${out}
83+ ./eessi_container.sh --access rw --mode run --verbose /software-layer-scripts /run_in_compat_layer_env.sh /software-layer-scripts /eb-${EB_VERSION}.sh 2>&1 | tee ${out}
7884 pattern="^This is EasyBuild ${EB_VERSION} "
7985 grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
8086 done
8187
8288 - name : test install_software_layer.sh script
8389 run : |
84- # bind current directory into container as /software-layer
85- export SINGULARITY_BIND="${PWD}:/software-layer"
90+ # bind current directory into container as /software-layer-scripts
91+ export SINGULARITY_BIND="${PWD}:/software-layer-scripts "
8692 # force using x86_64/generic, to avoid triggering an installation from scratch
8793 sed -i "s@./EESSI-install-software.sh@\"export EESSI_SOFTWARE_SUBDIR_OVERRIDE='x86_64/generic'; ./EESSI-install-software.sh\"@g" install_software_layer.sh
8894 # skip installation of CUDA SDKs, since this is too heavy for CI
8995 sed -i "s@./EESSI-install-software.sh@./EESSI-install-software.sh --skip-cuda-install@g" install_software_layer.sh
90- ./eessi_container.sh --mode run --verbose /software-layer/install_software_layer.sh
96+ ./eessi_container.sh --mode run --verbose /software-layer-scripts /install_software_layer.sh
9197
9298 - name : test create_directory_tarballs.sh script
9399 run : |
94- # bind current directory into container as /software-layer
95- export SINGULARITY_BIND="${PWD}:/software-layer"
100+ # bind current directory into container as /software-layer-scripts
101+ export SINGULARITY_BIND="${PWD}:/software-layer-scripts "
96102 # scripts need to be copied to /tmp,
97103 # since create_directory_tarballs.sh must be accessible from within build container
98- ./eessi_container.sh --mode run --verbose /software-layer/create_directory_tarballs.sh 2023.06
104+ ./eessi_container.sh --mode run --verbose /software-layer-scripts /create_directory_tarballs.sh 2023.06
99105 # check if tarballs have been produced
100106 ls -l *.tar.gz
101107
102108 - name : test create_lmodsitepackage.py script
103109 run : |
104- # bind current directory into container as /software-layer
105- export SINGULARITY_BIND="${PWD}:/software-layer"
110+ # bind current directory into container as /software-layer-scripts
111+ export SINGULARITY_BIND="${PWD}:/software-layer-scripts "
106112
107- # Creates .lmod/SitePackage.lua in current dir, which then gets bind-mounted into /software-layer
113+ # Creates .lmod/SitePackage.lua in current dir, which then gets bind-mounted into /software-layer-scripts
108114 python3 create_lmodsitepackage.py .
109115 # run some commands to make sure that generated Lmod SitePackage file works
110116 test_script="${PWD}/test_lmod_sitepackage.sh"
111117 echo '#!/bin/bash' > ${test_script}
112- echo 'export LMOD_PACKAGE_PATH="/software-layer/.lmod"' > ${test_script}
118+ echo 'export LMOD_PACKAGE_PATH="/software-layer-scripts /.lmod"' > ${test_script}
113119 echo 'ml --config' >> ${test_script}
114120
115121 chmod u+x ${test_script}
116122
117123 out="${PWD}/test_create_lmodsitepackage.out"
118- ./eessi_container.sh --mode run --verbose /software-layer/run_in_compat_layer_env.sh /software-layer/test_lmod_sitepackage.sh 2>&1 | tee ${out}
119- for pattern in "^Site Pkg location.*/software-layer/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*/software-layer/.lmod/SitePackage.lua"; do
124+ ./eessi_container.sh --mode run --verbose /software-layer-scripts /run_in_compat_layer_env.sh /software-layer-scripts /test_lmod_sitepackage.sh 2>&1 | tee ${out}
125+ for pattern in "^Site Pkg location.*/software-layer-scripts /.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*/software-layer-scripts /.lmod/SitePackage.lua"; do
120126 grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
121127 done
0 commit comments