Skip to content

Commit 541b40a

Browse files
committed
Allow there to be an environment variable per EESSI version for site top-level toolchains
1 parent 9957485 commit 541b40a

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

.github/workflows/test-eb-hooks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,12 @@ jobs:
104104
echo "Hook ignored via EESSI_OVERRIDE_TOOLCHAIN_CHECK with easyconfig $INCOMPATIBLE_EASYCONFIG and EESSI/${{matrix.EESSI_VERSION}}"
105105
106106
# Now check if we can set a site list of supported toolchains
107-
export EESSI_SITE_TOP_LEVEL_TOOLCHAINS='${{matrix.EESSI_SITE_TOP_LEVEL_TOOLCHAINS}}'
107+
export EESSI_SITE_TOP_LEVEL_TOOLCHAINS_"${{matrix.EESSI_VERSION}}"='${{matrix.EESSI_SITE_TOP_LEVEL_TOOLCHAINS}}'
108108
eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch
109109
echo "Site supported toolchain $EESSI_SITE_TOP_LEVEL_TOOLCHAINS successfully used with easyconfig $INCOMPATIBLE_EASYCONFIG and EESSI/${{matrix.EESSI_VERSION}}"
110110
111111
# Make sure an invalid list of dicts fails
112-
export EESSI_SITE_TOP_LEVEL_TOOLCHAINS="Not a list of dicts"
112+
export EESSI_SITE_TOP_LEVEL_TOOLCHAINS_"${{matrix.EESSI_VERSION}}"="Not a list of dicts"
113113
eb --hooks=$PWD/eb_hooks.py "$INCOMPATIBLE_EASYCONFIG" --stop fetch 2>&1 1>/dev/null | grep -q "does not contain a valid list of dictionaries"
114114
echo "Incorrect format for EESSI_SITE_TOP_LEVEL_TOOLCHAINS caught"
115115

eb_hooks.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,8 +164,9 @@ def parse_list_of_dicts_env(var_name):
164164
def verify_toolchains_supported_by_eessi_version(easyconfigs):
165165
"""Each EESSI version supports a limited set of toolchains, sanity check the easyconfigs for toolchain support."""
166166
eessi_version = get_eessi_envvar('EESSI_VERSION')
167-
supported_eessi_toolchains = parse_list_of_dicts_env('EESSI_SITE_TOP_LEVEL_TOOLCHAINS')
168-
for top_level_toolchain in EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[eessi_version]:
167+
supported_eessi_toolchains = []
168+
site_top_level_toolchains = parse_list_of_dicts_env('EESSI_SITE_TOP_LEVEL_TOOLCHAINS_' + eessi_version)
169+
for top_level_toolchain in EESSI_SUPPORTED_TOP_LEVEL_TOOLCHAINS[eessi_version] + site_top_level_toolchains:
169170
supported_eessi_toolchains += get_toolchain_hierarchy(top_level_toolchain)
170171
for ec in easyconfigs:
171172
toolchain = ec['ec']['toolchain']

0 commit comments

Comments
 (0)