Skip to content

Commit 0d6e5f6

Browse files
committed
Add capability to only mount EESSI
1 parent 2637738 commit 0d6e5f6

2 files changed

Lines changed: 28 additions & 7 deletions

File tree

.github/workflows/minimal-usage.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,18 @@ jobs:
3333
ls /cvmfs/software.eessi.io
3434
ls /cvmfs/dev.eessi.io
3535
shell: bash
36+
37+
test_mount_only:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
41+
- uses: ./
42+
- name: Test EESSI not initialised
43+
run: |
44+
if [[ -v EESSI_VERSION ]]; then
45+
echo "EESSI_VERSION should not be set as this indicates EESSI is initialised"
46+
exit 1
47+
fi
48+
# Make sure CVMFS is mounted, and EESSI available
49+
ls /cvmfs/software.eessi.io
50+
shell: bash

action.yml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ inputs:
1616
description: 'Use the EESSI module to initialise EESSI (rather than sourcing a bash script), valid values are true or false'
1717
required: false
1818
default: 'true'
19+
mount_cvmfs_only:
20+
description: 'Only mount CVMFS, do not initialise EESSI'
21+
required: false
22+
default: 'false'
1923
init_direnv:
2024
description: 'Enable direnv initialisation for the repository, valid values are true or false'
2125
required: false
@@ -34,13 +38,15 @@ runs:
3438
run: |
3539
if [ "$RUNNER_OS" == "Linux" ]; then
3640
echo 'unset BASH_ENV' >> $HOME/env_config.export
37-
if [[ "${{ inputs.use_eessi_module }}" == "true" ]]; then
38-
# Make the EESSI module sticky so that it persists in case `module purge` is used
39-
# (while still allowing for a swap if needed)
40-
echo "export EESSI_MODULE_STICKY=1" >> $HOME/env_config.export
41-
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/lmod/bash" >> $HOME/env_config.export
42-
else
43-
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
41+
if [[ "${{ inputs.mount_cvmfs_only }}" == "false" ]]; then
42+
if [[ "${{ inputs.use_eessi_module }}" == "true" ]]; then
43+
# Make the EESSI module sticky so that it persists in case `module purge` is used
44+
# (while still allowing for a swap if needed)
45+
echo "export EESSI_MODULE_STICKY=1" >> $HOME/env_config.export
46+
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/lmod/bash" >> $HOME/env_config.export
47+
else
48+
echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
49+
fi
4450
fi
4551
# allow oversubscription for OpenMPI
4652
echo "export OMPI_MCA_rmaps_base_oversubscribe=1" >> $HOME/env_config.export

0 commit comments

Comments
 (0)