diff --git a/.envrc b/.envrc index 2ef49cf..76a2104 100644 --- a/.envrc +++ b/.envrc @@ -1,3 +1,3 @@ module purge export FOO=foo -module load GROMACS +module load TensorFlow diff --git a/.github/workflows/minimal-usage.yml b/.github/workflows/minimal-usage.yml index 065f03b..5546e04 100644 --- a/.github/workflows/minimal-usage.yml +++ b/.github/workflows/minimal-usage.yml @@ -1,4 +1,4 @@ -name: ubuntu +name: ubuntu-minimal_usage on: push: branches: @@ -9,7 +9,7 @@ on: # Declare default permissions as read only. permissions: read-all jobs: - build: + minimal_usage: runs-on: ubuntu-latest steps: - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0 diff --git a/.github/workflows/gromacs-usage.yml b/.github/workflows/tensorflow-usage.yml similarity index 61% rename from .github/workflows/gromacs-usage.yml rename to .github/workflows/tensorflow-usage.yml index 4e55a5d..02029f9 100644 --- a/.github/workflows/gromacs-usage.yml +++ b/.github/workflows/tensorflow-usage.yml @@ -1,29 +1,26 @@ -name: ubuntu_gromacs +name: ubuntu_tensorflow on: push: branches: - main - pull_request: - branches: - - main # Declare default permissions as read only. permissions: read-all jobs: - build: + tensorflow_usage: runs-on: ubuntu-latest steps: - 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 -c "import tensorflow; print(tensorflow.__version__)" shell: bash - - name: Test caching effect EESSI + - name: Test caching effect of EESSI run: | - gmx --version + python -c "import tensorflow; print(tensorflow.__version__)" shell: bash - name: Test module load run: | diff --git a/README.md b/README.md index efd26a8..8016a90 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,7 @@ 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 @@ -21,7 +21,7 @@ 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 @@ -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`). @@ -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 @@ -70,20 +70,20 @@ 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: runs-on: ubuntu-latest steps: - - uses: eessi/github-action-eessi@v2 + - uses: eessi/github-action-eessi@v3 - name: Test EESSI run: | - module load GROMACS - gmx --version + module load TensorFlow + python -c "import tensorflow; 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 diff --git a/action.yml b/action.yml index 633eba1..269c417 100644 --- a/action.yml +++ b/action.yml @@ -7,45 +7,22 @@ inputs: eessi_stack_version: description: 'Version of the EESSI stack to configure' required: false - default: 'latest' - eessi_config_package: - description: 'URL to the EESSI cvmfs config package to install' - required: false - default: 'https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb' - cvmfs_client_profile: - description: 'Choose a suitable proxy automatically if set to single.' - required: false - default: 'single' - cvmfs_quota_limit: - description: 'Soft-limit of the cache in Megabyte. Consult https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners#supported-runners-and-hardware-resources before changing' - required: false - default: '15000' - cvmfs_use_cdn: - description: 'Change the stratum 1 endpoints to caching servers from Cloudflare.' - required: false - default: 'yes' - + default: '2023.06' runs: using: "composite" steps: - uses: cvmfs-contrib/github-action-cvmfs@d4641d0d591c9a5c3be23835ced2fb648b44c04b # v3.1 with: - cvmfs_config_package: ${{ inputs.eessi_config_package }} + cvmfs_config_package: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb cvmfs_http_proxy: DIRECT - cvmfs_client_profile: ${{ inputs.cvmfs_client_profile }} - cvmfs_quota_limit: ${{ inputs.cvmfs_quota_limit }} - cvmfs_use_cdn: ${{ inputs.cvmfs_use_cdn }} + cvmfs_repositories: software.eessi.io - 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 - sudo apt install -y direnv echo 'unset BASH_ENV' >> $HOME/env_config.export + echo "source /cvmfs/software.eessi.io/versions/$EESSI_STACK_VERSION/init/bash" >> $HOME/env_config.export + sudo apt install -y direnv echo 'eval "$(direnv export bash)"' >> $HOME/env_config.export mkdir -p $HOME/direnv/ echo "[whitelist]" >> $HOME/direnv/direnv.toml