Skip to content

Commit a9feb62

Browse files
authored
Allow using Lmod initialisation for EESSI
1 parent ca3a16a commit a9feb62

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

action.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ inputs:
1212
description: 'Comma-separated list of fully qualified repository names that shall be mountable under /cvmfs.'
1313
required: false
1414
default: 'software.eessi.io,dev.eessi.io'
15+
use_eessi_module:
16+
description: 'Use the EESSI module to initialise EESSI (rather than sourcing a bash script), any non-empty value is true'
17+
required: false
18+
default: ''
1519

1620
runs:
1721
using: "composite"
@@ -26,7 +30,11 @@ runs:
2630
run: |
2731
if [ "$RUNNER_OS" == "Linux" ]; then
2832
echo 'unset BASH_ENV' >> $HOME/env_config.export
29-
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
33+
if [[ -n "${{ inputs.use_eessi_module }}" ]]; then
34+
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/lmod/bash" >> $HOME/env_config.export
35+
else
36+
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
37+
fi
3038
# allow oversubscription for OpenMPI
3139
echo "export OMPI_MCA_rmaps_base_oversubscribe=1" >> $HOME/env_config.export
3240
sudo apt install -y direnv
@@ -51,3 +59,4 @@ runs:
5159
shell: bash
5260
env:
5361
EESSI_STACK_VERSION: ${{ inputs.eessi_stack_version }}
62+

0 commit comments

Comments
 (0)