Add a ./dev script

Implements #736 (closed)

We have a lot of dependencencies, and these dependencies change in non-trivial ways across MRs and branches. Configure args require you to always remember which flags are needed to fetch dependencies for a particular feature. --with-spack works well most of the time but still requires manual effort to ensure you don't accidentally break the build.

Long story short, spinning up a development environment is painful. We can make it better.

The ./dev script(suite) is a tool that makes spinning up development environments easy. Running ./dev create will construct a Spack environment containing all the needed dependencies and the configure arguments needed to use them. The only system requirement is a working Spack.

There are a few other helper subcommands too:

  • ./dev autogen is a wrapper for ./autogen that always uses the right versions of the Autotools,
  • ./dev pre-commit will install and run pre-commit for you, and
  • ./dev buildfe is the new form of ci.buildfe.

This script is of course used to generate the environments tested in CI, keeping everything consistent and up-to-date.

To Demonstrate

  1. Run ./dev create in your local checkout. It will run a bunch of Spack commands and (may) install some packages, eventually ending with an instruction such as:
    $ ./dev create
    ...
    Devenv successfully created! You may now enter the devenv with:
        $ ./dev env 
    Further commands (make/meson/etc.) MUST be run under this shell. Eg.:
        $ make -j
        $ make -j install
        $ hpcrun -h
  2. Enter the devenv as instructed above:
    $ ./dev env
  3. make -j
  4. make -j install
  5. And finally, test the newly built HPCToolkit with the tests2 suite (yes, it works out of the box):
    $ make installcheck

To Demonstrate (Accelerated version)

  1. Steps 1-4 in the prior instructions can be (conveniently) done in a single command, intended for one-offs:
    $ ./dev create --build

Backward Compatibility

  • This MR does not alter the data formats.
  • This MR does only alters CLIs used in CI, and adds a new CLI (./dev) for developers.

Checklist

  • I have run pre-commit run -a on my local checkout and fixed any reported issues.
  • I have confirmed that existing tests and/or the tests added by this MR cover the changes introduced by this MR.
  • I have confirmed that any added tests will be automatically run in CI.
  • I have updated all relevant documentation: Does not alter the tools.
Edited by Jonathon Anderson

Merge request reports

Loading