-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '2023.06-software.eessi.io' into 2023.06-software.eessi.…
…io_archdetect-a64fx
- Loading branch information
Showing
111 changed files
with
3,284 additions
and
507 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
setenv("INSIDE_GITHUB_ACTIONS", "true") | ||
-- Interfere with PATH so Lmod keeps a record | ||
prepend_path("PATH", "/snap/bin") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#!/bin/bash | ||
# | ||
# This script figures out the latest version of EasyBuild being used for the installation of easystack | ||
# files. | ||
# | ||
# This file is part of the EESSI software layer, see | ||
# https://github.com/EESSI/software-layer.git | ||
# | ||
# author: Alan O'Cais (CECAM) | ||
# | ||
# license: GPLv2 | ||
# | ||
|
||
EESSI_VERSION=${EESSI_VERSION:-"2023.06"} | ||
|
||
directory="easystacks/software.eessi.io/${EESSI_VERSION}" | ||
# List of example filenames | ||
files=($(find "$directory" -name "*.yml" | grep -e '-eb-')) | ||
[ -n "$DEBUG" ] && echo "${files[@]}" | ||
|
||
versions=() | ||
# Loop over each filename | ||
for filename in "${files[@]}"; do | ||
# Extract the semantic version using grep | ||
version=$(echo "$filename" | grep -oP '(?<=eb-)\d+\.\d+\.\d+?(?=-)') | ||
|
||
# Output the result | ||
[ -n "$DEBUG" ] && echo "Filename: $filename" | ||
[ -n "$DEBUG" ] && echo "Extracted version: $version" | ||
[ -n "$DEBUG" ] && echo | ||
versions+=("$version") | ||
done | ||
highest_version=$(printf "%s\n" "${versions[@]}" | sort -V | tail -n 1) | ||
|
||
[ -n "$DEBUG" ] && echo "Highest version: $highest_version" | ||
[ -n "$DEBUG" ] && echo | ||
[ -n "$DEBUG" ] && echo "Matching files:" | ||
all_latest_easystacks=($(find $directory -type f -name "*eb-$highest_version*.yml")) | ||
|
||
accel_latest_easystacks=() | ||
cpu_latest_easystacks=() | ||
|
||
# Loop through the array and split based on partial matching of string | ||
accel="/accel/" | ||
for item in "${all_latest_easystacks[@]}"; do | ||
if [[ "$item" == *"$accel"* ]]; then | ||
accel_latest_easystacks+=("$item") | ||
else | ||
cpu_latest_easystacks+=("$item") | ||
fi | ||
done | ||
|
||
# Output the results | ||
if [ -n "$ACCEL_EASYSTACKS" ]; then | ||
echo "${accel_latest_easystacks[@]}" | ||
else | ||
echo "${cpu_latest_easystacks[@]}" | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
#!/bin/bash | ||
EESSI_VERSION="2023.06" | ||
export LMOD_PAGER=cat | ||
|
||
# initialize assert framework | ||
if [ ! -d assert.sh ]; then | ||
echo "assert.sh not cloned." | ||
echo "" | ||
echo "run \`git clone https://github.com/lehmannro/assert.sh.git\`" | ||
exit 1 | ||
fi | ||
. assert.sh/assert.sh | ||
|
||
TEST_SHELLS=("bash" "zsh" "fish" "ksh") | ||
SHELLS=$@ | ||
|
||
for shell in ${SHELLS[@]}; do | ||
echo = | awk 'NF += (OFS = $_) + 100' | ||
echo RUNNING TESTS FOR SHELL: $shell | ||
echo = | awk 'NF += (OFS = $_) + 100' | ||
if [[ ! " ${TEST_SHELLS[*]} " =~ [[:space:]]${shell}[[:space:]] ]]; then | ||
### EXCEPTION FOR CSH ### | ||
echo -e "\033[33mWe don't now how to test the shell '$shell', PRs are Welcome.\033[0m" | ||
else | ||
# TEST 1: Source Script and check Module Output | ||
assert "$shell -c 'source init/lmod/$shell' 2>&1 " "EESSI/$EESSI_VERSION loaded successfully" | ||
# TEST 2: Check if module overviews first section is the loaded EESSI module | ||
MODULE_SECTIONS=($($shell -c "source init/lmod/$shell 2>/dev/null; module ov 2>&1 | grep -e '---'")) | ||
PATTERN="/cvmfs/software\.eessi\.io/versions/$EESSI_VERSION/software/linux/x86_64/(intel/haswell|amd/zen3)/modules/all" | ||
assert_raises 'echo "${MODULE_SECTIONS[1]}" | grep -E "$PATTERN"' | ||
# TEST 3: Check if module overviews second section is the EESSI init module | ||
assert "echo ${MODULE_SECTIONS[4]}" "/cvmfs/software.eessi.io/versions/$EESSI_VERSION/init/modules" | ||
# Test 4: Load Python module and check version | ||
command="$shell -c 'source init/lmod/$shell 2>/dev/null; module load Python/3.10.8-GCCcore-12.2.0; python --version'" | ||
expected="Python 3.10.8" | ||
assert "$command" "$expected" | ||
# Test 5: Load Python module and check path | ||
PYTHON_PATH=$($shell -c "source init/lmod/$shell 2>/dev/null; module load Python/3.10.8-GCCcore-12.2.0; which python") | ||
PATTERN="/cvmfs/software\.eessi\.io/versions/$EESSI_VERSION/software/linux/x86_64/(intel/haswell|amd/zen3)/software/Python/3\.10\.8-GCCcore-12\.2\.0/bin/python" | ||
echo "$PYTHON_PATH" | grep -E "$PATTERN" | ||
assert_raises 'echo "$PYTHON_PATH" | grep -E "$PATTERN"' | ||
|
||
#End Test Suite | ||
assert_end "source_eessi_$shell" | ||
fi | ||
done | ||
|
||
|
||
# RESET PAGER | ||
export LMOD_PAGER= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.