Process to add a new environment

The goal of this project is to be able to build any environment of interest for RADIUSS, independently, and in a reproducible manner. We aim in particular at building those environments against Spack develop branch to check that RADIUSS packages do not get broken by recent changes in Spack.

Pre-requisite

To be used in CI, we need to make sure your environment can be built completely isolated of any personnal Spack configuration on LC systems. All the required configuration needs to be embedded in the environment directory.

Note

You may use this CI to effectively iterate over builds of an environment to fix it. That’s part of the purpose of this repo.

Required adds-on

Gitlab section in spack config

Spack will use the gitlab-ci section to the spack.yaml file to generate the pipeline for you environment. In particular, this is where we map runners to specs. Adding this section should be doable by inspecting the existing radiuss environement. Create a Pull Request and ask for help if needed.

CI variables

Each project must define three (3) environment variables in order for the CI to work properly:

  • ENV_NAME: the name of the environment, which must match one of the directories under spack_environments. This variable is defined in the CI YAML configuration, either in .gitlab-ci.yml or as a project variable in the GitLab instance (web client).

For the other two variables, create a file named ci-variables.bash in spack_environments/<ENV_NAME>. In this file, add the definition of the missing variables:

  • SPACK_REPO: the URL where to clone Spack from.

  • SPACK_REF: the ref to checkout in Spack repo.

export SPACK_REPO=https://github.com/spack/spack.git
export SPACK_REF=develop

For now on, each time the CI runs with ENV_NAME=<env_name> it will include the appropriate variable file. All you need to do to run your environment pipeline is to set ENV_NAME.

Pull Request worflow

We recommend setting your environment name globally in .gitlab-ci.yml