Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
184 changes: 180 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,22 +111,198 @@ jobs:
run: |
sudo apt -y update
sudo apt install -y libpng-dev \
libmpich-dev \
libnetcdf-dev \
libpnetcdf-dev \
libhdf5-serial-dev \
libhdf5-mpich-dev \
libeigen3-dev
libeigen3-dev \

- name: Optional apt dependencies for mpi
shell: bash
if: ${{ matrix.mpi == 'y' }}
run: |
sudo apt install -y libhdf5-mpich-dev \
libmpich-dev
sudo update-alternatives --set mpi /usr/bin/mpicc.mpich
sudo update-alternatives --set mpirun /usr/bin/mpirun.mpich
sudo update-alternatives --set mpi-x86_64-linux-gnu /usr/include/x86_64-linux-gnu/mpich

- name: install
# Upgrade pip, pytest, numpy before doing anything else.
- name: update pip, pytest, numpy and install NJOY
shell: bash
run: |
pip install --upgrade pip
pip install --upgrade pytest
pip install --upgrade numpy
echo "$HOME/NJOY2016/build" >> $GITHUB_PATH
set -ex
cd $HOME
git clone https://github.com/njoy/NJOY2016
cd NJOY2016
mkdir build && cd build
cmake -Dstatic=on .. && make 2>/dev/null && sudo make install

- name: Optional install DAGMC
shell: bash
if: ${{ matrix.dagmc == 'y' }}
run: |
set -ex
MOAB_BRANCH='Version5.1.0'
MOAB_REPO='https://bitbucket.org/fathomteam/moab/'
MOAB_INSTALL_DIR=$HOME/MOAB/
DAGMC_BRANCH='develop'
DAGMC_REPO='https://github.com/svalinn/dagmc'
DAGMC_INSTALL_DIR=$HOME/DAGMC/
CURRENT_DIR=$(pwd)
cd $HOME
mkdir MOAB && cd MOAB
git clone -b $MOAB_BRANCH $MOAB_REPO
mkdir build && cd build
cmake ../moab -DENABLE_HDF5=ON -DENABLE_NETCDF=ON -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=$MOAB_INSTALL_DIR -DENABLE_BLASLAPACK=OFF
make -j && make -j install
rm -rf $HOME/MOAB/moab $HOME/MOAB/build
cd $HOME
mkdir DAGMC && cd DAGMC
git clone -b $DAGMC_BRANCH $DAGMC_REPO
mkdir build && cd build
cmake ../dagmc -DBUILD_TALLY=ON -DCMAKE_INSTALL_PREFIX=$DAGMC_INSTALL_DIR -DBUILD_STATIC_LIBS=OFF -DMOAB_DIR=$MOAB_INSTALL_DIR
make -j install
rm -rf $HOME/DAGMC/dagmc $HOME/DAGMC/build
cd $CURRENT_DIR
$GITHUB_WORKSPACE/tools/ci/gha-install.sh

- name: Optional install NCRYSTAL
shell: bash
if: ${{ matrix.ncrystal == 'y' }}
run: |
set -ex
cd $HOME
#Use the NCrystal develop branch (in the near future we can move this to master):
git clone https://github.com/mctools/ncrystal --branch develop --single-branch --depth 1 ncrystal_src
SRC_DIR="$PWD/ncrystal_src"
BLD_DIR="$PWD/ncrystal_bld"
INST_DIR="$PWD/ncrystal_inst"
PYTHON=$(which python3)
CPU_COUNT=1
mkdir "$BLD_DIR"
cd ncrystal_bld
cmake \
"${SRC_DIR}" \
-DBUILD_SHARED_LIBS=ON \
-DNCRYSTAL_NOTOUCH_CMAKE_BUILD_TYPE=ON \
-DNCRYSTAL_MODIFY_RPATH=OFF \
-DCMAKE_BUILD_TYPE=Release \
-DNCRYSTAL_ENABLE_EXAMPLES=OFF \
-DNCRYSTAL_ENABLE_SETUPSH=OFF \
-DNCRYSTAL_ENABLE_DATA=EMBED \
-DCMAKE_INSTALL_PREFIX="${INST_DIR}" \
-DPython3_EXECUTABLE="$PYTHON"
make -j${CPU_COUNT:-1}
make install
#Note: There is no "make test" or "make ctest" functionality for NCrystal
# yet. If it appears in the future, we should add it here.
# Output the configuration to the log
"${INST_DIR}/bin/ncrystal-config" --setup
# Change environmental variables
eval $( "${INST_DIR}/bin/ncrystal-config" --setup )
# Check installation worked
nctool --test

