Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/tests_eessi_module.yml
Original file line number Diff line number Diff line change
Expand Up @@ -315,3 +315,34 @@ jobs:
module load "EESSI/${{matrix.EESSI_VERSION}}"
GREP_PATTERN="Lmod is automatically replacing \"EESSI/${{matrix.EESSI_VERSION}}\" with \"${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}\"."
module load "${LOCAL_STACK_NAME}/${LOCAL_STACK_VERSION}" |& grep "${GREP_PATTERN}"

check_PS1_update_eessi_module:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
EESSI_VERSION:
- '2023.06'
- '2025.06'

steps:
- name: Check out software-layer repository
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: Mount EESSI CernVM-FS repository
uses: cvmfs-contrib/github-action-cvmfs@55899ca74cf78ab874bdf47f5a804e47c198743c # v4.0
with:
cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
cvmfs_http_proxy: DIRECT
cvmfs_repositories: software.eessi.io

- name: Make sure we can use the EESSI_UPDATE_PS1 to update PS1 in the EESSI module
run: |
# Initialise Lmod
. /cvmfs/software.eessi.io/versions/${{matrix.EESSI_VERSION}}/compat/linux/$(uname -m)/usr/share/Lmod/init/bash

# Set the relevant environment variable, load the EESSI module, and grep for what we expect in PS1
export EESSI_UPDATE_PS1=1
module load "EESSI/${{matrix.EESSI_VERSION}}"
GREP_PATTERN="{EESSI/${{matrix.EESSI_VERSION}} "
grep -F -- "${PS1}" "${GREP_PATTERN}"
9 changes: 9 additions & 0 deletions init/modules/EESSI/2023.06.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ if family_name then
family(family_name)
end

-- change the PS1 if it exists to indicate you have EESSI loaded
Comment thread
ocaisa marked this conversation as resolved.
Outdated
-- (doesn't help with a csh or fish prompt, but we just live with that)
if os.getenv("EESSI_UPDATE_PS1") then
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I protected this so as not to change the current behaviour

prompt = os.getenv("PS1")
if prompt then
pushenv("PS1", "{EESSI/" .. eessi_version .. "} " .. prompt)
end
end

-- allow sites to make the EESSI module sticky by defining EESSI_MODULE_STICKY (to any value)
load_message = "Module for EESSI/" .. eessi_version .. " loaded successfully"
if os.getenv("EESSI_MODULE_STICKY") then
Expand Down
Loading