Skip to content

Commit

Permalink
Update action for software.eessi.io
Browse files Browse the repository at this point in the history
  • Loading branch information
ocaisa committed Dec 1, 2023
1 parent 58b50fd commit d9afb54
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .envrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module purge
export FOO=foo
module load GROMACS
module load TensorFlow
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: ubuntu_gromacs
name: ubuntu_tensorflow
on:
push:
branches:
Expand All @@ -15,15 +15,15 @@ jobs:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
- uses: eessi/github-action-eessi@main
with:
eessi_stack_version: '2021.06'
eessi_stack_version: '2023.06'
- name: Test EESSI
run: |
# GROMACS module is loaded via .envrc
gmx --version
# TensorFlow module is loaded via .envrc
python -m tensorflow -c "print(tensorflow.VERSION)"
shell: bash
- name: Test caching effect EESSI
- name: Test caching effect of EESSI
run: |
gmx --version
python -m tensorflow -c "print(tensorflow.VERSION)"
shell: bash
- name: Test module load
run: |
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ module load CMake/3.20.1-GCCcore-10.3.0 # Load a dependency of my project (CMak
Another example of a `.envrc` file can be found in the [.envrc](https://github.com/EESSI/github-action-eessi/blob/main/.envrc) included with this repository.

## Instructions
You can use this GitHub Action in a workflow in your own repository with `uses: eessi/github-action-eessi@v2`.
You can use this GitHub Action in a workflow in your own repository with `uses: eessi/github-action-eessi@v3`.

A minimal job example for GitHub-hosted runners of type `ubuntu-latest`:
```yaml
jobs:
ubuntu-minimal:
runs-on: ubuntu-latest
steps:
- uses: eessi/github-action-eessi@v2
- uses: eessi/github-action-eessi@v3
- name: Test EESSI
run: |
module avail
Expand All @@ -44,7 +44,7 @@ jobs:

## Optional Parameters
The following parameters are supported:
- `eessi_stack_version`: version of the EESSI stack to use (defaults to `latest`)
- `eessi_stack_version`: version of the EESSI stack to use (defaults to `2023.06`)
- `eessi_config_package`: location of the EESSI CernVM-FS configuration package (defaults to `https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb`).
<!--For macOS this parameter is required (e.g., `https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.pkg`) -->

Expand All @@ -58,7 +58,7 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: eessi/github-action-eessi@v2
- uses: eessi/github-action-eessi@v3
- name: Test EESSI
run: |
module avail
Expand All @@ -70,7 +70,7 @@ jobs:
This GitHub Action installs the [EESSI](https://eessi.github.io/docs/) software stack, making it available to subsequent `bash` commands. This means one can create
workflows such as:
```yaml
name: GROMACS usage
name: TensorFlow usage
on: [push, pull_request]
jobs:
build:
Expand All @@ -79,11 +79,11 @@ jobs:
- uses: eessi/github-action-eessi@v2
- name: Test EESSI
run: |
module load GROMACS
gmx --version
module load TensorFlow
python -m tensorflow -c "print(tensorflow.VERSION)"
shell: bash
```
where the `gmx` command was only available to run after the loading the necessary environment module `GROMACS`. Note that I have not given the version of `GROMACS` which means the latest available version will be loaded.
where the `tensorflow` python module was only available to run after the loading the necessary environment module `TensorFlow`. Note that I have not given the version of `TensorFlow` which means the latest available version will be loaded.

## Limitations

Expand Down
8 changes: 2 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ inputs:
eessi_stack_version:
description: 'Version of the EESSI stack to configure'
required: false
default: 'latest'
default: '2023.06'
eessi_config_package:
description: 'URL to the EESSI cvmfs config package to install'
required: false
Expand Down Expand Up @@ -39,11 +39,7 @@ runs:
- id: install-eessi
run: |
echo "EESSI_SILENT=1" >> $GITHUB_ENV
if [ "${{ inputs.eessi_stack_version }}" == "latest" ]; then
echo "source /cvmfs/pilot.eessi-hpc.org/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
else
echo "source /cvmfs/pilot.eessi-hpc.org/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
fi
echo "source /cvmfs/sotware.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export
sudo apt install -y direnv
echo 'unset BASH_ENV' >> $HOME/env_config.export
echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export
Expand Down

0 comments on commit d9afb54

Please sign in to comment.