Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental fpm build/test/install capability #758

Closed
wants to merge 7 commits into from
Closed

Conversation

rouson
Copy link
Member

@rouson rouson commented Jun 5, 2022

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
  • Other, Please describe: BREAKING CHANGE: This PR replaces the installer.

I certify that

  • 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

This commit
1. Removes ~4K lines of bash installation scripts.
2. Adds a much smaller, more maintainable, and more portable
   Homebrew- and fpm-based installation script that works on
   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 building the CTest
   tests because of a build error due to duplicate module names.
5. Adjusts the CMake script for the new tests/ directory location.
6. Brackets the legacy GASNet and OpenSHMEM libraries with C
   preprocessor macros to prevent fpm from compiling them.
7. Adds an example/ subdirectory with simple demonstration rograms
   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 installer has been
   and the new fpm.toml file has been copied to the top level of
   the soure tree.)
This commit applies the patch provided Brad King in a review of
PR #758.
@@ -964,7 +966,7 @@ endif()

# Test bash installation scripts
include(cmake/AddInstallationScriptTest.cmake )
add_installation_script_test(installation-scripts.sh src/tests/installation/)
add_installation_script_test(installation-scripts.sh tests/installation/)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code adds the test-installation-scripts.sh test case that is failing in CI.

The test expects the prerequisites/use-case/bootstrap.sh file to exist, but it is removed by this PR.

@rouson rouson closed this Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants