Build against MCPL in CI by default

This commit is contained in:
Paul Romano 2022-12-22 14:03:26 -06:00
parent 9ae44b3fd1
commit eeab41a19d
2 changed files with 6 additions and 12 deletions

View file

@ -19,14 +19,14 @@ def which(program):
return None
def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False, mcpl=False):
def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False):
# Create build directory and change to it
shutil.rmtree('build', ignore_errors=True)
os.mkdir('build')
os.chdir('build')
# Build in debug mode by default
cmake_cmd = ['cmake', '-DCMAKE_BUILD_TYPE=Debug']
# Build in debug mode by default with support for MCPL
cmake_cmd = ['cmake', '-DCMAKE_BUILD_TYPE=Debug', '-DOPENMC_USE_MCPL=on']
# Turn off OpenMP if specified
if not omp:
@ -54,9 +54,6 @@ def install(omp=False, mpi=False, phdf5=False, dagmc=False, libmesh=False, mcpl=
libmesh_path = os.environ.get('HOME') + '/LIBMESH'
cmake_cmd.append('-DCMAKE_PREFIX_PATH=' + libmesh_path)
if mcpl:
cmake_cmd.append('-DOPENMC_USE_MCPL=ON')
# Build in coverage mode for coverage testing
cmake_cmd.append('-DOPENMC_ENABLE_COVERAGE=on')
@ -74,10 +71,9 @@ def main():
phdf5 = (os.environ.get('PHDF5') == 'y')
dagmc = (os.environ.get('DAGMC') == 'y')
libmesh = (os.environ.get('LIBMESH') == 'y')
mcpl = (os.environ.get('MCPL') == 'y')
# Build and install
install(omp, mpi, phdf5, dagmc, libmesh, mcpl)
install(omp, mpi, phdf5, dagmc, libmesh)
if __name__ == '__main__':
main()

View file

@ -27,10 +27,8 @@ if [[ $LIBMESH = 'y' ]]; then
./tools/ci/gha-install-libmesh.sh
fi
# Install mcpl if needed
if [[ $MCPL = 'y' ]]; then
./tools/ci/gha-install-mcpl.sh
fi
# Install MCPL
./tools/ci/gha-install-mcpl.sh
# For MPI configurations, make sure mpi4py and h5py are built against the
# correct version of MPI