{"id":24725660,"url":"https://github.com/plumed/install-plumed","last_synced_at":"2026-05-01T00:31:26.233Z","repository":{"id":265095414,"uuid":"848655820","full_name":"plumed/install-plumed","owner":"plumed","description":"An action to install plumed in your workflow","archived":false,"fork":false,"pushed_at":"2025-01-13T14:49:17.000Z","size":47,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-22T02:45:01.662Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/plumed.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-08-28T06:51:36.000Z","updated_at":"2025-01-13T14:49:21.000Z","dependencies_parsed_at":"2025-01-27T13:58:19.210Z","dependency_job_id":null,"html_url":"https://github.com/plumed/install-plumed","commit_stats":null,"previous_names":["iximiel/install-plumed","plumed/install-plumed"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/plumed/install-plumed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumed%2Finstall-plumed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumed%2Finstall-plumed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumed%2Finstall-plumed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumed%2Finstall-plumed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/plumed","download_url":"https://codeload.github.com/plumed/install-plumed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/plumed%2Finstall-plumed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32481553,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-01-27T13:44:35.575Z","updated_at":"2026-05-01T00:31:26.206Z","avatar_url":"https://github.com/plumed.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\nGitHub Install Plumed Action\n\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\nAn action to install plumed in your workflow.\n\n[![license](https://img.shields.io/github/license/Iximiel/install-plumed.svg)](https://github.com/Iximiel/install-plumed/blob/main/LICENSE)\n[![release](https://img.shields.io/github/release/Iximiel/install-plumed.svg)](https://github.com/Iximiel/install-plumed/releases/latest)\n[![GitHub release date](https://img.shields.io/github/release-date/Iximiel/install-plumed.svg)](https://github.com/Iximiel/install-plumed/releases)\n![Test](https://github.com/Iximiel/install-plumed/actions/workflows/test.yaml/badge.svg?branch=main\u0026event=push)\n\u003c/div\u003e\n\n*Iximiel/install-plumed* installs plumed in your workflow in a standardize fashion.\n\nThis action synergise with using [ccache](https://ccache.dev/) and [actions/cache](https://github.com/actions/cache).\n\nAn example of calling this action in your workflow is:\n\n```yaml\n- name: Install plumed\n  uses: Iximiel/install-plumed@v1\n  id: plumed\n  with:\n    modules: 'reset'\n    dependency_path: '${{ github.workspace }}/_data'\n    CC: 'ccache mpicc'\n    CXX: 'ccache mpic++'\n```\nHere plumed will be installed as if it is configured with:\n```bash\n CC=\"ccache mpicc\" CXX=\"ccache mpic++\" ./configure --enable-boost_serialization --enable-fftw --enable-libtorch --disable-basic-warnings --prefix=/home/runner/opt --enable-modules=reset 'LDFLAGS=-Wl,-rpath,\"/home/runner/opt/lib:/home/runner/opt/libtorch/lib:\"'\n```\nAnd it is creating a json file in `${{ github.workspace }}/_data` that hosts a list of plumed internal module dependencies.\n\nThis action provides ONLY the installation of plumed. If you need a certain functionality that need certain libraries installed you will need to add an extra step in the workflow to install those libraries.\n\n## Output\n\nThis action outputs two parameters:\n - **plumed_prefix** the path where plumed has installed into\n - **dependency_file** the full path of the dependency file created if `dependency_path` is specified (see [below](#dependency_path)).\n \n In the previous example you can access to them within the job with: `${{ steps.plumed.outputs.plumed_prefix }}` and  `${{ steps.plumed.outputs.dependency_file }}`\n## Options\n\nYou are not required to use any option, with everithing set to default plumed will be configured with:\n\n```bash\nCC=\"gcc\" CXX=\"g++\" ./configure --enable-boost_serialization --enable-fftw --enable-libtorch --disable-basic-warnings --prefix=~/opt --enable-modules=all LDFLAGS=-Wl,-rpath,${LD_LIBRARY_PATH}\n```\n\nPlumed will be cloned from `https://github.com/plumed/plumed2.git` and the script will automatically install the latest stable version.\n\nAnd by default the intenral module dependencies will not be compiled.\n\n- Options\n  - [repository](#repository)\n  - [version](#version)\n  - [suffix](#suffix)\n  - [prefix](#prefix)\n  - [extra_options](#extra_options)\n  - [modules](#modules)\n  - [CC](#CC)\n  - [CXX](#CXX)\n  - [dependency_path](#dependency_path)\n    \n\n#### repository\n*default*: `'https://github.com/plumed/plumed2.git'`\n\nBy specifying the `repository` option you will install plumed from another repository\n```yaml\n- name: Install plumed\n  uses: Iximiel/install-plumed@v1\n  with:\n    repository: 'https://github.com/Iximiel/plumed2.git'\n```\nWill clone plumed from `https://github.com/Iximiel/plumed2.git`\n    \n#### version\n*default*: `''`\n\nThis option will specify which plumed branch or tag the installation procedure will check out into. If not specified the latest stable version will be installed.\n    \n```yaml\n- name: Install plumed\n  uses: Iximiel/install-plumed@v1\n  with:\n    version: 'master'\n```\nwill checkout the master branch\n\n#### suffix\n*default*: `''`\n\nThis options will change the `--suffix=\"\"` option in the configuration phase. Useful if you want to share the same installation folder with multiple plumed versions.\n```yaml\n- name: Install plumed master\n  uses: Iximiel/install-plumed@v1\n  with:\n    version: 'master'\n    suffix: '_master'\n- name: Install plumed stable\n  uses: Iximiel/install-plumed@v1\n```\n\n#### prefix\n  *default*: `'~/opt'`\n\nThis option will set up the installation prefixThe installation prefix\n    \n#### extra_options\n*default*: `'--enable-boost_serialization --enable-fftw --enable-libtorch --disable-basic-warnings'`\n\nExtra options for installing plumed.\nThe options will override the default ones, so if you want to add a extra option you will need to specify the whole string \n```yaml\n- name: Install plumed master\n  uses: Iximiel/install-plumed@v1\n  with:\n    version: 'master'\n    extra_options: '--enable-boost_serialization --enable-fftw --enable-libtorch --disable-basic-warnings --disable-mpi --disable-openmp'\n```\n\nFora a complete installation with no parallelism.\n\n#### modules\n*default*: `'all'`\n\nA `:` separated list of modules to install, or , will change the `--enable-modules=\"\"` in the configure phase.\nOr alternatively you can use the special keyworks `all`, `none` and `reset`.\n    \n```yaml\n- name: Install plumed master\n  uses: Iximiel/install-plumed@v1\n  with:\n    version: 'master'\n    modules: 'reset'\n```\nSince the action is set up to default install everithing, using `reset` will make possible  installing only the default modules\n\n#### CC\n*default*: `'gcc'`\n\nSpecifies the C compiler or the command to use as a C compiler, see [below](#cxx)\n\n```bash\nCC=compiler_chosen CXX=compiler_chosen++ ./configure **options**\n```\n#### CXX\n*default*: `'g++'`\n\nSpecifies the c++ compiler or the command to use as a C++ compiler\n\n```bash\nCC=compiler_chosen CXX=compiler_chosen++ ./configure **options**\n```\n\n```yaml\n- name: Install plumed\n  uses: Iximiel/install-plumed@v1\n  id: plumed\n  with:\n    modules: 'reset'\n    CC: 'ccache mpicc'\n    CXX: 'ccache mpic++'\n```\nHere plumed will be be installed using mpi and by prepending ccache you will use ccache to store some compilation artifact and speed up [new workflows](#caching-stratiegies)\n\n#### dependency_path\n*default*: `''`\n\nIf specified a file `extradeps$version.json` will be create in the specified path with the internal module dependencies.\n\nIf the variable is present, the step will also produce an output with the full path of that file.\n\n```yaml\n- name: Install plumed\n  uses: Iximiel/install-plumed@v1\n  id: plumed\n  with:\n    modules: 'reset'\n    dependency_path: '${{ github.workspace }}/_data'\n    \n```\nIn this case the module will be in your GH workspace\n\n## Caching stratiegies\nThere are two caching strategies avaiable with this action\n\n- **[ccache](https://ccache.dev/) and [actions/cache](https://github.com/actions/cache)** by storing the `~/.ccache` directory\n- **[actions/cache](https://github.com/actions/cache)** by storing the installation directory\n\n### ccache and actions/cache\n\nUsing ccache will store the compilation artifacs and speed up new runs\n\n```yaml\nname: Test\n\non: [push]\n\njobs:\n  test_main:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: calculate cache key for the compilation\n        id: get-key\n        run: |\n          git clone --bare https://github.com/plumed/plumed2.git\n          stable=$(cd plumed2.git ; git branch --list 'v2.*' --sort='version:refname'| sed \"s/^ *//\" | grep '^v2\\.[0-9]*$' | tail -n 1)\n          echo \"key=$(cd plumed2.git ; git rev-parse \"$stable\")\" \u003e\u003e $GITHUB_OUTPUT\n      - uses: actions/cache@v4\n        with:\n          path: |\n            ~/.ccache\n            ~/opt\n          key: ccache-${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}\n          restore-keys: ccache-${{ runner.os }}-stable\n      - name: Set paths\n        run: |\n            echo \"$HOME/opt/bin\" \u003e\u003e $GITHUB_PATH\n            echo \"CPATH=$HOME/opt/include:$HOME/opt/libtorch/include/torch/csrc/api/include/:$HOME/opt/libtorch/include/:$HOME/opt/libtorch/include/torch:$CPATH\" \u003e\u003e $GITHUB_ENV\n            echo \"INCLUDE=$HOME/opt/include:$HOME/opt/libtorch/include/torch/csrc/api/include/:$HOME/opt/libtorch/include/:$HOME/opt/libtorch/include/torch:$INCLUDE\" \u003e\u003e $GITHUB_ENV\n            echo \"LIBRARY_PATH=$HOME/opt/lib:$HOME/opt/libtorch/lib:$LIBRARY_PATH\" \u003e\u003e $GITHUB_ENV\n            echo \"LD_LIBRARY_PATH=$HOME/opt/lib:$HOME/opt/libtorch/lib:$LD_LIBRARY_PATH\" \u003e\u003e $GITHUB_ENV\n            echo \"PYTHONPATH=$HOME/opt/lib/plumed/python:$PYTHONPATH\" \u003e\u003e $GITHUB_ENV\n            # needed to avoid MPI warning\n            echo \"OMPI_MCA_btl=^openib\" \u003e\u003e $GITHUB_ENV\n      - name: Install dependencies\n        run: |\n          sudo apt update\n          sudo apt install mpi-default-bin mpi-default-dev\n          sudo apt install libfftw3-dev gsl-bin libgsl0-dev libboost-serialization-dev\n          sudo apt install ccache\n          ccache -p\n          ccache -s\n          mkdir -p ~/.ccache/ccache\n      - name: Install plumed\n        uses: Iximiel/install-plumed@v1\n        with:\n          modules: \"reset\"\n          dependency_path: \"${{ github.workspace }}/_data\"\n          CC: \"ccache mpicc\"\n          CXX: \"ccache mpic++\"\n        id: plumed\n      - name: run plumed\n        run: |\n          echo \"plumed path:${{ steps.plumed.outputs.plumed_prefix }}\"\n          ls ${{ steps.plumed.outputs.plumed_prefix }}/bin\n          head ${{ steps.plumed.outputs.dependency_file }}\n          plumed info --version\n```\nIn this case, after installing ccache we also force the creation of the ccache cache with `mkdir -p ~/.ccache/ccache`.\nThis combined with\n```yaml\n- uses: actions/cache@v4\n  with:\n    path: ~/.ccache\n    key: ccache-${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}\n    restore-keys: ccache-${{ runner.os }}-stable\n```\nwill ensure the storage of the compiler cache for subsequent runs.\n\n### only actions/cache\n\n```yaml\nname: Test\n\non: [push]\n\njobs:\n  test_main:\n    runs-on: ubuntu-latest\n\n    steps:\n      - name: calculate cache key for the compilation\n        id: get-key\n        run: |\n          git clone --bare https://github.com/plumed/plumed2.git\n          stable=$(cd plumed2.git ; git branch --list 'v2.*' --sort='version:refname'| sed \"s/^ *//\" | grep '^v2\\.[0-9]*$' | tail -n 1)\n          echo \"key=$(cd plumed2.git ; git rev-parse \"$stable\")\" \u003e\u003e $GITHUB_OUTPUT\n      - uses: actions/cache@v4\n        with:\n          path: ~/opt\n          key: ${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}\n          restore-keys: ${{ runner.os }}-stable\n      - name: Set paths\n        run: |\n            echo \"$HOME/opt/bin\" \u003e\u003e $GITHUB_PATH\n            echo \"CPATH=$HOME/opt/include:$HOME/opt/libtorch/include/torch/csrc/api/include/:$HOME/opt/libtorch/include/:$HOME/opt/libtorch/include/torch:$CPATH\" \u003e\u003e $GITHUB_ENV\n            echo \"INCLUDE=$HOME/opt/include:$HOME/opt/libtorch/include/torch/csrc/api/include/:$HOME/opt/libtorch/include/:$HOME/opt/libtorch/include/torch:$INCLUDE\" \u003e\u003e $GITHUB_ENV\n            echo \"LIBRARY_PATH=$HOME/opt/lib:$HOME/opt/libtorch/lib:$LIBRARY_PATH\" \u003e\u003e $GITHUB_ENV\n            echo \"LD_LIBRARY_PATH=$HOME/opt/lib:$HOME/opt/libtorch/lib:$LD_LIBRARY_PATH\" \u003e\u003e $GITHUB_ENV\n            echo \"PYTHONPATH=$HOME/opt/lib/plumed/python:$PYTHONPATH\" \u003e\u003e $GITHUB_ENV\n            # needed to avoid MPI warning\n            echo \"OMPI_MCA_btl=^openib\" \u003e\u003e $GITHUB_ENV\n      - name: Install dependencies\n        run: |\n          sudo apt update\n          sudo apt install mpi-default-bin mpi-default-dev\n          sudo apt install libfftw3-dev gsl-bin libgsl0-dev libboost-serialization-dev\n      - name: Install plumed\n        uses: Iximiel/install-plumed@v1\n        with:\n          modules: \"reset\"\n          dependency_path: \"${{ github.workspace }}/_data\"\n          CC: \"mpicc\"\n          CXX: \"mpic++\"\n        id: plumed\n      - name: run plumed\n        run: |\n          echo \"plumed path:${{ steps.plumed.outputs.plumed_prefix }}\"\n          ls ${{ steps.plumed.outputs.plumed_prefix }}/bin\n          head ${{ steps.plumed.outputs.dependency_file }}\n          plumed info --version\n```\n\n*Iximiel/install-plumed* after compiling plumed will store an extra file that will contain the hash of the commit used to compile plumed in the installation directory (`${prefix}/plumed${suffix}/${hash}`), if *Iximiel/install-plumed* finds that file during the set up, it will assume that that version of plumed is already present and will completely skip the compilation.\n\nThe default installation path is `~/opt`, so\n\n```yaml\n- uses: actions/cache@v4\n  with:\n    path: ~/opt\n    key: ${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}\n    restore-keys: ${{ runner.os }}-stable\n```\nwill do the trick for you.\n\nYou can also combine the two approaches, expecially if you use the [`version`](#version) keyword to checkout to a branch instead of a tag.\n```yaml\n- uses: actions/cache@v4\n  with:\n    path: |\n     ~/opt\n     ~/.ccache\n    key: ${{ runner.os }}-stable-${{ steps.get-key.outputs.key }}\n    restore-keys: ${{ runner.os }}-stable\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumed%2Finstall-plumed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplumed%2Finstall-plumed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplumed%2Finstall-plumed/lists"}