Skip to content

Commit ddec28d

Browse files
authored
Merge branch 'main' into libxc_a64fx_6cores
2 parents ca8c038 + 7c1bd0b commit ddec28d

29 files changed

Lines changed: 533 additions & 136 deletions

.github/workflows/bot_build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Bot build script
2+
3+
on:
4+
pull_request:
5+
branches: [ "main" ]
6+
7+
jobs:
8+
check_symlinks:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Git clone software-layer and software-layer-scripts inside it
13+
run: |
14+
git clone https://github.com/EESSI/software-layer.git
15+
cd software-layer
16+
git clone https://github.com/EESSI/software-layer-scripts.git
17+
18+
- name: Run symlink commands
19+
run: |
20+
set -e
21+
cd software-layer
22+
23+
for file in $(ls software-layer-scripts | egrep -v 'easystacks|LICENSE|README.md|^bot'); do
24+
ln -s software-layer-scripts/${file}
25+
done
26+
27+
for file in $(ls software-layer-scripts/bot | grep -v '^build.sh'); do
28+
ln -s ../software-layer-scripts/bot/${file} bot/${file}
29+
done

.github/workflows/scripts/test_init_scripts.sh

Lines changed: 37 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,17 @@ for shell in ${SHELLS[@]}; do
4949
assert_raises "$shell -c '. init/lmod/$shell' 2>&1 | grep -E \"${expected_pattern}\""
5050
fi
5151

52-
# TEST 2: Check if module overviews first section is the loaded EESSI module
52+
# TEST 2: Source Script again in an subshell and check Module Output
53+
expected_pattern=".*EESSI has selected $EESSI_SOFTWARE_SUBDIR_OVERRIDE as the compatible CPU target for EESSI/$EESSI_VERSION.*"
54+
if [ "$shell" = "csh" ]; then
55+
# Cannot figure out how to chain shells with silenced output to test this in csh but it does work
56+
# assert_raises "$shell -c 'setenv LMOD_QUIET 1 ; source init/lmod/$shell ; ($shell -c \"unsetenv LMOD_QUIET ; source init/lmod/$shell\")' 2>&1 | grep -E \"${expected_pattern}\""
57+
echo "Skipping chained shell check for csh as can't figure out how to silence output in first call"
58+
else
59+
assert_raises "$shell -c '. init/lmod/$shell > /dev/null 2>&1; $shell -c \". init/lmod/$shell\"' 2>&1 | grep -E \"${expected_pattern}\""
60+
fi
61+
62+
# TEST 3: Check if module overviews first section is the loaded EESSI module
5363
if [ "$shell" = "csh" ]; then
5464
# module is defined as alias, but aliases are only retained in interactive
5565
# shells we work around this by creating a .cshrc file (which sources the
@@ -63,10 +73,10 @@ for shell in ${SHELLS[@]}; do
6373
assert_raises 'echo "${MODULE_SECTIONS[1]}" | grep -E "$PATTERN"'
6474
# echo "${MODULE_SECTIONS[1]}" "$PATTERN"
6575

66-
# TEST 3: Check if module overviews second section is the EESSI init module
76+
# TEST 4: Check if module overviews second section is the EESSI init module
6777
assert "echo ${MODULE_SECTIONS[4]}" "/cvmfs/software.eessi.io/init/modules"
6878

69-
# TEST 4: Load EasyBuild module and check version
79+
# TEST 5: Load EasyBuild module and check version
7080
# eb --version outputs: "This is EasyBuild 5.1.1 (framework: 5.1.1, easyblocks: 5.1.1) on host ..."
7181
if [ "$shell" = "csh" ]; then
7282
echo "source init/lmod/$shell" > ~/.cshrc
@@ -76,7 +86,7 @@ for shell in ${SHELLS[@]}; do
7686
fi
7787
assert "$command" "$EXPECTED_EASYBUILD_VERSION"
7888

79-
# TEST 5: Load EasyBuild module and check path
89+
# TEST 6: Load EasyBuild module and check path
8090
if [ "$shell" = "csh" ]; then
8191
echo "source init/lmod/$shell" > ~/.cshrc
8292
EASYBUILD_PATH=$($shell -c "module load EasyBuild/${EXPECTED_EASYBUILD_VERSION}; which eb")
@@ -89,7 +99,7 @@ for shell in ${SHELLS[@]}; do
8999
assert_raises 'echo "$EASYBUILD_PATH" | grep -E "$PATTERN"'
90100
# echo "$EASYBUILD_PATH" "$PATTERN"
91101

92-
# TEST 6 and 7: Check the various options (EESSI_DEFAULT_MODULES_APPEND, EESSI_DEFAULT_MODULES_APPEND, EESSI_EXTRA_MODULEPATH) all work
102+
# TEST 7 and 8: Check the various options (EESSI_DEFAULT_MODULES_APPEND, EESSI_DEFAULT_MODULES_APPEND, EESSI_EXTRA_MODULEPATH) all work
93103
if [ "$shell" = "csh" ]; then
94104
echo "setenv EESSI_DEFAULT_MODULES_APPEND append_module" > ~/.cshrc
95105
echo "setenv EESSI_DEFAULT_MODULES_PREPEND prepend_module" >> ~/.cshrc
@@ -115,7 +125,7 @@ for shell in ${SHELLS[@]}; do
115125
# echo "$TEST_MODULEPATH" AND "$MODULEPATH_PATTERN"
116126
assert_raises 'echo "$TEST_MODULEPATH" | grep -E "$MODULEPATH_PATTERN"'
117127

