sourceryinstitute / OpenCoarrays

A parallel application binary interface for Fortran 2018 compilers.
http://www.opencoarrays.org
BSD 3-Clause "New" or "Revised" License
247 stars 56 forks source link

Experimental fpm build/test/install capability #758

Open rouson opened 2 years ago

rouson commented 2 years ago
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:

I certify that

Code coverage data

coverage on master