Skip to content

Commit 2edf309

Browse files
committed
steal CI improvements from PR 51
1 parent 7546e90 commit 2edf309

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

.github/workflows/tests_scripts.yml

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,14 @@ jobs:
4545
4646
- name: test load_easybuild_module.sh script
4747
run: |
48+
export SINGULARITY_CACHEDIR=$PWD
4849
# bind current directory into container as /software-layer-scripts
4950
export SINGULARITY_BIND="${PWD}:/software-layer-scripts"
5051
5152
# can't test with EasyBuild versions older than v4.5.2 when using EESSI 2023.06,
5253
# since Python in compat layer is Python 3.11.x;
5354
# testing with a single EasyBuild version takes a while in GitHub Actions, so stick to a single sensible version
54-
for EB_VERSION in '4.6.0'; do
55+
for EB_VERSION in '5.1.0'; do
5556
# Create script that uses load_easybuild_module.sh which we can run in compat layer environment
5657
# note: Be careful with single vs double quotes below!
5758
# ${EB_VERSION} should be expanded, so use double quotes;
@@ -91,6 +92,7 @@ jobs:
9192
9293
- name: test install_software_layer.sh script
9394
run: |
95+
export SINGULARITY_CACHEDIR=$PWD
9496
# bind current directory into container as /software-layer-scripts
9597
export SINGULARITY_BIND="${PWD}:/software-layer-scripts"
9698
# force using x86_64/generic, to avoid triggering an installation from scratch
@@ -105,6 +107,7 @@ jobs:
105107
106108
- name: test create_directory_tarballs.sh script
107109
run: |
110+
export SINGULARITY_CACHEDIR=$PWD
108111
# bind current directory into container as /software-layer-scripts
109112
export SINGULARITY_BIND="${PWD}:/software-layer-scripts"
110113
@@ -113,12 +116,13 @@ jobs:
113116
114117
# scripts need to be copied to /tmp,
115118
# since create_directory_tarballs.sh must be accessible from within build container
116-
./eessi_container.sh --mode run --verbose /software-layer-scripts/create_directory_tarballs.sh 2023.06
119+
./eessi_container.sh --mode run --verbose /software-layer-scripts/create_directory_tarballs.sh "${{matrix.EESSI_VERSION}}"
117120
# check if tarballs have been produced
118121
ls -l *.tar.gz
119122
120123
- name: test create_lmodsitepackage.py script
121124
run: |
125+
export SINGULARITY_CACHEDIR=$PWD
122126
# bind current directory into container as /software-layer-scripts
123127
export SINGULARITY_BIND="${PWD}:/software-layer-scripts"
124128
@@ -140,3 +144,22 @@ jobs:
140144
for pattern in "^Site Pkg location.*/software-layer-scripts/.lmod/SitePackage.lua" "LMOD_SITEPACKAGE_LOCATION.*/software-layer-scripts/.lmod/SitePackage.lua"; do
141145
grep "${pattern}" ${out} || (echo "Pattern '${pattern}' not found in output!" && exit 1)
142146
done
147+
148+
- name: Mount EESSI CernVM-FS repository
149+
uses: eessi/github-action-eessi@v3
150+
with:
151+
eessi_stack_version: ${{matrix.EESSI_VERSION}}
152+
use_eessi_module: true
153+
154+
- name: Verify that mounted repositories are passed through directly
155+
run: |
156+
export SINGULARITY_CACHEDIR=$PWD
157+
# run wrapper script + capture & check output
158+
export SINGULARITY_BIND="${PWD}:/software-layer-scripts"
159+
# make sure that correct EESSI version is used (required because default is a placeholder version)
160+
export EESSI_VERSION_OVERRIDE="${{matrix.EESSI_VERSION}}"
161+
162+
out="${PWD}/eb-${EB_VERSION}.out"
163+
./eessi_container.sh --access rw --mode run --verbose /software-layer-scripts/run_in_compat_layer_env.sh ls 2>&1 | tee ${out}
164+
echo $(grep "SINGULARITY_BIND" ${out})
165+
grep "SINGULARITY_BIND" ${out} | grep "software.eessi.io" || (echo "software.eessi.io did not seem to be bind mounted!" && exit 1)

0 commit comments

Comments
 (0)