-
Notifications
You must be signed in to change notification settings - Fork 500
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
Revamp CI with dependency and Python caching for efficient installs #3112
Open
johvincau
wants to merge
40
commits into
openmc-dev:develop
Choose a base branch
from
johvincau:ci_dependency
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
40 commits
Select commit
Hold shift + click to select a range
7509341
Add basic Python dependency caching
johvincau 1524cf7
Test NJOY install script refactor for specific install location
johvincau 1bc8572
Temporarily turn off testing suite
johvincau ac06042
Refactor mcpl install script
johvincau d7c1bdc
Add commit hashing and dependency caching for testing
johvincau d168428
Adjust MCPL branch
johvincau b572a0e
Add MCPL build to path
johvincau d2dec2d
Return to github workspace after reinstalling makes
johvincau dd2f4fb
Re-add support for DAGMC caching
johvincau 9a170cd
Reenable testing and fix DAGMC hashing
johvincau 67a4740
Add cache support for ncrystal and temporarily take out testing
johvincau afd5144
Re-add testing and minor tweaks for ncrystal
johvincau 8349c8a
Add cache support for libmesh
johvincau 41e8f3d
Test removal of make install
johvincau b38e1fa
Fix mcpl install dir and remove testing again
johvincau 8dc462c
Add mcpl prefix path to gha-install.py
johvincau 8877edb
Cache vectfit and temporarily remove testing
johvincau 83d41de
Handle case for successful vectfit restore
johvincau 57b6388
Try renaming scheme for job matrix
johvincau 62c31aa
Extract job matrix from json
johvincau 1e7de1e
Add in setup-job and try JSON input/output scheme
johvincau faa4883
Clean up comments and prepare for PR
johvincau f43fed5
Minor tweaks and clean up trash
johvincau a5b5a75
Remove mcpl build dir flag
johvincau 2264f3e
Remove nonfunctional mcpl_cmake_path and -DMCPL_DIR cmake flags
johvincau cd4d977
Fix libmesh/vectfit install commands in gha-install.sh
johvincau 36d0ded
Improve gha-caches.sh hash commands
johvincau f107643
Clarify GHA 'setup' step name
johvincau 048feeb
Remove build dirs after NJOY and vectfit installs
johvincau 652c57c
Try removing NJOY2016 tests dir after install
johvincau 6e9b941
Fix vectfit in gha-install.sh
johvincau a35fa53
Re-add NJOY2016 tests dir
johvincau dd78966
Revert vectfit changes in gha-install.sh
johvincau b639169
Revert all changes to NJOY and vectfit caches to fix install issues
johvincau 1897a46
Re-try removal of njoy-specific testing suite
johvincau 6a1d1c0
Remove njoy build directory after successful build to trim cache
johvincau 6ef06d3
Retain NJOY build directory for cache
johvincau d7714ce
Properly add NJOY dir to path and remove build dir
johvincau 53e9353
Remove Python-version-dependency caches
johvincau f7f32bf
NJOY2016/bin should be on PATH
paulromano File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
echo "NJOY_HASH=$(git ls-remote https://github.com/njoy/NJOY2016.git HEAD |\ | ||
head -c 15)" >> $GITHUB_ENV | ||
|
||
if [[ $DAGMC = 'y' ]]; then | ||
echo "MOAB_HASH=$(git ls-remote https://bitbucket.org/fathomteam/moab.git \ | ||
--branch Version5.1.0 HEAD | head -c 15)" >> $GITHUB_ENV | ||
|
||
echo "DAGMC_HASH=$(git ls-remote https://github.com/svalinn/dagmc.git HEAD |\ | ||
head -c 15)" >> $GITHUB_ENV | ||
fi | ||
|
||
if [[ $NCRYSTAL = 'y' ]]; then | ||
echo "NC_HASH=$(git ls-remote https://github.com/mctools/ncrystal \ | ||
--branch develop HEAD | head -c 15)" >> $GITHUB_ENV | ||
fi | ||
|
||
if [[ $VECTFIT = 'y' ]]; then | ||
echo "PYBIND_HASH=$(git ls-remote https://github.com/pybind/pybind11 \ | ||
--branch master HEAD | head -c 15)" >> $GITHUB_ENV | ||
|
||
echo "VF_HASH=$(git ls-remote https://github.com/liangjg/vectfit.git HEAD |\ | ||
head -c 15)" >> $GITHUB_ENV | ||
fi | ||
|
||
if [[ $LIBMESH = 'y' ]]; then | ||
echo "NC_HASH=$(git ls-remote https://github.com/libmesh/libmesh \ | ||
--branch v1.7.1 HEAD | head -c 15)" >> $GITHUB_ENV | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# MCPL variables | ||
MCPL_REPO='https://github.com/mctools/mcpl' | ||
|
||
cd $HOME | ||
git clone https://github.com/mctools/mcpl | ||
git clone $MCPL_REPO | ||
cd mcpl | ||
mkdir build && cd build | ||
cmake .. && make 2>/dev/null && sudo make install | ||
cmake .. && make 2>/dev/null && sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,15 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# NJOY variables | ||
NJOY_REPO='https://github.com/njoy/NJOY2016' | ||
NJOY_INSTALL_DIR=$HOME/NJOY2016 | ||
|
||
cd $HOME | ||
git clone https://github.com/njoy/NJOY2016 | ||
git clone $NJOY_REPO | ||
cd NJOY2016 | ||
mkdir build && cd build | ||
cmake -Dstatic=on .. && make 2>/dev/null && sudo make install | ||
cmake -Dstatic=on .. -DCMAKE_INSTALL_PREFIX=$NJOY_INSTALL_DIR && | ||
make 2>/dev/null && sudo make install | ||
rm -rf $HOME/NJOY2016/tests | ||
rm -rf $HOME/NJOY2016/build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be nice to put all the installed dependencies in a single folder, e.g.,
$HOME/dependencies/NJOY2016
. Also, in the case of NJOY (and probably the others), we should just be caching the installed version. Right now, the cache for NJOY is 1 GB when it should be much less.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've trimmed the NJOY repository by ~30% by removing its own NJOY-specific testing suite out of the cache; however, removing the build directory causes issues with the vectfit installation. Aside from NJOY and vectfit, all other of the dependencies at the very least remove their own build directories before caching.
I would like to move all the installed dependencies into a single folder as well; however, I will address that in a future PR since it would take a lot of testing and plenty of commits (and this PR already has enough of those as is!).