- name: Optional apt dependencies for vectfit
shell: bash
if: ${{ matrix.vectfit == 'y' }}
run: |
sudo apt-get install -y libblas-dev liblapack-dev
set -ex
PYBIND_BRANCH='master'
PYBIND_REPO='https://github.com/pybind/pybind11'
XTL_BRANCH='0.6.13'
XTL_REPO='https://github.com/xtensor-stack/xtl'
XTENSOR_BRANCH='0.21.3'
XTENSOR_REPO='https://github.com/xtensor-stack/xtensor'
XTENSOR_PYTHON_BRANCH='0.24.1'
XTENSOR_PYTHON_REPO='https://github.com/xtensor-stack/xtensor-python'
XTENSOR_BLAS_BRANCH='0.17.1'
XTENSOR_BLAS_REPO='https://github.com/xtensor-stack/xtensor-blas'
cd $HOME
git clone -b $PYBIND_BRANCH $PYBIND_REPO
cd pybind11 && mkdir build && cd build && cmake .. && sudo make install
pip install $HOME/pybind11
cd $HOME
git clone -b $XTL_BRANCH $XTL_REPO
cd xtl && mkdir build && cd build && cmake .. && sudo make install
cd $HOME
git clone -b $XTENSOR_BRANCH $XTENSOR_REPO
cd xtensor && mkdir build && cd build && cmake .. && sudo make install
cd $HOME
git clone -b $XTENSOR_PYTHON_BRANCH $XTENSOR_PYTHON_REPO
cd xtensor-python && mkdir build && cd build && cmake .. && sudo make install
cd $HOME
git clone -b $XTENSOR_BLAS_BRANCH $XTENSOR_BLAS_REPO
cd xtensor-blas && mkdir build && cd build && cmake .. && sudo make install
# Install wheel (remove when vectfit supports installation with build isolation)
pip install wheel
# Install vectfit
cd $HOME
git clone https://github.com/liangjg/vectfit.git
pip install --no-build-isolation ./vectfit

- name: Optional apt dependencies for LIBMESH
shell: bash
if: ${{ matrix.libmesh == 'y' }}
run: |
set -ex
# libMESH install
pushd $HOME
mkdir LIBMESH && cd LIBMESH
git clone https://github.com/libmesh/libmesh -b v1.7.1 --recurse-submodules
mkdir build && cd build
export METHODS="opt"

- name: Optional apt dependencies for LIBMESH
shell: bash
if: ${{ matrix.libmesh == 'y' && matrix.mpi == 'y' }}
run: |
../libmesh/configure --prefix=$HOME/LIBMESH CXX=mpicxx CC=mpicc FC=mpifort F77=mpif77 \
--enable-exodus --disable-netcdf-4 --disable-eigen --disable-lapack

- name: Optional apt dependencies for LIBMESH
shell: bash
if: ${{ matrix.libmesh == 'y' && matrix.mpi == 'n' }}
run: |
../libmesh/configure --prefix=$HOME/LIBMESH --enable-exodus --disable-netcdf-4 --disable-eigen --disable-lapack --disable-mpi

- name: Optional apt dependencies for LIBMESH
shell: bash
if: ${{ matrix.libmesh == 'y' }}
run: |
make -j2 install
export LIBMESH_PC=$HOME/LIBMESH/lib/pkgconfig/
rm -rf $HOME/LIBMESH/build
popd

- name: Install MCPL
shell: bash
run: |
set -ex
cd $HOME
git clone https://github.com/mctools/mcpl
cd mcpl
mkdir build && cd build
cmake .. && make 2>/dev/null && sudo make install

# For MPI configurations, make sure mpi4py and h5py are built against the
# correct version of MPI
- name: Optional apt dependencies for MPI
shell: bash
if: ${{ matrix.mpi == 'y' }}
run: |
pip install --no-binary=mpi4py mpi4py
export CC=mpicc
export HDF5_MPI=ON
export HDF5_DIR=/usr/lib/x86_64-linux-gnu/hdf5/mpich
pip install wheel "cython<3.0"
pip install --no-binary=h5py --no-build-isolation h5py

- name: cache-xs
uses: actions/cache@v4
with:
Expand Down
35 changes: 0 additions & 35 deletions tools/ci/gha-install-dagmc.sh

This file was deleted.

22 changes: 0 additions & 22 deletions tools/ci/gha-install-libmesh.sh

This file was deleted.

7 changes: 0 additions & 7 deletions tools/ci/gha-install-mcpl.sh

This file was deleted.

46 changes: 0 additions & 46 deletions tools/ci/gha-install-ncrystal.sh

This file was deleted.

7 changes: 0 additions & 7 deletions tools/ci/gha-install-njoy.sh

This file was deleted.

48 changes: 0 additions & 48 deletions tools/ci/gha-install-vectfit.sh

This file was deleted.