118-
# TEST 8 and 9: Add a conditional test depending on whether we have the Lmod command is available locally or not (Ubuntu-based location for CI)
128+
# TEST 9 and 10: Add a conditional test depending on whether we have the Lmod command is available locally or not (Ubuntu-based location for CI)
119129
if [ -d "$LMOD_PKG/init" ]; then
120130
echo "Running check for locally available Lmod with purge"
121131
if [ "$shell" = "csh" ]; then
@@ -142,14 +152,32 @@ for shell in ${SHELLS[@]}; do
142152
assert_raises 'echo "$TEST_EESSI_WITHOUT_PURGE" | grep "$pattern"' 1
143153
fi
144154

145-
# Optional test 10, check if the prompt has been updated
155+
# Optional test 11, check if the prompt has been updated
146156
if [ "$shell" = "bash" ] || [ "$shell" = "ksh" ] || [ "$shell" = "zsh" ] || [ "$shell" = "sh" ]; then
157+
# Let's configure things to use the EESSI module within the PR
158+
sed 's|export MODULEPATH=.*|export MODULEPATH=init/modules|' init/lmod/sh >init/lmod/sh.test
159+
ln -srf init/lmod/sh.test init/lmod/bash.test
160+
ln -srf init/lmod/sh.test init/lmod/ksh.test
161+
ln -srf init/lmod/sh.test init/lmod/zsh.test
147162
# Typically this is a non-interactive shell, so manually unset PS1 and reset to a non-exported variable when testing
148-
TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1='$ ' ; . init/lmod/$shell 2>/dev/null ; echo \"\$PS1\"")
149-
TEST_EESSI_NO_PS1_UPDATE=$($shell -c "unset PS1 ; . init/lmod/$shell 2>/dev/null ; echo \"\$PS1\"")
163+
TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1='$ ' ; . init/lmod/$shell.test 2>/dev/null ; echo \"\$PS1\"")
164+
TEST_EESSI_NO_PS1_UPDATE=$($shell -c "unset PS1 ; . init/lmod/$shell.test 2>/dev/null ; echo \"\$PS1\"")
150165
pattern="{EESSI/${EESSI_VERSION}} "
151166
assert_raises 'echo "$TEST_EESSI_PS1_UPDATE" | grep "$pattern"'
152167
assert_raises 'echo "$TEST_EESSI_NO_PS1_UPDATE" | grep "$pattern"' 1
168+
# Also check when we explicitly ask for it not to be updated
169+
TEST_EESSI_EXPLICIT_NO_PS1_UPDATE=$($shell -c "unset PS1 ; PS1='test> ' ; export EESSI_MODULE_UPDATE_PS1=0 ; . init/lmod/$shell.test 2>/dev/null ; echo \"\$PS1\"")
170+
TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE=$($shell -c "unset PS1 ; PS1='$ ' ; export EESSI_MODULE_UPDATE_PS1=0 ; . init/lmod/$shell.test 2>/dev/null ; . init/lmod/$shell.test 2>/dev/null ; echo \"\$PS1\"")
171+
assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE" | grep "$pattern"' 1
172+
assert_raises 'echo "$TEST_EESSI_EXPLICIT_NO_PS1_UPDATE_CALLED_TWICE" | grep "$pattern"' 1
173+
# Also check complex prompts, and unloading/purging the EESSI module
174+
prompt="\$(echo '\['✘) $ "
175+
promptstr="\[✘ $ "
176+
updated_promptstr="{EESSI/${EESSI_VERSION}} \[✘ $ "
177+
TEST_EESSI_PS1_UPDATE=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell.test >/dev/null ; echo \"\$PS1\"")
178+
TEST_EESSI_PS1_REVERT=$($shell -c "unset PS1 ; PS1=\"$prompt\" ; . init/lmod/$shell.test >/dev/null ; module purge; echo \"\$PS1\"")
179+
assert 'echo "$TEST_EESSI_PS1_UPDATE"' "$updated_promptstr"
180+
assert 'echo "$TEST_EESSI_PS1_REVERT"' "$promptstr"
153181
fi
154182

155183
# End Test Suite

.github/workflows/tests_archdetect.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
- aarch64/neoverse_v1/AWS-awslinux-graviton3
2626
- aarch64/nvidia/grace/Jureca-Rocky95
2727
- aarch64/google/axion/GCP-axion
28+
- riscv64/sifive/premier-Ubuntu24
29+
- riscv64/spacemit/bananaf3-Armbian
30+
- riscv64/spacemit/bananaf3-k6.6
2831
# commented out since these targets are currently not supported in software.eessi.io repo
2932
# (and some tests assume that the corresponding subdirectory in software layer is there)
3033
# - ppc64le/power9le/unknown-power9le

.github/workflows/tests_archdetect_nvidia_gpu.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
- cc01 # non-existing GPU
2020
EESSI_VERSION:
2121
- '2023.06'
22-
#- '2025.06'
22+
- '2025.06'
2323
fail-fast: false
2424
steps:
2525
- name: checkout

0 commit comments

Comments
 (0)