From 24c646706617aaf06b45c2ca5cb8e8edf79a63f4 Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 25 Jul 2022 23:26:37 +0100 Subject: [PATCH 01/49] moved install scripts into Dockerfile --- CI/Dockerfile | 164 ++++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 131 insertions(+), 33 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 2f25be054b..80be45d3d3 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,4 +1,23 @@ ARG UBUNTU_VERSION=18.04 +# or clang + + +ARG ci_jobs=8 +ARG MOAB_BRANCH=5.4.0 +ARG build_dir=/root/build_dir +ARG install_dir=/root/opt +ARG geant4_version=10.5.1 +ARG EMBREE_BRANCH='v3.6.1' +ARG HDF5_VERSION=1.10.4 +ARG HDF5_VERSION_major=1.10 + +# if clang then change cc and cxx +# ARG COMPILER=gcc +# or clang +ARG CC=gcc +# or clang++ +ARG CXX=g++ + FROM ubuntu:${UBUNTU_VERSION} AS base # Use bash as the default shell @@ -34,60 +53,139 @@ RUN apt-get -y update; \ pip install cython; -# Copy scripts to docker image -RUN mkdir -p /root/etc/ -COPY CI/ /root/etc/CI -#TODO move sh file contents into this Dockerfile -ENV docker_env=/root/etc/CI/env.sh - -ENV build_dir=/root/build_dir -ENV install_dir=/root/opt FROM base as external_deps -#setting the COMPILER variable -ARG COMPILER=gcc -ENV COMPILER=${COMPILER} - -# Set Geant4 env variable +ARG build_dir +ARG install_dir +ARG COMPILER +ARG ci_jobs +ARG geant4_version +ARG CC +ARG CXX +ARG EMBREE_BRANCH + +ENV geant4_basename=geant4-v${geant4_version} +ENV geant4_tarball=${geant4_basename}.tar.gz +ENV geant4_shasum=2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e39 ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -# Build Geant4 -#TODO move sh file contents into this Dockerfile -RUN /root/etc/CI/docker/build_geant4.sh - +RUN mkdir -p ${geant4_build_dir}/bld +RUN cd ${geant4_build_dir} && \ + wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${geant4_version}/${geant4_tarball} --no-check-certificate && \ + tar -xzf ${geant4_tarball} && \ + cd bld && \ + cmake ../${geant4_basename} -DBUILD_STATIC_LIBS=ON \ + -DGEANT4_USE_SYSTEM_EXPAT=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \ + -DCMAKE_INSTALL_PREFIX=${geant4_install_dir} && \ + make -j${ci_jobs} && \ + make install && \ + cd && \ + rm -rf ${geant4_build_dir} + +# these don't appear to be used yet ENV double_down_build_dir=${build_dir}/double-down/ ENV double_down_install_dir=${install_dir}/double-down/ -# Build Embree -#TODO move sh file contents into this Dockerfile -RUN /root/etc/CI/docker/build_embree.sh +ENV embree_install_dir=${install_dir}/embree + +RUN mkdir EMBREE && \ + cd EMBREE && \ + git clone -b ${EMBREE_BRANCH} https://github.com/embree/embree && \ + mkdir build && \ + cd build && \ + cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ + -DEMBREE_ISPC_SUPPORT=OFF \ + -DEMBREE_TASKING_SYSTEM=INTERNAL \ + -DEMBREE_TUTORIALS=OFF \ + -DEMBREE_TBB_ROOT=/usr && \ + make -j2 && make -j2 install && \ + rm -rf $HOME/EMBREE/embree + FROM external_deps AS hdf5 +ARG build_dir +ARG install_dir +ARG ci_jobs +ARG HDF5_VERSION +ARG HDF5_VERSION_major +ARG CC +ARG CXX + # Set HDF5 env variable ENV hdf5_build_dir=${build_dir}/hdf5 ENV hdf5_install_dir=${install_dir}/hdf5 -# Build HDF5 -# HDF5 argument possible value: 1.10.4 or system -ARG HDF5=1.10.4 -ENV HDF5_VERSION=${HDF5} -#TODO move sh file contents into this Dockerfile -RUN /root/etc/CI/docker/build_hdf5.sh +RUN mkdir -p ${hdf5_build_dir}/bld && \ + cd ${hdf5_build_dir} && \ + wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION_major}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz && \ + tar -xzf hdf5-${HDF5_VERSION}.tar.gz && \ + cd bld && \ + ../hdf5-${HDF5_VERSION}/configure --enable-shared \ + --prefix=${hdf5_install_dir} \ + CC=${CC} \ + CXX=${CXX} && \ + make -j${ci_jobs} && \ + make install && \ + cd && \ + rm -rf ${hdf5_build_dir} + FROM hdf5 AS moab +ARG ci_jobs +ARG MOAB_BRANCH +ARG CC +ARG CXX +ARG build_dir +ARG install_dir + # Set MOAB env variable ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab -ARG MOAB=5.3.0 -ENV MOAB_VERSION ${MOAB} -#TODO move sh file contents into this Dockerfile -RUN if [ "${MOAB_VERSION}" != "master" ] && [ "${MOAB_VERSION}" != "develop" ]; then \ - /root/etc/CI/docker/build_moab.sh; \ - fi; - +RUN mkdir -p ${moab_build_dir}/bld +RUN cd ${moab_build_dir} && \ + git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ + cd bld && \ + cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ + -DENABLE_BLASLAPACK=OFF \ + -DENABLE_FORTRAN=OFF \ + -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DBUILD_SHARED_LIBS=OFF && \ + make -j${ci_jobs} && \ + make install && \ + rm -rf * && \ + cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ + -DENABLE_PYMOAB=ON \ + -DENABLE_BLASLAPACK=OFF \ + -DENABLE_FORTRAN=OFF \ + -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DBUILD_SHARED_LIBS=ON \ + -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib && \ + # ensure that the installation directory for python packages exist + for d in $(echo $PYTHONPATH | tr : '\n'); do mkdir -p $d; done && \ + make -j${ci_jobs} && \ + make install && \ + cd && \ + rm -rf ${moab_build_dir} + +ENV dagmc_build_dir=${build_dir}/DAGMC +ENV dagmc_install_dir=${install_dir}/DAGMC + +ENV dagmc_build_dir_shared=${dagmc_build_dir}-shared +ENV dagmc_install_dir_shared=${dagmc_install_dir}-shared + +ENV dagmc_build_dir_static=${dagmc_build_dir}-static +ENV dagmc_install_dir_static=${dagmc_install_dir}-static From c2dba7a81edc7ce7e93d0676f00276007c012587 Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 25 Jul 2022 23:52:36 +0100 Subject: [PATCH 02/49] improved docs/comments --- CI/Dockerfile | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 80be45d3d3..6cc619959f 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,21 +1,23 @@ -ARG UBUNTU_VERSION=18.04 -# or clang +# Svalinn DAGMC Dockerfile +ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 ARG MOAB_BRANCH=5.4.0 -ARG build_dir=/root/build_dir -ARG install_dir=/root/opt -ARG geant4_version=10.5.1 ARG EMBREE_BRANCH='v3.6.1' +ARG geant4_version=10.5.1 + ARG HDF5_VERSION=1.10.4 +# currently major version must be manually set to match HDF5 version ARG HDF5_VERSION_major=1.10 -# if clang then change cc and cxx -# ARG COMPILER=gcc -# or clang +ARG build_dir=/root/build_dir +ARG install_dir=/root/opt + +# clang and gcc are options for the compiler but to use them CC and CXX must be set +# if clang then change cc to clang and cxx to clang++ +# if gcc then change cc to gcc and cxx to g++ ARG CC=gcc -# or clang++ ARG CXX=g++ FROM ubuntu:${UBUNTU_VERSION} AS base @@ -53,8 +55,6 @@ RUN apt-get -y update; \ pip install cython; - - FROM base as external_deps ARG build_dir @@ -89,7 +89,9 @@ RUN cd ${geant4_build_dir} && \ cd && \ rm -rf ${geant4_build_dir} -# these don't appear to be used yet +# these two double down ENVs don't appear to be used yet +# However they were in orginal dockerfile, so they have been kept +# TODO add double down to the dockerfile ENV double_down_build_dir=${build_dir}/double-down/ ENV double_down_install_dir=${install_dir}/double-down/ @@ -119,7 +121,6 @@ ARG HDF5_VERSION_major ARG CC ARG CXX -# Set HDF5 env variable ENV hdf5_build_dir=${build_dir}/hdf5 ENV hdf5_install_dir=${install_dir}/hdf5 From 5255950082fc2e668e0cf9171632606bea7e060f Mon Sep 17 00:00:00 2001 From: shimwell Date: Mon, 25 Jul 2022 23:59:27 +0100 Subject: [PATCH 03/49] added PR 817 --- doc/CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 0cbcc6a5e1..abbd7f9f0d 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -10,6 +10,7 @@ Next version **Changed:** * Using multi stage Dockerfile to reduce the number of Dockerfile (#813) + * Move install scripts into Dockerfile (#817) v3.2.2 From 14a929150920f2a7969edc8484053cbdb2889111 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:07:36 +0100 Subject: [PATCH 04/49] [skip ci] compile cores review suggestion by @gonuke Co-authored-by: Paul Wilson --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index f23b87e5c1..92e6d89724 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -107,7 +107,7 @@ RUN mkdir EMBREE && \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ -DEMBREE_TUTORIALS=OFF \ -DEMBREE_TBB_ROOT=/usr && \ - make -j2 && make -j2 install && \ + make -j${ci_jobs} && make -j${ci_jobs} install && \ rm -rf $HOME/EMBREE/embree From ad88096b9074cd6d08de1ebed525deebcfa16efd Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:13:04 +0100 Subject: [PATCH 05/49] [skip ci] removed compiler arg fully --- CI/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 92e6d89724..8f87339c69 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -58,8 +58,7 @@ RUN apt-get -y update; \ FROM base as external_deps ARG build_dir -ARG install_dir -ARG COMPILER +ARG install_dir ARG ci_jobs ARG geant4_version ARG CC From 8c8d57936fc1e5c9c54045cd8acce7f7655cf7d7 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:26:39 +0100 Subject: [PATCH 06/49] more consistent dirs for build --- CI/Dockerfile | 78 +++++++++++++++++++++++++++------------------------ 1 file changed, 41 insertions(+), 37 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 8f87339c69..f3f057e421 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,5 +1,7 @@ # Svalinn DAGMC Dockerfile +# build this docker file + ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 @@ -71,18 +73,18 @@ ENV geant4_shasum=2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -RUN mkdir -p ${geant4_build_dir}/bld +RUN mkdir -p ${geant4_build_dir}/build RUN cd ${geant4_build_dir} && \ wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${geant4_version}/${geant4_tarball} --no-check-certificate && \ tar -xzf ${geant4_tarball} && \ - cd bld && \ - cmake ../${geant4_basename} -DBUILD_STATIC_LIBS=ON \ - -DGEANT4_USE_SYSTEM_EXPAT=OFF \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \ - -DCMAKE_INSTALL_PREFIX=${geant4_install_dir} && \ + cd build && \ + cmake ../${geant4_basename} -DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \ + -DCMAKE_INSTALL_PREFIX=${geant4_install_dir} \ + -DGEANT4_USE_SYSTEM_EXPAT=OFF \ + -DCMAKE_BUILD_TYPE=Release \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_C_COMPILER=${CC} \ + -DBUILD_STATIC_LIBS=ON && \ make -j${ci_jobs} && \ make install && \ cd && \ @@ -95,18 +97,20 @@ ENV double_down_build_dir=${build_dir}/double-down/ ENV double_down_install_dir=${install_dir}/double-down/ ENV embree_install_dir=${install_dir}/embree +ENV embree_build_dir=${build_dir}/embree -RUN mkdir EMBREE && \ - cd EMBREE && \ +RUN mkdir -p ${hdf5_build_dir}/build && \ + cd ${hdf5_build_dir} && \ git clone -b ${EMBREE_BRANCH} https://github.com/embree/embree && \ mkdir build && \ cd build && \ cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ - -DEMBREE_ISPC_SUPPORT=OFF \ - -DEMBREE_TASKING_SYSTEM=INTERNAL \ - -DEMBREE_TUTORIALS=OFF \ - -DEMBREE_TBB_ROOT=/usr && \ - make -j${ci_jobs} && make -j${ci_jobs} install && \ + -DEMBREE_TASKING_SYSTEM=INTERNAL \ + -DEMBREE_ISPC_SUPPORT=OFF \ + -DEMBREE_TUTORIALS=OFF \ + -DEMBREE_TBB_ROOT=/usr && \ + make -j${ci_jobs} && \ + make -j${ci_jobs} install && \ rm -rf $HOME/EMBREE/embree @@ -123,15 +127,15 @@ ARG CXX ENV hdf5_build_dir=${build_dir}/hdf5 ENV hdf5_install_dir=${install_dir}/hdf5 -RUN mkdir -p ${hdf5_build_dir}/bld && \ +RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ wget https://support.hdfgroup.org/ftp/HDF5/releases/hdf5-${HDF5_VERSION_major}/hdf5-${HDF5_VERSION}/src/hdf5-${HDF5_VERSION}.tar.gz && \ tar -xzf hdf5-${HDF5_VERSION}.tar.gz && \ - cd bld && \ + cd build && \ ../hdf5-${HDF5_VERSION}/configure --enable-shared \ --prefix=${hdf5_install_dir} \ - CC=${CC} \ - CXX=${CXX} && \ + CXX=${CXX} \ + CC=${CC} && \ make -j${ci_jobs} && \ make install && \ cd && \ @@ -151,29 +155,29 @@ ARG install_dir ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab -RUN mkdir -p ${moab_build_dir}/bld +RUN mkdir -p ${moab_build_dir}/build RUN cd ${moab_build_dir} && \ git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ - cd bld && \ + cd build && \ cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ - -DENABLE_BLASLAPACK=OFF \ - -DENABLE_FORTRAN=OFF \ - -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DBUILD_SHARED_LIBS=OFF && \ + -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_C_COMPILER=${CC} \ + -DENABLE_BLASLAPACK=OFF \ + -DBUILD_SHARED_LIBS=OFF \ + -DENABLE_FORTRAN=OFF && \ make -j${ci_jobs} && \ make install && \ rm -rf * && \ - cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ - -DENABLE_PYMOAB=ON \ - -DENABLE_BLASLAPACK=OFF \ - -DENABLE_FORTRAN=OFF \ - -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DBUILD_SHARED_LIBS=ON \ - -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib && \ + cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib && \ + -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ + -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_C_COMPILER=${CC} \ + -DENABLE_BLASLAPACK=OFF \ + -DBUILD_SHARED_LIBS=ON \ + -DENABLE_FORTRAN=OFF \ + -DENABLE_PYMOAB=ON \ # ensure that the installation directory for python packages exist for d in $(echo $PYTHONPATH | tr : '\n'); do mkdir -p $d; done && \ make -j${ci_jobs} && \ From 21af7e74566da3d179ab9f47a7d976619efd136a Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:33:55 +0100 Subject: [PATCH 07/49] ordering and intenting args --- CI/Dockerfile | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index f3f057e421..ec2cb50df5 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,7 +1,5 @@ # Svalinn DAGMC Dockerfile -# build this docker file - ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 @@ -22,11 +20,13 @@ ARG install_dir=/root/opt ARG CC=gcc ARG CXX=g++ + FROM ubuntu:${UBUNTU_VERSION} AS base # Use bash as the default shell SHELL ["/bin/bash", "-c"] -# Ubuntu Setup + +# timezone setup ENV TZ=America/Chicago RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone @@ -59,13 +59,14 @@ RUN apt-get -y update; \ FROM base as external_deps -ARG build_dir +# accessing gloabl ARGs in build stage +ARG geant4_version +ARG EMBREE_BRANCH ARG install_dir +ARG build_dir ARG ci_jobs -ARG geant4_version -ARG CC ARG CXX -ARG EMBREE_BRANCH +ARG CC ENV geant4_basename=geant4-v${geant4_version} ENV geant4_tarball=${geant4_basename}.tar.gz @@ -116,13 +117,14 @@ RUN mkdir -p ${hdf5_build_dir}/build && \ FROM external_deps AS hdf5 -ARG build_dir +# accessing gloabl ARGs in build stage +ARG HDF5_VERSION_major +ARG HDF5_VERSION ARG install_dir +ARG build_dir ARG ci_jobs -ARG HDF5_VERSION -ARG HDF5_VERSION_major -ARG CC ARG CXX +ARG CC ENV hdf5_build_dir=${build_dir}/hdf5 ENV hdf5_install_dir=${install_dir}/hdf5 @@ -144,12 +146,13 @@ RUN mkdir -p ${hdf5_build_dir}/build && \ FROM hdf5 AS moab -ARG ci_jobs +# accessing gloabl ARGs in build stage +ARG install_dir ARG MOAB_BRANCH -ARG CC -ARG CXX ARG build_dir -ARG install_dir +ARG ci_jobs +ARG CXX +ARG CC # Set MOAB env variable ENV moab_build_dir=${build_dir}/moab @@ -169,7 +172,7 @@ RUN cd ${moab_build_dir} && \ make -j${ci_jobs} && \ make install && \ rm -rf * && \ - cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib && \ + cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ -DCMAKE_CXX_COMPILER=${CXX} \ @@ -177,7 +180,7 @@ RUN cd ${moab_build_dir} && \ -DENABLE_BLASLAPACK=OFF \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ - -DENABLE_PYMOAB=ON \ + -DENABLE_PYMOAB=ON && \ # ensure that the installation directory for python packages exist for d in $(echo $PYTHONPATH | tr : '\n'); do mkdir -p $d; done && \ make -j${ci_jobs} && \ From 5571c7a0bdc8a11bfe87e19da93c1800e8691232 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:34:13 +0100 Subject: [PATCH 08/49] reduced layers --- CI/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index ec2cb50df5..0bbc2a4c2b 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -74,8 +74,8 @@ ENV geant4_shasum=2397eb859dc4de095ff66059d8bda9f060fdc42e10469dd7890946293eeb0e ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -RUN mkdir -p ${geant4_build_dir}/build -RUN cd ${geant4_build_dir} && \ +RUN mkdir -p ${geant4_build_dir}/build && \ + cd ${geant4_build_dir} && \ wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${geant4_version}/${geant4_tarball} --no-check-certificate && \ tar -xzf ${geant4_tarball} && \ cd build && \ @@ -158,8 +158,8 @@ ARG CC ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab -RUN mkdir -p ${moab_build_dir}/build -RUN cd ${moab_build_dir} && \ +RUN mkdir -p ${moab_build_dir}/build && \ + cd ${moab_build_dir} && \ git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ cd build && \ cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ From 5cdad9aafe3caa8174aeb500fb675c94c0ac1a2d Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:37:08 +0100 Subject: [PATCH 09/49] added missing hdf5 install dir env --- CI/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CI/Dockerfile b/CI/Dockerfile index 0bbc2a4c2b..6cb92bfc75 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -158,6 +158,9 @@ ARG CC ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab +# Set the hdf5 install dir as this is also needed by moab compile +ENV hdf5_install_dir=${install_dir}/hdf5 + RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ From e331db4a780a49578ee969efcdff368f06b8c043 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:41:14 +0100 Subject: [PATCH 10/49] commented out moab static build --- CI/Dockerfile | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 6cb92bfc75..63b779be7e 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -165,16 +165,17 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ cd build && \ - cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ - -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_C_COMPILER=${CC} \ - -DENABLE_BLASLAPACK=OFF \ - -DBUILD_SHARED_LIBS=OFF \ - -DENABLE_FORTRAN=OFF && \ - make -j${ci_jobs} && \ - make install && \ - rm -rf * && \ + # static building of moab is also an option and was required for older versions + # cmake ../moab -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ + # -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ + # -DCMAKE_CXX_COMPILER=${CXX} \ + # -DCMAKE_C_COMPILER=${CC} \ + # -DENABLE_BLASLAPACK=OFF \ + # -DBUILD_SHARED_LIBS=OFF \ + # -DENABLE_FORTRAN=OFF && \ + # make -j${ci_jobs} && \ + # make install && \ + # rm -rf * && \ cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ -DENABLE_HDF5=ON -DHDF5_ROOT=${hdf5_install_dir} \ -DCMAKE_INSTALL_PREFIX=${moab_install_dir} \ From 8507e48f4a00d67e432f4d0d2c4c12111caa8fe2 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:42:59 +0100 Subject: [PATCH 11/49] corrected embree dirs --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 63b779be7e..e9399ec527 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -100,8 +100,8 @@ ENV double_down_install_dir=${install_dir}/double-down/ ENV embree_install_dir=${install_dir}/embree ENV embree_build_dir=${build_dir}/embree -RUN mkdir -p ${hdf5_build_dir}/build && \ - cd ${hdf5_build_dir} && \ +RUN mkdir -p ${embree_build_dir}/build && \ + cd ${embree_build_dir} && \ git clone -b ${EMBREE_BRANCH} https://github.com/embree/embree && \ mkdir build && \ cd build && \ From 75d2419e50fd5205794681d8ef84f9121fe1d093 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:44:37 +0100 Subject: [PATCH 12/49] using embree dir in rm -rf cmd --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index e9399ec527..44a85d9c52 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -112,7 +112,7 @@ RUN mkdir -p ${embree_build_dir}/build && \ -DEMBREE_TBB_ROOT=/usr && \ make -j${ci_jobs} && \ make -j${ci_jobs} install && \ - rm -rf $HOME/EMBREE/embree + rm -rf ${embree_build_dir} FROM external_deps AS hdf5 From 3881de6197f24b9cacc225ae1d7d50f949426297 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 18 Aug 2022 16:45:25 +0100 Subject: [PATCH 13/49] cd to safe place --- CI/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/Dockerfile b/CI/Dockerfile index 44a85d9c52..c8af1b5989 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -112,6 +112,7 @@ RUN mkdir -p ${embree_build_dir}/build && \ -DEMBREE_TBB_ROOT=/usr && \ make -j${ci_jobs} && \ make -j${ci_jobs} install && \ + cd && \ rm -rf ${embree_build_dir} From 85884d6a87ba6978fb852b69b0a364e9210b1ed9 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Fri, 19 Aug 2022 17:44:28 +0100 Subject: [PATCH 14/49] removed 2nd mkdir build in embree compile --- CI/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index c8af1b5989..7884bf0222 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -103,7 +103,6 @@ ENV embree_build_dir=${build_dir}/embree RUN mkdir -p ${embree_build_dir}/build && \ cd ${embree_build_dir} && \ git clone -b ${EMBREE_BRANCH} https://github.com/embree/embree && \ - mkdir build && \ cd build && \ cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ From d4723f89ce221e4725691612016708f498c3a34b Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 23 Aug 2022 20:43:28 +0100 Subject: [PATCH 15/49] remove env for dag --- CI/Dockerfile | 8 -------- 1 file changed, 8 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 7884bf0222..0c3a36f111 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -192,12 +192,4 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd && \ rm -rf ${moab_build_dir} -ENV dagmc_build_dir=${build_dir}/DAGMC -ENV dagmc_install_dir=${install_dir}/DAGMC - -ENV dagmc_build_dir_shared=${dagmc_build_dir}-shared -ENV dagmc_install_dir_shared=${dagmc_install_dir}-shared - -ENV dagmc_build_dir_static=${dagmc_build_dir}-static -ENV dagmc_install_dir_static=${dagmc_install_dir}-static From 7c93d5dab4e016f63da4138cb5ca6697dc6c4316 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 24 Aug 2022 19:58:46 +0100 Subject: [PATCH 16/49] Remove making python path folders --- CI/Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 0c3a36f111..b91e310aaf 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -185,8 +185,6 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - # ensure that the installation directory for python packages exist - for d in $(echo $PYTHONPATH | tr : '\n'); do mkdir -p $d; done && \ make -j${ci_jobs} && \ make install && \ cd && \ From 421e7ad2daeaabd5f31b29fb8e115ed613b2f0c2 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 27 Aug 2022 15:15:38 -0500 Subject: [PATCH 17/49] prepend pythonpath as fix for MOAB build --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index b91e310aaf..411b1f28a2 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -185,7 +185,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - make -j${ci_jobs} && \ + PYTHONPATH=${moab_build_dir}/pymoab/lib/python3.6/site-packages make -j${ci_jobs} && \ make install && \ cd && \ rm -rf ${moab_build_dir} From 48a97a06fbfe2d816ed7e5c7e5dad6dd8cf37d00 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 27 Aug 2022 15:16:58 -0500 Subject: [PATCH 18/49] keep previous pythonpath as well --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 411b1f28a2..676296ae0a 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -185,7 +185,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - PYTHONPATH=${moab_build_dir}/pymoab/lib/python3.6/site-packages make -j${ci_jobs} && \ + PYTHONPATH=${moab_build_dir}/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make -j${ci_jobs} && \ make install && \ cd && \ rm -rf ${moab_build_dir} From f77d7215f3cb6dd9444b31523a3305e46133d5db Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sat, 27 Aug 2022 15:18:51 -0500 Subject: [PATCH 19/49] whitespace change to changelog --- doc/CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 6f545e7a93..f4c5625271 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -12,7 +12,7 @@ Next version * Using multi stage Dockerfile to reduce the number of Dockerfile (#813) * Adding safe folder to allow CI to compile DAGMC (#814) * Correction to CMake variable name in OpenMC install instructions (#817) - * Move install scripts into Dockerfile (#822) + * Move install scripts into Dockerfile (#822) * Updating documentation publishing URL (#823) From dc2945cc852cd3ef35c471f1fcf72a76aecd1578 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Sun, 28 Aug 2022 14:04:12 -0500 Subject: [PATCH 20/49] correct pythonpath --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 676296ae0a..bbfa1bab6a 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -185,7 +185,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - PYTHONPATH=${moab_build_dir}/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make -j${ci_jobs} && \ + PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make -j${ci_jobs} && \ make install && \ cd && \ rm -rf ${moab_build_dir} From de0f876ce01eaa353b76cbf529c3d308186a2067 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 05:52:54 -0500 Subject: [PATCH 21/49] need to mkdir for temp install --- CI/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/Dockerfile b/CI/Dockerfile index bbfa1bab6a..3af3cdf1f0 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -185,6 +185,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ + mkdir -p ${moab_build_dir}/build/pymoab/lib/python3.6/site-packages && \ PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make -j${ci_jobs} && \ make install && \ cd && \ From 0b20fb3ebe9099627ef7b250648c9cb6a63b75d2 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 12:56:43 -0500 Subject: [PATCH 22/49] add pythonpath for install as well --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 3af3cdf1f0..f1c471e400 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -187,7 +187,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DENABLE_PYMOAB=ON && \ mkdir -p ${moab_build_dir}/build/pymoab/lib/python3.6/site-packages && \ PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make -j${ci_jobs} && \ - make install && \ + PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make install && \ cd && \ rm -rf ${moab_build_dir} From 10162c56bb8c67e80f5973d9bf33bf9301a2e88f Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 20:41:05 -0500 Subject: [PATCH 23/49] comment out env source b/c it should all be in docker image --- CI/scripts/housekeeping.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/scripts/housekeeping.sh b/CI/scripts/housekeeping.sh index d4ac1d9a9c..0e44feb414 100755 --- a/CI/scripts/housekeeping.sh +++ b/CI/scripts/housekeeping.sh @@ -2,7 +2,7 @@ set -ex -source ${docker_env} +#source ${docker_env} cd ${dagmc_build_dir} From da899cc71cc5cb9e89b5d3b1a6cf1e5fcafdd18a Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 20:52:38 -0500 Subject: [PATCH 24/49] Add build and install dir to the environment --- CI/Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CI/Dockerfile b/CI/Dockerfile index f1c471e400..ae05906d0e 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -56,6 +56,11 @@ RUN apt-get -y update; \ update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10; \ pip install cython; +ARG build_dir +ARG install_dir + +ENV build_dir=${build_dir} +ENV install_dir=${install_dir} FROM base as external_deps From 5a84ef1fb5cc56dc80c7f77f9ea4211650aa15e6 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 20:53:44 -0500 Subject: [PATCH 25/49] define build_dir from env --- CI/scripts/housekeeping.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/CI/scripts/housekeeping.sh b/CI/scripts/housekeeping.sh index 0e44feb414..4032cc9971 100755 --- a/CI/scripts/housekeeping.sh +++ b/CI/scripts/housekeeping.sh @@ -4,6 +4,7 @@ set -ex #source ${docker_env} +export dagmc_build_dir=${build_dir}/dagmc cd ${dagmc_build_dir} # Ensure clang-format is there From f5c70dd09cdb016e10241a40ad576e03d3301d01 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Mon, 29 Aug 2022 21:06:10 -0500 Subject: [PATCH 26/49] read build dir from the env --- CI/scripts/housekeeping.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/CI/scripts/housekeeping.sh b/CI/scripts/housekeeping.sh index 4032cc9971..ea19bd40da 100755 --- a/CI/scripts/housekeeping.sh +++ b/CI/scripts/housekeeping.sh @@ -2,8 +2,6 @@ set -ex -#source ${docker_env} - export dagmc_build_dir=${build_dir}/dagmc cd ${dagmc_build_dir} From 488bf87613b120fa8316186493a674e4a6586ee8 Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Tue, 30 Aug 2022 05:40:29 -0500 Subject: [PATCH 27/49] workflow changes to correct directory --- CI/scripts/housekeeping.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/CI/scripts/housekeeping.sh b/CI/scripts/housekeeping.sh index ea19bd40da..552c39f1ae 100755 --- a/CI/scripts/housekeeping.sh +++ b/CI/scripts/housekeeping.sh @@ -2,9 +2,6 @@ set -ex -export dagmc_build_dir=${build_dir}/dagmc -cd ${dagmc_build_dir} - # Ensure clang-format is there if ! command -v clang-format &> /dev/null then From 5340950645833bddd87d20d4ea7e663af9d58ded Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 1 Jan 2023 20:33:16 +0000 Subject: [PATCH 28/49] moved hdf5_install_dir to global ARGs --- CI/Dockerfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index ae05906d0e..bf358a4688 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,5 +1,6 @@ # Svalinn DAGMC Dockerfile +# Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 @@ -13,6 +14,8 @@ ARG HDF5_VERSION_major=1.10 ARG build_dir=/root/build_dir ARG install_dir=/root/opt +# hdf5_install_dir is needed by moab and hdf5 build stages +ARG hdf5_install_dir=${install_dir}/hdf5 # clang and gcc are options for the compiler but to use them CC and CXX must be set # if clang then change cc to clang and cxx to clang++ @@ -124,6 +127,7 @@ FROM external_deps AS hdf5 # accessing gloabl ARGs in build stage ARG HDF5_VERSION_major +ARG hdf5_install_dir ARG HDF5_VERSION ARG install_dir ARG build_dir @@ -132,7 +136,6 @@ ARG CXX ARG CC ENV hdf5_build_dir=${build_dir}/hdf5 -ENV hdf5_install_dir=${install_dir}/hdf5 RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ @@ -152,6 +155,7 @@ RUN mkdir -p ${hdf5_build_dir}/build && \ FROM hdf5 AS moab # accessing gloabl ARGs in build stage +ARG hdf5_install_dir ARG install_dir ARG MOAB_BRANCH ARG build_dir @@ -163,9 +167,6 @@ ARG CC ENV moab_build_dir=${build_dir}/moab ENV moab_install_dir=${install_dir}/moab -# Set the hdf5 install dir as this is also needed by moab compile -ENV hdf5_install_dir=${install_dir}/hdf5 - RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ @@ -195,5 +196,3 @@ RUN mkdir -p ${moab_build_dir}/build && \ PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make install && \ cd && \ rm -rf ${moab_build_dir} - - From 1b438e8bff2fa53923a8ade99185e6a99db057be Mon Sep 17 00:00:00 2001 From: shimwell Date: Sun, 1 Jan 2023 22:28:29 +0000 Subject: [PATCH 29/49] single ENV entry used in multiple stages --- CI/Dockerfile | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index bf358a4688..fb848d9c11 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -4,7 +4,7 @@ ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 -ARG MOAB_BRANCH=5.4.0 +ARG MOAB_BRANCH=5.4.1 ARG EMBREE_BRANCH='v3.6.1' ARG geant4_version=10.5.1 @@ -14,8 +14,6 @@ ARG HDF5_VERSION_major=1.10 ARG build_dir=/root/build_dir ARG install_dir=/root/opt -# hdf5_install_dir is needed by moab and hdf5 build stages -ARG hdf5_install_dir=${install_dir}/hdf5 # clang and gcc are options for the compiler but to use them CC and CXX must be set # if clang then change cc to clang and cxx to clang++ @@ -127,7 +125,6 @@ FROM external_deps AS hdf5 # accessing gloabl ARGs in build stage ARG HDF5_VERSION_major -ARG hdf5_install_dir ARG HDF5_VERSION ARG install_dir ARG build_dir @@ -136,6 +133,7 @@ ARG CXX ARG CC ENV hdf5_build_dir=${build_dir}/hdf5 +ENV hdf5_install_dir=${install_dir}/hdf5 RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ @@ -155,7 +153,6 @@ RUN mkdir -p ${hdf5_build_dir}/build && \ FROM hdf5 AS moab # accessing gloabl ARGs in build stage -ARG hdf5_install_dir ARG install_dir ARG MOAB_BRANCH ARG build_dir From 28a5cbfc50db8c4f0887f23c86559014e47e452a Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 5 Jan 2023 14:31:00 +0000 Subject: [PATCH 30/49] moab to 5.3.0 --- .github/workflows/docker_publish.yml | 2 +- CI/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 18c03c4576..7dc819e506 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -163,7 +163,7 @@ jobs: 1.10.4, ] moab_versions : [ - 5.4.0, + 5.3.0, develop, master, ] diff --git a/CI/Dockerfile b/CI/Dockerfile index fb848d9c11..f70adddb4c 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -4,7 +4,7 @@ ARG UBUNTU_VERSION=18.04 ARG ci_jobs=8 -ARG MOAB_BRANCH=5.4.1 +ARG MOAB_BRANCH=5.3.0 ARG EMBREE_BRANCH='v3.6.1' ARG geant4_version=10.5.1 From ebeaf5957f550a84cb1e287c7df5b1d379b873fb Mon Sep 17 00:00:00 2001 From: shimwell Date: Thu, 5 Jan 2023 23:09:27 +0000 Subject: [PATCH 31/49] [skip ci] added double-down install, started adding dagmc stage --- CI/Dockerfile | 51 +++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 45 insertions(+), 6 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index f70adddb4c..af0ed52a70 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -2,7 +2,9 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=18.04 - +ARG build_mw_reg_tests=OFF +ARG double_down=ON +ARG static_exe=OFF ARG ci_jobs=8 ARG MOAB_BRANCH=5.3.0 ARG EMBREE_BRANCH='v3.6.1' @@ -97,15 +99,11 @@ RUN mkdir -p ${geant4_build_dir}/build && \ cd && \ rm -rf ${geant4_build_dir} -# these two double down ENVs don't appear to be used yet -# However they were in orginal dockerfile, so they have been kept -# TODO add double down to the dockerfile -ENV double_down_build_dir=${build_dir}/double-down/ -ENV double_down_install_dir=${install_dir}/double-down/ ENV embree_install_dir=${install_dir}/embree ENV embree_build_dir=${build_dir}/embree +# Clone and install Embree RUN mkdir -p ${embree_build_dir}/build && \ cd ${embree_build_dir} && \ git clone -b ${EMBREE_BRANCH} https://github.com/embree/embree && \ @@ -120,6 +118,19 @@ RUN mkdir -p ${embree_build_dir}/build && \ cd && \ rm -rf ${embree_build_dir} +ENV double_down_build_dir=${build_dir}/double-down/ +ENV double_down_install_dir=${install_dir}/double-down/ + +# Clone and install Double-Down +RUN git clone --shallow-submodules --single-branch --branch v1.0.0 --depth 1 https://github.com/pshriwise/double-down.git && \ + cd {double_down_build_dir} && \ + mkdir build && \ + cd build && \ + cmake .. -DMOAB_DIR=/MOAB \ + -DCMAKE_INSTALL_PREFIX=${double_down_install_dir} \ + -DEMBREE_DIR=${embree_install_dir} \ + make -j"$compile_cores" && \ + make -j"$compile_cores" install FROM external_deps AS hdf5 @@ -193,3 +204,31 @@ RUN mkdir -p ${moab_build_dir}/build && \ PYTHONPATH=${moab_build_dir}/build/pymoab/lib/python3.6/site-packages:${PYTHONPATH} make install && \ cd && \ rm -rf ${moab_build_dir} + +FROM moab as dagmc + +ARG build_mw_reg_tests +ARG install_dir +ARG static_exe + +COPY src/ ${build_dir} + +RUN mkdir ${dagmc_build_dir} && \ + cd dagmc_build_dir && \ + mkdir build && \ + cd build && \ + cmake ${dagmc_build_dir} -DMOAB_DIR=${moab_install_dir} \ + -DBUILD_GEANT4=ON \ + -DGEANT4_DIR=${geant4_install_dir} \ + -DBUILD_CI_TESTS=ON \ + -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ + -DBUILD_STATIC_EXE=${static_exe} \ + -DBUILD_STATIC_LIBS=${static_exe} \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=${install_dir} \ + -DDOUBLE_DOWN=${double_down} \ + -Ddd_ROOT=${double_down_install_dir} && \ + make -j${ci_jobs} && \ + make install \ No newline at end of file From 6b89dd2d645d02e695e57d0b25f6e2ea2bd130dd Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Fri, 6 Jan 2023 12:52:07 +0000 Subject: [PATCH 32/49] building and testing dagmc in docker --- .github/workflows/docker_publish.yml | 45 ++++++++-------- CI/Dockerfile | 78 +++++++++++++++++++--------- 2 files changed, 74 insertions(+), 49 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 7dc819e506..433b286e40 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -257,6 +257,10 @@ jobs: develop, master, ] + static_exe : [ + OFF, + ON, + ] container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing name: Installing and Testing DAGMC @@ -266,30 +270,23 @@ jobs: with: submodules: recursive - - name: Setup - run: | - git config --global --add safe.directory ${GITHUB_WORKSPACE} - git config --global --add safe.directory /github/home/ - git config --global --add safe.directory /github/home/.cache - git config --global --add safe.directory /github/home/.cache/pip - git config --global --add safe.directory /github/home/.cache/pip/http - echo "MOAB_VERSION=${{ matrix.moab_versions }}" >> $GITHUB_ENV - echo "COMPILER=${{ matrix.compiler }}" >> $GITHUB_ENV - echo "HDF5_VERSION=${{ matrix.hdf5_versions }}" >> $GITHUB_ENV - echo "REPO_SLUG=${GITHUB_REPOSITORY}" >> $GITHUB_ENV - echo "PULL_REQUEST=$(echo $GITHUB_REF | cut -d"/" -f3)" >> $GITHUB_ENV - echo "DOUBLE_DOWN="OFF"" >> $GITHUB_ENV - ln -s $GITHUB_WORKSPACE /root/build_dir/DAGMC - - - name: Install DAGMC - run: | - cd $GITHUB_WORKSPACE - /bin/bash "CI/scripts/install.sh" - - - name: Run DAGMC Test - run: | - cd $GITHUB_WORKSPACE - /bin/bash "CI/scripts/tests.sh" + - name: Install DAGMC in Docker image and test + uses: docker/build-push-action@v2 + with: + file: CI/Dockerfile + target: dagmc_test + context: . + push: false + build-args: | + OWNER=${{ github.repository_owner }} + TAG=ci_testing + UBUNTU_VERSION=${{ matrix.ubuntu_versions }} + COMPILER=${{ matrix.compiler }} + HDF5=${{ matrix.hdf5_versions }} + MOAB=${{ matrix.moab_versions }} + static_exe=OFF + build_mw_reg_tests=ON + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-static_exe_dagmc_${{ matrix.static_exe }}:ci_testing pushing_housekeeping_stable_img: if: ${{ github.repository_owner == 'svalinn' }} diff --git a/CI/Dockerfile b/CI/Dockerfile index af0ed52a70..73f10bf311 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,17 +1,17 @@ # Svalinn DAGMC Dockerfile # Global ARGS set before the first build stage are accessable by all build stages -ARG UBUNTU_VERSION=18.04 ARG build_mw_reg_tests=OFF -ARG double_down=ON -ARG static_exe=OFF -ARG ci_jobs=8 -ARG MOAB_BRANCH=5.3.0 ARG EMBREE_BRANCH='v3.6.1' ARG geant4_version=10.5.1 +ARG UBUNTU_VERSION=18.04 +ARG MOAB_BRANCH=5.3.0 +ARG double_down=OFF +ARG static_exe=OFF +ARG ci_jobs=20 ARG HDF5_VERSION=1.10.4 -# currently major version must be manually set to match HDF5 version +# currently HDF5 major version must be manually set to match HDF5 version ARG HDF5_VERSION_major=1.10 ARG build_dir=/root/build_dir @@ -65,6 +65,7 @@ ARG install_dir ENV build_dir=${build_dir} ENV install_dir=${install_dir} + FROM base as external_deps # accessing gloabl ARGs in build stage @@ -118,19 +119,6 @@ RUN mkdir -p ${embree_build_dir}/build && \ cd && \ rm -rf ${embree_build_dir} -ENV double_down_build_dir=${build_dir}/double-down/ -ENV double_down_install_dir=${install_dir}/double-down/ - -# Clone and install Double-Down -RUN git clone --shallow-submodules --single-branch --branch v1.0.0 --depth 1 https://github.com/pshriwise/double-down.git && \ - cd {double_down_build_dir} && \ - mkdir build && \ - cd build && \ - cmake .. -DMOAB_DIR=/MOAB \ - -DCMAKE_INSTALL_PREFIX=${double_down_install_dir} \ - -DEMBREE_DIR=${embree_install_dir} \ - make -j"$compile_cores" && \ - make -j"$compile_cores" install FROM external_deps AS hdf5 @@ -205,19 +193,43 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd && \ rm -rf ${moab_build_dir} +ENV double_down_build_dir=${build_dir}/double-down +ENV double_down_install_dir=${install_dir}/double-down + +# Clone and install Double-Down +# performed after moab install as double-down requires moab +RUN mkdir -p ${double_down_build_dir}/build && \ + cd ${double_down_build_dir} && \ + git clone --shallow-submodules --single-branch --branch v1.0.0 --depth 1 https://github.com/pshriwise/double-down.git && \ + cd build && \ + cmake ../double-down -DMOAB_DIR=${moab_install_dir} \ + -DCMAKE_INSTALL_PREFIX=${double_down_install_dir} \ + -DEMBREE_DIR=${embree_install_dir} && \ + make -j${ci_jobs} && \ + make -j${ci_jobs} install + + FROM moab as dagmc +# accessing gloabl ARGs in build stage ARG build_mw_reg_tests ARG install_dir ARG static_exe +ARG CXX +ARG CC -COPY src/ ${build_dir} +ENV dagmc_build_dir=${build_dir}/dagmc +ENV dagmc_install_dir=${install_dir}/dagmc -RUN mkdir ${dagmc_build_dir} && \ - cd dagmc_build_dir && \ - mkdir build && \ +# copies the enitre git repo into the dockerfile to ensure the submodules can also be found +RUN mkdir -p ${dagmc_build_dir}/build +COPY . ${dagmc_build_dir} +RUN cd ${dagmc_build_dir} && git submodule update --init + +RUN mkdir -p ${dagmc_build_dir}/build && \ + cd ${dagmc_build_dir} && \ cd build && \ - cmake ${dagmc_build_dir} -DMOAB_DIR=${moab_install_dir} \ + cmake ../${dagmc} -DMOAB_DIR=${moab_install_dir} \ -DBUILD_GEANT4=ON \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ @@ -231,4 +243,20 @@ RUN mkdir ${dagmc_build_dir} && \ -DDOUBLE_DOWN=${double_down} \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${ci_jobs} && \ - make install \ No newline at end of file + make install + + +FROM dagmc as dagmc_test + +# Test DAGMC executables +RUN cd ${dagmc_build_dir}/build && \ + make test + +# clean out config test directory for next build +RUN cd ${dagmc_build_dir} && \ + git clean -dxf . + +# Test DAGMC CMake configuration file +RUN cd ${dagmc_build_dir}/cmake/test_config && \ + cmake . -DDAGMC_ROOT=${dagmc_install_dir} && \ + make all test From 48ae87a58d9a4d68215fbe3b48254ee0e8ac295c Mon Sep 17 00:00:00 2001 From: shimwell Date: Fri, 6 Jan 2023 23:13:18 +0000 Subject: [PATCH 33/49] removed static from tag --- .github/workflows/docker_publish.yml | 3 +-- CI/Dockerfile | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 433b286e40..06cf0c2569 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -284,9 +284,8 @@ jobs: COMPILER=${{ matrix.compiler }} HDF5=${{ matrix.hdf5_versions }} MOAB=${{ matrix.moab_versions }} - static_exe=OFF build_mw_reg_tests=ON - tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-static_exe_dagmc_${{ matrix.static_exe }}:ci_testing + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing pushing_housekeeping_stable_img: if: ${{ github.repository_owner == 'svalinn' }} diff --git a/CI/Dockerfile b/CI/Dockerfile index 73f10bf311..a37f9a573c 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -230,18 +230,18 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd ${dagmc_build_dir} && \ cd build && \ cmake ../${dagmc} -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=ON \ - -DGEANT4_DIR=${geant4_install_dir} \ - -DBUILD_CI_TESTS=ON \ - -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ - -DBUILD_STATIC_EXE=${static_exe} \ - -DBUILD_STATIC_LIBS=${static_exe} \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_INSTALL_PREFIX=${install_dir} \ - -DDOUBLE_DOWN=${double_down} \ - -Ddd_ROOT=${double_down_install_dir} && \ + -DBUILD_GEANT4=ON \ + -DGEANT4_DIR=${geant4_install_dir} \ + -DBUILD_CI_TESTS=ON \ + -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ + -DBUILD_STATIC_EXE=${static_exe} \ + -DBUILD_STATIC_LIBS=${static_exe} \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=${install_dir} \ + -DDOUBLE_DOWN=${double_down} \ + -Ddd_ROOT=${double_down_install_dir} && \ make -j${ci_jobs} && \ make install From 0ff7d8546fff36c6c05d397e47129c6e7dc34af4 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Fri, 13 Jan 2023 16:14:08 +0000 Subject: [PATCH 34/49] corrected install dir typo --- CI/Dockerfile | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 73f10bf311..529df6332d 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -214,6 +214,7 @@ FROM moab as dagmc # accessing gloabl ARGs in build stage ARG build_mw_reg_tests ARG install_dir +ARG build_dir ARG static_exe ARG CXX ARG CC @@ -230,24 +231,27 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd ${dagmc_build_dir} && \ cd build && \ cmake ../${dagmc} -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=ON \ - -DGEANT4_DIR=${geant4_install_dir} \ - -DBUILD_CI_TESTS=ON \ - -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ - -DBUILD_STATIC_EXE=${static_exe} \ - -DBUILD_STATIC_LIBS=${static_exe} \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_INSTALL_PREFIX=${install_dir} \ - -DDOUBLE_DOWN=${double_down} \ - -Ddd_ROOT=${double_down_install_dir} && \ + -DBUILD_GEANT4=ON \ + -DGEANT4_DIR=${geant4_install_dir} \ + -DBUILD_CI_TESTS=ON \ + -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ + -DBUILD_STATIC_EXE=${static_exe} \ + -DBUILD_STATIC_LIBS=${static_exe} \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ + -DDOUBLE_DOWN=${double_down} \ + -Ddd_ROOT=${double_down_install_dir} && \ make -j${ci_jobs} && \ make install FROM dagmc as dagmc_test +ARG dagmc_build_dir +ARG dagmc_install_dir + # Test DAGMC executables RUN cd ${dagmc_build_dir}/build && \ make test From a30b95dc12cb160a5a366a839624df284dbd28e0 Mon Sep 17 00:00:00 2001 From: shimwell Date: Fri, 13 Jan 2023 23:46:26 +0000 Subject: [PATCH 35/49] updated actions --- .github/workflows/docker_publish.yml | 44 ++++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 06cf0c2569..d5ad1fccc1 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -25,17 +25,17 @@ jobs: uses: actions/checkout@v3 - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and Export Dockerfile_0_base - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: base @@ -57,10 +57,10 @@ jobs: steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} @@ -70,7 +70,7 @@ jobs: uses: actions/checkout@v3 - name: Build and push Dockerfile_1_housekeeping - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile_1_housekeeping context: . @@ -102,10 +102,10 @@ jobs: name: Ubuntu ${{ matrix.ubuntu_versions }} + ${{ matrix.compiler }} hdf5 ${{ matrix.hdf5_versions }} steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -115,7 +115,7 @@ jobs: uses: actions/checkout@v3 - name: Build and push Dockerfile_1_external_deps - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: external_deps @@ -129,7 +129,7 @@ jobs: tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext:ci_testing - name: Build and export Dockerfile_2_hdf5 - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: hdf5 @@ -172,10 +172,10 @@ jobs: steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} @@ -185,7 +185,7 @@ jobs: uses: actions/checkout@v3 - name: Build and push Dockerfile_3_moab - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: moab @@ -271,7 +271,7 @@ jobs: submodules: recursive - name: Install DAGMC in Docker image and test - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: dagmc_test @@ -301,23 +301,23 @@ jobs: name: Housekeeping':' latest -> stable steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Image as stable img - uses: akhilerm/tag-push-action@v1.0.0 + uses: akhilerm/tag-push-action@v2.1.0 with: src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-housekeeping:ci_testing dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-housekeeping:stable - name: Push Image as latest img - uses: akhilerm/tag-push-action@v1.0.0 + uses: akhilerm/tag-push-action@v2.1.0 with: src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-housekeeping:ci_testing dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-housekeeping:latest @@ -353,23 +353,23 @@ jobs: steps: - name: Set up QEMU - uses: docker/setup-qemu-action@v1 + uses: docker/setup-qemu-action@v2 - name: Log in to the Container registry - uses: docker/login-action@v1 + uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - name: Push Image as stable img - uses: akhilerm/tag-push-action@v1.0.0 + uses: akhilerm/tag-push-action@v2.1.0 with: src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:stable - name: Push Image as latest img - uses: akhilerm/tag-push-action@v1.0.0 + uses: akhilerm/tag-push-action@v2.1.0 with: src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest \ No newline at end of file From a872a23f2cc0b88c0c22482684687e1ccbdf1e3d Mon Sep 17 00:00:00 2001 From: shimwell Date: Sat, 14 Jan 2023 09:09:39 +0000 Subject: [PATCH 36/49] added docker buildx to step --- .github/workflows/docker_publish.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index d5ad1fccc1..e5eaedf80b 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -269,6 +269,9 @@ jobs: uses: actions/checkout@v3 with: submodules: recursive + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 - name: Install DAGMC in Docker image and test uses: docker/build-push-action@v3 From 92db99cade7f273f4c784c5319f8fe20915d20ff Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 19 Jan 2023 14:40:00 +0000 Subject: [PATCH 37/49] added path before make test cmd --- CI/Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 529df6332d..fa27fbd8f4 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -1,5 +1,7 @@ # Svalinn DAGMC Dockerfile + + # Global ARGS set before the first build stage are accessable by all build stages ARG build_mw_reg_tests=OFF ARG EMBREE_BRANCH='v3.6.1' @@ -254,7 +256,7 @@ ARG dagmc_install_dir # Test DAGMC executables RUN cd ${dagmc_build_dir}/build && \ - make test + PATH=${dagmc_install_dir}/bin:$PATH make test # clean out config test directory for next build RUN cd ${dagmc_build_dir} && \ From 97e1438fc42c63c4bd09492239ce66686203e905 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 2 Feb 2023 16:16:09 +0000 Subject: [PATCH 38/49] added inline CTEST_OUTPUT_ON_FAILURE=1 --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index fa27fbd8f4..f634fcd859 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -256,7 +256,7 @@ ARG dagmc_install_dir # Test DAGMC executables RUN cd ${dagmc_build_dir}/build && \ - PATH=${dagmc_install_dir}/bin:$PATH make test + PATH=${dagmc_install_dir}/bin:$PATH CTEST_OUTPUT_ON_FAILURE=1 make test # clean out config test directory for next build RUN cd ${dagmc_build_dir} && \ @@ -265,4 +265,4 @@ RUN cd ${dagmc_build_dir} && \ # Test DAGMC CMake configuration file RUN cd ${dagmc_build_dir}/cmake/test_config && \ cmake . -DDAGMC_ROOT=${dagmc_install_dir} && \ - make all test + CTEST_OUTPUT_ON_FAILURE=1 make all test From 26690987f3521ab412b4bed28aeffa1ef9fc87f5 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 6 Feb 2023 13:23:48 +0000 Subject: [PATCH 39/49] added ci stage for dagmc --- .github/workflows/docker_publish.yml | 64 ++++++++++++++++++++++++++-- 1 file changed, 61 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index e5eaedf80b..364b56f3ed 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -231,8 +231,8 @@ jobs: run: | cd $GITHUB_WORKSPACE /bin/bash "CI/scripts/housekeeping.sh" - - test_img: + + build-dagmc-img: needs: [build-moab-img] runs-on: ubuntu-latest env: @@ -263,6 +263,64 @@ jobs: ] container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing + name: Installing and Testing DAGMC + steps: + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Install DAGMC in Docker image and test + uses: docker/build-push-action@v3 + with: + file: CI/Dockerfile + target: dagmc + context: . + push: false + build-args: | + OWNER=${{ github.repository_owner }} + TAG=ci_testing + UBUNTU_VERSION=${{ matrix.ubuntu_versions }} + COMPILER=${{ matrix.compiler }} + HDF5=${{ matrix.hdf5_versions }} + MOAB=${{ matrix.moab_versions }} + build_mw_reg_tests=ON + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc:ci_testing + + test_img: + needs: [build-dagmc-img] + runs-on: ubuntu-latest + env: + hdf5_versions: 1.10.4 + hdf5_build_dir: hdf5_build_dir + + strategy: + matrix: + ubuntu_versions : [ + 18.04, + 20.04, + ] + compiler : [ + gcc, + clang, + ] + hdf5_versions : [ + 1.10.4, + ] + moab_versions : [ + 5.3.0, + develop, + master, + ] + static_exe : [ + OFF, + ON, + ] + container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc-test:ci_testing + name: Installing and Testing DAGMC steps: - name: Checkout repository @@ -375,4 +433,4 @@ jobs: uses: akhilerm/tag-push-action@v2.1.0 with: src: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing - dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest \ No newline at end of file + dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:latest From b25e3c8a373987979db5551e3e73933af81b2f82 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Mon, 6 Feb 2023 13:25:39 +0000 Subject: [PATCH 40/49] dagmc_dirs as ENV not ARGS --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index f634fcd859..40ac16190a 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -251,8 +251,8 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ FROM dagmc as dagmc_test -ARG dagmc_build_dir -ARG dagmc_install_dir +ENV dagmc_build_dir=${build_dir}/dagmc +ENV dagmc_install_dir=${install_dir}/dagmc # Test DAGMC executables RUN cd ${dagmc_build_dir}/build && \ From ad9c95c1a4e663c0bd8c48e81b1fedb4b81d8709 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 7 Feb 2023 09:44:17 +0000 Subject: [PATCH 41/49] corrected tag and container names --- .github/workflows/docker_publish.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 364b56f3ed..76a054d976 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -263,7 +263,7 @@ jobs: ] container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing - name: Installing and Testing DAGMC + name: Installing DAGMC steps: - name: Checkout repository uses: actions/checkout@v3 @@ -319,15 +319,15 @@ jobs: OFF, ON, ] - container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc-test:ci_testing + container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc:ci_testing - name: Installing and Testing DAGMC + name: Testing DAGMC steps: - name: Checkout repository uses: actions/checkout@v3 with: submodules: recursive - + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -346,7 +346,7 @@ jobs: HDF5=${{ matrix.hdf5_versions }} MOAB=${{ matrix.moab_versions }} build_mw_reg_tests=ON - tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing + tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc-test:ci_testing pushing_housekeeping_stable_img: if: ${{ github.repository_owner == 'svalinn' }} From 59e843ae5751c2a8e716ed1ab48f036412f15ea4 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Tue, 7 Feb 2023 17:08:38 +0000 Subject: [PATCH 42/49] pusing dagmc image so it can be found by testing image --- .github/workflows/docker_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 76a054d976..eba019be3e 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -279,7 +279,7 @@ jobs: file: CI/Dockerfile target: dagmc context: . - push: false + push: true build-args: | OWNER=${{ github.repository_owner }} TAG=ci_testing From 33f0e0754317e02a70d5ef37c9273e2c438df23a Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 8 Feb 2023 18:05:26 +0000 Subject: [PATCH 43/49] combining two steps --- .github/workflows/docker_publish.yml | 49 +++------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index eba019be3e..94a0779bff 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -232,7 +232,7 @@ jobs: cd $GITHUB_WORKSPACE /bin/bash "CI/scripts/housekeeping.sh" - build-dagmc-img: + build-test-dagmc-img: needs: [build-moab-img] runs-on: ubuntu-latest env: @@ -273,13 +273,13 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 - - name: Install DAGMC in Docker image and test + - name: Install DAGMC in Docker image uses: docker/build-push-action@v3 with: file: CI/Dockerfile target: dagmc context: . - push: true + push: false build-args: | OWNER=${{ github.repository_owner }} TAG=ci_testing @@ -290,48 +290,7 @@ jobs: build_mw_reg_tests=ON tags: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc:ci_testing - test_img: - needs: [build-dagmc-img] - runs-on: ubuntu-latest - env: - hdf5_versions: 1.10.4 - hdf5_build_dir: hdf5_build_dir - - strategy: - matrix: - ubuntu_versions : [ - 18.04, - 20.04, - ] - compiler : [ - gcc, - clang, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - 5.3.0, - develop, - master, - ] - static_exe : [ - OFF, - ON, - ] - container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}-dagmc:ci_testing - - name: Testing DAGMC - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Install DAGMC in Docker image and test + - name: Test DAGMC in Docker image uses: docker/build-push-action@v3 with: file: CI/Dockerfile From 051ec10981a2732faf95cb7aac5d7624e0d943be Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 8 Feb 2023 18:08:25 +0000 Subject: [PATCH 44/49] making use of qemu, removed buildx --- .github/workflows/docker_publish.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 94a0779bff..17e0d58b76 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -270,8 +270,8 @@ jobs: with: submodules: recursive - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 - name: Install DAGMC in Docker image uses: docker/build-push-action@v3 From 8e4da44ffadcbae4d32081d4d688dfae842da7db Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 8 Feb 2023 18:10:19 +0000 Subject: [PATCH 45/49] housebuilding only if build-test works --- .github/workflows/docker_publish.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 17e0d58b76..854222792f 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -264,15 +264,13 @@ jobs: container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing name: Installing DAGMC - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - + steps: - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Checkout repository + uses: actions/checkout@v3 + - name: Install DAGMC in Docker image uses: docker/build-push-action@v3 with: @@ -309,7 +307,7 @@ jobs: pushing_housekeeping_stable_img: if: ${{ github.repository_owner == 'svalinn' }} - needs: [test_img] + needs: [build-test-dagmc-img] runs-on: ubuntu-latest env: hdf5_versions: 1.10.4 From 5ddc8f8e2144a3d211d877f9e387b51e760420c3 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Wed, 8 Feb 2023 18:11:06 +0000 Subject: [PATCH 46/49] housebuilding only if build-test works --- .github/workflows/docker_publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 854222792f..5d21c563b7 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -342,7 +342,7 @@ jobs: pushing_test_stable_img: if: ${{ github.repository_owner == 'svalinn' }} - needs: [test_img] + needs: [build-test-dagmc-img] runs-on: ubuntu-latest env: hdf5_versions: 1.10.4 From 4a123b5ea653833255d424bf11fbee62df5432d0 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 9 Feb 2023 09:40:31 +0000 Subject: [PATCH 47/49] docker qemu usage in dag step same as other stages --- .github/workflows/docker_publish.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 5d21c563b7..d732035aa5 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -169,7 +169,6 @@ jobs: ] name: Ubuntu ${{ matrix.ubuntu_versions }} + ${{ matrix.compiler }} hdf5 ${{ matrix.hdf5_versions }} + Moab ${{ matrix.moab_versions }} - steps: - name: Set up QEMU uses: docker/setup-qemu-action@v2 @@ -268,6 +267,13 @@ jobs: - name: Set up QEMU uses: docker/setup-qemu-action@v2 + - name: Log in to the Container registry + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Checkout repository uses: actions/checkout@v3 From eb91b609621826568c3d57ca3599a1da12eda190 Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Thu, 9 Feb 2023 14:57:43 +0000 Subject: [PATCH 48/49] not running dag intsall step in container --- .github/workflows/docker_publish.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index d732035aa5..1203060fea 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -260,7 +260,6 @@ jobs: OFF, ON, ] - container: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:ci_testing name: Installing DAGMC steps: From d3edab8c6d5eccf185adf113125ae88d7143379e Mon Sep 17 00:00:00 2001 From: Jonathan Shimwell Date: Fri, 17 Feb 2023 12:34:09 +0000 Subject: [PATCH 49/49] disable reg tests as models missing --- CI/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 40ac16190a..6e67c12d95 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -236,7 +236,8 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DBUILD_GEANT4=ON \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ - -DBUILD_MW_REG_TESTS=${build_mw_reg_tests} \ + # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 + -DBUILD_MW_REG_TESTS=OFF \ -DBUILD_STATIC_EXE=${static_exe} \ -DBUILD_STATIC_LIBS=${static_exe} \ -DCMAKE_C_COMPILER=${CC} \