File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change 1+ name : double
2+ on : [push, pull_request]
3+ jobs :
4+ singularity :
5+ runs-on : ubuntu-latest
6+ steps :
7+ - uses : actions/checkout@v2
8+ - uses : cvmfs-contrib/github-action-cvmfs@v2
9+ with :
10+ cvmfs_repositories : ' singularity.opensciencegrid.org'
11+ - uses : eic/run-cvmfs-osg-eic-shell@main
12+ with :
13+ run_local_checkout : ' true'
14+ platform-release : " jug_xl:nightly"
15+ run : |
16+ gcc --version
17+ which gcc
18+ eic-info
19+ - uses : eic/run-cvmfs-osg-eic-shell@main
20+ with :
21+ run_local_checkout : ' true'
22+ platform-release : " jug_xl:nightly"
23+ run : |
24+ gcc --version
25+ which gcc
26+ eic-info
Original file line number Diff line number Diff line change @@ -43,11 +43,16 @@ echo "Install Singularity"
4343conda install --quiet --yes -c conda-forge singularity > /dev/null 2>&1
4444eval " $( conda shell.bash hook) "
4545
46- echo " Starting Singularity image from ${SANDBOX_PATH} "
47- singularity instance start --bind /cvmfs --bind ${GITHUB_WORKSPACE} :${GITHUB_WORKSPACE} ${SANDBOX_PATH} view_worker
46+ worker=$( echo ${SANDBOX_PATH} | sha256sum | awk ' {print$1}' )
47+ if singularity instance list | grep ${worker} ; then
48+ echo " Reusing exisitng Singularity image from ${SANDBOX_PATH} "
49+ else
50+ echo " Starting Singularity image from ${SANDBOX_PATH} "
51+ singularity instance start --bind /cvmfs --bind ${GITHUB_WORKSPACE} :${GITHUB_WORKSPACE} ${SANDBOX_PATH} ${worker}
52+ fi
4853
4954echo " ####################################################################"
5055echo " ###################### Executing user payload ######################"
5156echo " VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV"
5257
53- singularity exec instance://view_worker /bin/bash -c " cd ${GITHUB_WORKSPACE} ; ./action_payload.sh"
58+ singularity exec instance://${worker} /bin/bash -c " cd ${GITHUB_WORKSPACE} ; ./action_payload.sh"
You can’t perform that action at this time.
0 commit comments