-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Revert "remove openmc source build from CI"
This reverts commit 1f3ffbf.
- Loading branch information
Showing
4 changed files
with
131 additions
and
4 deletions.
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
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,54 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# Build openmc | ||
cd openmc | ||
./tools/ci/gha-install-mcpl.sh | ||
python tools/ci/gha-install.py | ||
|
||
# Create the caching folder | ||
DIRS=(openmc_src mcpl_src) | ||
for DIR in ${DIRS[@]}; do | ||
mkdir $DIR | ||
mkdir $DIR/bin | ||
mkdir $DIR/lib | ||
mkdir $DIR/share | ||
mkdir $DIR/include | ||
done | ||
|
||
# Copy libraries to caching folder | ||
cp /usr/local/bin/openmc openmc_src/bin/. | ||
cp /usr/local/lib/libopenmc.so openmc_src/lib/. | ||
cp -r /usr/local/lib/cmake openmc_src/lib/. | ||
cp /usr/local/lib/libpugixml.a openmc_src/lib/. | ||
cp -r /usr/local/lib/pkgconfig openmc_src/lib/. | ||
#cp -r /usr/local/share/openmc openmc_src/share/. | ||
#cp -r /usr/local/share/man openmc_src/share/. | ||
cp -r /usr/local/include/openmc openmc_src/include/. | ||
cp /usr/local/include/pugiconfig.hpp openmc_src/include/. | ||
cp /usr/local/include/pugixml.hpp openmc_src/include/. | ||
INCLUDES=(fmt xtl xtensor gsl gsl-lite openmc) | ||
for I in ${INCLUDES[@]}; do | ||
cp -r /usr/local/include/$I openmc_src/include/. | ||
done | ||
|
||
# MCPL stuff | ||
cp /usr/local/lib/libmcpl.so mcpl_src/lib/. | ||
cp /usr/local/include/mcpl.h mcpl_src/include/. | ||
cp /usr/local/lib/libsswmcpl.so mcpl_src/lib/. | ||
cp /usr/local/lib/libphitsmcpl.so mcpl_src/lib/. | ||
cp -r /usr/local/share/MCPL mcpl_src/share/. | ||
|
||
MCPL_BINARIES=(pymcpltool mcpl-config mcpl2ssw ssw2mcpl mcpl2phits phits2mcpl mcpltool) | ||
for BINARY in ${MCPL_BINARIES[@]}; do | ||
cp /usr/local/bin/$BINARY mcpl_src/bin/. | ||
done | ||
|
||
|
||
# Move the caching folders to $HOME | ||
mv openmc_src $HOME/openmc_src | ||
mv mcpl_src $HOME/mcpl_src | ||
|
||
# Install the OpenMC python API | ||
pip install . | ||
cd ../ |
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,30 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
# Move cached OpenMC libaries to PATH | ||
sudo mv $HOME/openmc_src/bin/openmc /usr/local/bin/openmc | ||
OPENMC_LIBS=(libopenmc.so cmake libpugixml.a pkgconfig) | ||
for LIB in ${OPENMC_LIBS[@]}; do | ||
sudo mv $HOME/openmc_src/lib/$LIB /usr/local/lib/. | ||
done | ||
|
||
sudo mv $HOME/openmc_src/lib/ /usr/local/lib/ | ||
#sudo mv $HOME/openmc_src/share/openmc /usr/local/share/openmc | ||
#sudo mv $HOME/openmc_src/share/man /usr/local/share/man | ||
INCLUDES=(fmt xtl xtensor gsl gsl-lite openmc pugixml.hpp pugiconfig.hpp) | ||
for I in ${INCLUDES[@]}; do | ||
sudo mv $HOME/openmc_src/include/$I /usr/local/include/$I | ||
done | ||
|
||
# Move MCPL stuff | ||
MCPL_BINARIES=(pymcpltool mcpl-config mcpltool mcpl2ssw ssw2mcpl mcpl2phits phits2mcpl) | ||
for BINARY in ${MCPL_BINARIES[@]}; do | ||
sudo mv $HOME/mcpl_src/bin/$BINARY /usr/local/bin/. | ||
done | ||
|
||
MCPL_LIBS=(libsswmcpl.so libphitsmcpl.so libmcpl.so) | ||
for LIB in ${MCPL_LIBS[@]}; do | ||
sudo mv $HOME/mcpl_src/lib/$LIB /usr/local/lib/. | ||
done | ||
sudo mv $HOME/mcpl_src/include/mcpl.h /usr/local/include/. | ||
sudo mv $HOME/mcpl_src/share/MCPL /usr/local/share/. |