Skip to content

Commit

Permalink
Merge pull request #288 from dkj/devel
Browse files Browse the repository at this point in the history
GHA: move irods client deployment and singularity cache to HOME
  • Loading branch information
kjsanger authored Sep 20, 2023
2 parents a73efc1 + 228362c commit dd6678b
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ jobs:
--health-retries 6
steps:
- name: "Set environmental variables based on other environmental variables"
run: |
echo "SINGULARITY_CACHEDIR=$HOME/.singularity-cache" >> $GITHUB_ENV
# '~' in SINGULARITY_CACHEDIR value (from say a env: section in this YAML) is not expanded by
# singularity so that paths used are misleading/unclear
- uses: actions/checkout@v3

- name: "Install OS dependencies"
Expand All @@ -79,24 +86,22 @@ jobs:
- name: "Cache Singularity images"
uses: actions/cache@v3
with:
path: ${{ github.workspace }}/.singularity-cache
path: ${{ env.SINGULARITY_CACHEDIR }}
key: ${{ runner.os }}-singularity

- name: "Install iRODS client wrappers"
env:
DOCKER_IMAGE: ${{ matrix.client_image }}
PREFIX: ${{ github.workspace }}
SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity-cache
run: |
# Use -s option for the wrappers to enable re-usable service instances
singularity exec docker://$DOCKER_IMAGE singularity-wrapper -s -p $PREFIX install
echo "$PREFIX/bin" >> $GITHUB_PATH
# Install is to HOME rather than workspace to avoid clashes with repo e.g. in bin/
singularity exec docker://$DOCKER_IMAGE singularity-wrapper -s -p $HOME/.local install
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: "Configure iRODS clients"
env:
DOCKER_IMAGE: ${{ matrix.client_image }}
PREFIX: ${{ github.workspace }}
SINGULARITY_CACHEDIR: ${{ github.workspace }}/.singularity-cache
run: |
mkdir -p "$HOME/.irods"
cat <<'EOF' > "$HOME/.irods/irods_environment.json"
Expand Down

0 comments on commit dd6678b

Please sign in to comment.