OpenCoarrays icon indicating copy to clipboard operation
OpenCoarrays copied to clipboard

Experimental fpm build/test/install capability

Open rouson opened this issue 3 years ago • 0 comments

coverage on master
Codecov branch

Summary of changes

This PR

  1. Removes ~4K lines of bash installation scripts.
  2. Adds a much smaller, more maintainable, and more portable Homebrew/fpm-based installation script, install.sh for macOS, Linux, and Windows Subsystem for Linux.
  3. Adds a test/ subdirectory containing Garden unit tests that fpm can run.
  4. Moves src/tests to tests/ to prevent fpm from building the CTest tests because of a build error due to duplicate module names.
  5. Adjusts the top-level CMake script for the new tests/ directory location.
  6. Brackets the legacy GASNet and OpenSHMEM library source files with C preprocessor macros to prevent fpm from compiling them.
  7. Adds an example/ subdirectory with simple demonstration programs that fpm can run.
  8. Puts fpm.toml in a new .gitignore file to prevent naive uses of fpm. (fpm builds work only after the new version of install.sh has been run and has copied the new fpm.toml file to the top-level source directory.)

Rationale for changes

The old install.sh script was large, complicated, difficult to maintain, and was written in an era before Homebrew was stable across macOS and Linux and long before fpm existed. The new installer first installs Homebrew if it's missing, then uses Homebrew to install all OpenCoarrays prerequisites, and finally builds OpenCoarrays with fpm, which enables developers to (re)build OpenCoarrays from source without CMake.

Additional info and certifications

This pull request (PR) is a:

  • [ ] Bug fix
  • [ ] Feature addition
  • [X] Other, Please describe: BREAKING CHANGE: This PR replaces the installer.

I certify that

  • [X] I certify that:
    • I have reviewed and followed the contributing guidelines
    • I will wait at least 24 hours before self-approving the PR to give another OpenCoarrays developer a chance to review my proposed code
    • I have not introduced errant white space (no trailing white space or white space errors may be introduced)
    • I have added an explanation of what these changes do and why they should be included
    • I have checked to ensure there aren't other open Pull Requests for the same change
    • I have you written new tests for these changes
    • I have successfully tested these changes locally
    • I have commented any non-trivial, non-obvious code changes
    • The commits are logically atomic, self consistent and coherent
    • The commit messages follow best practices
    • Test coverage is maintained or increased after this is merged

Code coverage data

coverage on master

rouson avatar Jun 05 '22 21:06 rouson