From 6166e4f4653397ad3aecc50b6b2f29a8fbc2ea47 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 8 Dec 2023 23:38:52 +0600 Subject: [PATCH 01/33] dd fix --- .github/actions/upstream-test/action.yml | 10 +- .github/workflows/docker_publish.yml | 34 +++---- .github/workflows/linux_build_test.yml | 15 ++- .../linux_upstream_test_double_down.yml | 4 +- .../workflows/linux_upstream_test_geant4.yml | 1 - CI/Dockerfile | 99 +++++++++---------- 6 files changed, 77 insertions(+), 86 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 68064d160b..92b826f57e 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -5,7 +5,7 @@ inputs: description: token for logging in to the GHCR required: true default: '' - geant_version: + geant4_version: description: Version of Geant4 required: false default: 11.1.2 @@ -25,10 +25,10 @@ inputs: description: Version of MOAB required: false default: 5.3.0 - double_down: - description: Whether or not to test Double Down + double_down_version: + description: Version of Double Down required: false - default: OFF + default: develop runs: using: "composite" @@ -50,4 +50,4 @@ runs: parallel: true tag-latest-on-default: false dockerfile: CI/Dockerfile - build-args: COMPILER=${{ inputs.compiler }}, geant4_version=${{ inputs.geant_version }}, UBUNTU_VERSION=${{ inputs.ubuntu_version }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_BRANCH=${{ inputs.moab_version }}, double_down=${{ inputs.double_down }} + build-args: COMPILER=${{ inputs.compiler }}, Geant4_VERSION=${{ inputs.geant4_version }}, UBUNTU_VERSION=${{ inputs.ubuntu_version }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 902a9703f9..bd04a21b89 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - ubuntu_versions : [ + ubuntu_version : [ 20.04, 22.04, ] @@ -22,16 +22,16 @@ jobs: gcc, clang, ] - hdf5_versions : [ + hdf5_version : [ 1.10.4, ] - moab_versions : [ + moab_version : [ 5.3.0, ] - double_down : [ - OFF, + double_down_version : [ + develop, ] - geant_version : [ + geant4_version : [ 10.7.4, 11.1.2 ] @@ -60,14 +60,14 @@ jobs: - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }} + repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-geant4_${{ matrix.geant4_version }}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false parallel: true tag-latest-on-default: ${{ env.tag-latest-on-default }} dockerfile: CI/Dockerfile - build-args: double_down=${{ matrix.double_down}}, geant4_version=${{ matrix.geant_version }}, COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5_VERSION=${{ matrix.hdf5_versions }}, MOAB_BRANCH=${{ matrix.moab_versions }} + build-args: DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}}, Geant4_VERSION=${{ matrix.geant4_version }}, COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_version }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }} push_stable_ci_img: @@ -76,7 +76,7 @@ jobs: strategy: matrix: - ubuntu_versions : [ + ubuntu_version : [ 20.04, 22.04, ] @@ -84,16 +84,16 @@ jobs: gcc, clang, ] - hdf5_versions : [ - 1.10.4, + hdf5_version : [ + 1.10.4, ] - moab_versions : [ - 5.3.0, + moab_version : [ + 5.3.0, ] - double_down : [ - OFF, + double_down_version : [ + develop, ] - geant_version : [ + geant4_version : [ 10.7.4, 11.1.2 ] @@ -111,7 +111,7 @@ jobs: - name: Store image name if: ${{ github.repository_owner == 'svalinn' }} run: | - echo "image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}" >> "$GITHUB_ENV" + echo "image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler }}-geant4_${{ matrix.geant4_version }}-hdf5_${{ matrix.hdf5_version }}-moab_${{ matrix.moab_version }}" >> "$GITHUB_ENV" - name: Push Image as latest img if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 5e8bbc30d0..77d19e6bf0 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: - ubuntu_versions : [ + ubuntu_version : [ 20.04, 22.04, ] @@ -44,21 +44,18 @@ jobs: gcc, clang, ] - hdf5_versions : [ - 1.10.4, + hdf5_version : [ + 1.10.4, ] - moab_versions : [ + moab_version : [ 5.3.0, ] - double_down : [ - OFF, - ] geant_version : [ 10.7.4, ] container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/moab:latest + image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}/moab:latest steps: - name: Checkout repository @@ -83,7 +80,7 @@ jobs: -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \ - -DDOUBLE_DOWN=${double_down} \ + -DDOUBLE_DOWN=ON \ -DCMAKE_CXX_FLAGS="-Werror=reorder" \ -Ddd_ROOT=${double_down_install_dir} && \ make -j2 && \ diff --git a/.github/workflows/linux_upstream_test_double_down.yml b/.github/workflows/linux_upstream_test_double_down.yml index b23332db74..d7a7bdc70a 100644 --- a/.github/workflows/linux_upstream_test_double_down.yml +++ b/.github/workflows/linux_upstream_test_double_down.yml @@ -27,6 +27,4 @@ jobs: uses: ./.github/actions/upstream-test with: token: ${{ secrets.GITHUB_TOKEN }} - double_down: ON - - + double_down_version: develop diff --git a/.github/workflows/linux_upstream_test_geant4.yml b/.github/workflows/linux_upstream_test_geant4.yml index 3e09d0161a..5143510677 100644 --- a/.github/workflows/linux_upstream_test_geant4.yml +++ b/.github/workflows/linux_upstream_test_geant4.yml @@ -28,4 +28,3 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} geant_version: 11.1.2 - diff --git a/CI/Dockerfile b/CI/Dockerfile index 434d43a767..bb5a5b2394 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -4,13 +4,13 @@ # docker build -t dagmc -f CI/Dockerfile . # Global ARGS set before the first build stage are accessable by all build stages -ARG EMBREE_BRANCH='v3.6.1' -ARG geant4_version=11.1.2 -ARG UBUNTU_VERSION=20.04 -ARG MOAB_BRANCH=5.3.0 -ARG double_down=OFF -ARG ci_jobs=4 +ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.10.4 +ARG EMBREE_VERSION='v3.6.1' +ARG Geant4_VERSION=11.1.2 +ARG MOAB_VERSION=5.3.0 +ARG DOUBLE_DOWN_VERSION='develop' +ARG CI_JOBS=4 ARG build_dir=/root/build_dir ARG install_dir=/root/opt @@ -26,30 +26,28 @@ SHELL ["/bin/bash", "-c"] ENV TZ=America/Chicago RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone -# Update core packages -RUN apt-get -y update; \ - apt-get -y install autoconf \ - clang \ - cmake \ - g++ \ - gcc \ - gfortran \ - libhdf5-dev \ - libtool \ - libeigen3-dev\ - python3-numpy \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-dev \ - libpython3-dev \ - wget \ - software-properties-common; \ - add-apt-repository ppa:git-core/ppa; \ - apt-get update; \ - apt-get install -y git; \ - update-alternatives --install /usr/bin/python python /usr/bin/python3 10; \ - update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10; \ +# Install Build Dependencies +RUN apt-get update --yes && \ + apt-get install --yes \ + git \ + wget \ + autoconf \ + clang \ + cmake \ + g++ \ + gcc \ + gfortran \ + libhdf5-dev \ + libtool \ + libeigen3-dev\ + python3-numpy \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-dev \ + libpython3-dev \ + software-properties-common && \ + apt-get clean && rm -rf /var/lib/apt/lists/* && \ pip install "cython<3"; ARG build_dir @@ -71,17 +69,16 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage -ARG geant4_version -ARG EMBREE_BRANCH +ARG Geant4_VERSION +ARG EMBREE_VERSION ARG install_dir ARG build_dir -ARG ci_jobs +ARG CI_JOBS ARG CXX ARG CC 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 @@ -97,7 +94,7 @@ RUN mkdir -p ${geant4_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_C_COMPILER=${CC} \ -DBUILD_STATIC_LIBS=ON && \ - make -j${ci_jobs} && \ + make -j${CI_JOBS} && \ make install && \ cd && \ rm -rf ${geant4_build_dir} @@ -109,15 +106,15 @@ 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 && \ + git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ cd build && \ cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ -DEMBREE_ISPC_SUPPORT=OFF \ -DEMBREE_TUTORIALS=OFF \ -DEMBREE_TBB_ROOT=/usr && \ - make -j${ci_jobs} && \ - make -j${ci_jobs} install && \ + make -j${CI_JOBS} && \ + make -j${CI_JOBS} install && \ cd && \ rm -rf ${embree_build_dir} @@ -128,7 +125,7 @@ FROM external_deps AS hdf5 ARG HDF5_VERSION ARG install_dir ARG build_dir -ARG ci_jobs +ARG CI_JOBS ARG CXX ARG CC @@ -137,7 +134,7 @@ ENV hdf5_install_dir=${install_dir}/hdf5 RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ - export HDF5_VERSION_major=`python -c "print('.'.join('${HDF5_VERSION}'.split('.')[:-1]))"` && \ + export HDF5_VERSION_major=`python3 -c "print('.'.join('${HDF5_VERSION}'.split('.')[:-1]))"` && \ 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 build && \ @@ -145,7 +142,7 @@ RUN mkdir -p ${hdf5_build_dir}/build && \ --prefix=${hdf5_install_dir} \ CXX=${CXX} \ CC=${CC} && \ - make -j${ci_jobs} && \ + make -j${CI_JOBS} && \ make install && \ cd && \ rm -rf ${hdf5_build_dir} @@ -155,9 +152,10 @@ FROM hdf5 AS moab # accessing gloabl ARGs in build stage ARG install_dir -ARG MOAB_BRANCH +ARG MOAB_VERSION +ARG DOUBLE_DOWN_VERSION ARG build_dir -ARG ci_jobs +ARG CI_JOBS ARG CXX ARG CC @@ -169,7 +167,7 @@ ENV moab_install_dir=${install_dir}/moab RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ - git clone -b ${MOAB_BRANCH} --depth 1 https://bitbucket.org/fathomteam/moab && \ + git clone -b ${MOAB_VERSION} --depth 1 https://bitbucket.org/fathomteam/moab && \ cd build && \ cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ -DCMAKE_BUILD_TYPE=Release \ @@ -181,7 +179,7 @@ RUN mkdir -p ${moab_build_dir}/build && \ -DBUILD_SHARED_LIBS=ON \ -DENABLE_FORTRAN=OFF \ -DENABLE_PYMOAB=ON && \ - make -j${ci_jobs} && \ + make -j${CI_JOBS} && \ make install && \ cd && \ rm -rf ${moab_build_dir} @@ -193,13 +191,13 @@ ENV double_down_install_dir=${install_dir}/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 && \ + git clone --shallow-submodules --single-branch --branch ${DOUBLE_DOWN_VERSION} --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 + make -j${CI_JOBS} && \ + make -j${CI_JOBS} install FROM moab as dagmc @@ -207,7 +205,6 @@ FROM moab as dagmc # accessing gloabl ARGs in build stage ARG install_dir ARG build_dir -ARG double_down ARG CXX ARG CC @@ -234,9 +231,9 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=${double_down} \ + -DDOUBLE_DOWN=ON \ -Ddd_ROOT=${double_down_install_dir} && \ - make -j${ci_jobs} && \ + make -j${CI_JOBS} && \ make install From d0579707840362c0d7a013b0bdad8d9a7342d3ca Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 8 Dec 2023 23:46:14 +0600 Subject: [PATCH 02/33] fix Geant4_VERSION --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index bb5a5b2394..b8f8d3e43a 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -77,14 +77,14 @@ ARG CI_JOBS ARG CXX ARG CC -ENV geant4_basename=geant4-v${geant4_version} +ENV geant4_basename=geant4-v${Geant4_VERSION} ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 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 && \ + wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${Geant4_VERSION}/${geant4_tarball} --no-check-certificate && \ tar -xzf ${geant4_tarball} && \ cd build && \ cmake ../${geant4_basename} -DCMAKE_INSTALL_RPATH=${geant4_install_dir}/lib \ From 3cb814fd5248d318cad056a68ff2dbf33ff5f68e Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Fri, 8 Dec 2023 23:58:38 +0600 Subject: [PATCH 03/33] typo fix --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 9a6a95a460..a68606f3b0 100644 --- a/README.rst +++ b/README.rst @@ -42,7 +42,7 @@ Quick links: * `Contributors guide `_ * `Release instructions `_ -*Preview CI for versions of upstream dependencies * +**Preview CI for versions of upstream dependencies** .. image:: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_moab.yml/badge.svg?branch=develop :target: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_moab.yml From 0b12126aa847f220c6a1db348624ea50760f31cf Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 9 Dec 2023 07:40:38 +0600 Subject: [PATCH 04/33] dd version 1.1.0 --- .github/actions/upstream-test/action.yml | 2 +- .github/workflows/docker_publish.yml | 4 ++-- .github/workflows/linux_upstream_test_double_down.yml | 2 +- .github/workflows/linux_upstream_test_moab.yml | 2 +- CI/Dockerfile | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 92b826f57e..728382688c 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: develop + default: 1.1.0 runs: using: "composite" diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index bd04a21b89..5c95b41a79 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -29,7 +29,7 @@ jobs: 5.3.0, ] double_down_version : [ - develop, + 1.1.0, ] geant4_version : [ 10.7.4, @@ -91,7 +91,7 @@ jobs: 5.3.0, ] double_down_version : [ - develop, + 1.1.0, ] geant4_version : [ 10.7.4, diff --git a/.github/workflows/linux_upstream_test_double_down.yml b/.github/workflows/linux_upstream_test_double_down.yml index d7a7bdc70a..08c3361066 100644 --- a/.github/workflows/linux_upstream_test_double_down.yml +++ b/.github/workflows/linux_upstream_test_double_down.yml @@ -1,4 +1,4 @@ -name: Test against Double Down on PR merge +name: Test against newer Double Down on PR merge on: # allows us to run workflows manually diff --git a/.github/workflows/linux_upstream_test_moab.yml b/.github/workflows/linux_upstream_test_moab.yml index 4e6df8faf2..6402012897 100644 --- a/.github/workflows/linux_upstream_test_moab.yml +++ b/.github/workflows/linux_upstream_test_moab.yml @@ -1,4 +1,4 @@ -name: Test against MOAB master on PR merge +name: Test against newer MOAB on PR merge on: # allows us to run workflows manually diff --git a/CI/Dockerfile b/CI/Dockerfile index b8f8d3e43a..35080e2738 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,10 +6,10 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.10.4 -ARG EMBREE_VERSION='v3.6.1' +ARG EMBREE_VERSION='v4.0.1' ARG Geant4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 -ARG DOUBLE_DOWN_VERSION='develop' +ARG DOUBLE_DOWN_VERSION=1.1.0 ARG CI_JOBS=4 ARG build_dir=/root/build_dir From 7d8de72aea801ddc277dd31ec312c5bc61ce0849 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 9 Dec 2023 08:07:20 +0600 Subject: [PATCH 05/33] Double Down v1.1.0 Installation in Dockerfile --- doc/CHANGELOG.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 82de1cac69..a771da9614 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -27,6 +27,7 @@ Next version * Adding flags to CI to ensure compatibility with MOOSE apps (#902) * Fixing order of attribute initialization in the metadata class (#903) * Adding const identifier to cross-reference methods (#906) + * Allow Double Down v1.1.0 Installation in Dockerfile (#929) **Fixed:** * Patch to compile with Geant4 11.x (#803 #907) From 91245eabf07bffdc373c4cff90b8d94a92985f86 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 9 Dec 2023 09:51:37 +0600 Subject: [PATCH 06/33] DOUBLE_DOWN_VERSION string fix --- CI/Dockerfile | 80 +++++++++++++++++++++++++++------------------------ 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 35080e2738..0574edffcc 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,7 +6,7 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.10.4 -ARG EMBREE_VERSION='v4.0.1' +ARG EMBREE_VERSION=4.0.1 ARG Geant4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 ARG DOUBLE_DOWN_VERSION=1.1.0 @@ -48,7 +48,7 @@ RUN apt-get update --yes && \ libpython3-dev \ software-properties-common && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \ - pip install "cython<3"; + pip3 install "cython<3"; ARG build_dir ARG install_dir @@ -87,13 +87,14 @@ RUN mkdir -p ${geant4_build_dir}/build && \ wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${Geant4_VERSION}/${geant4_tarball} --no-check-certificate && \ tar -xzf ${geant4_tarball} && \ 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 && \ + 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 && \ @@ -106,7 +107,7 @@ 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_VERSION} https://github.com/embree/embree && \ + git clone -b v${EMBREE_VERSION} https://github.com/embree/embree && \ cd build && \ cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ @@ -169,16 +170,17 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd ${moab_build_dir} && \ git clone -b ${MOAB_VERSION} --depth 1 https://bitbucket.org/fathomteam/moab && \ cd build && \ - cmake ../moab -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ - -DCMAKE_BUILD_TYPE=Release \ - -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 && \ + cmake ../moab \ + -DCMAKE_INSTALL_RPATH=${hdf5_install_dir}/lib:${moab_install_dir}/lib \ + -DCMAKE_BUILD_TYPE=Release \ + -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 && \ make -j${CI_JOBS} && \ make install && \ cd && \ @@ -191,11 +193,12 @@ ENV double_down_install_dir=${install_dir}/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 ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ + git clone --shallow-submodules --single-branch --branch v${DOUBLE_DOWN_VERSION} --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} && \ + 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 @@ -219,20 +222,21 @@ RUN cd ${dagmc_build_dir} && git submodule update --init RUN mkdir -p ${dagmc_build_dir}/build && \ cd ${dagmc_build_dir} && \ cd build && \ - cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=ON \ - -DGEANT4_DIR=${geant4_install_dir} \ - -DBUILD_CI_TESTS=ON \ - # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 - -DBUILD_MW_REG_TESTS=OFF \ - -DBUILD_STATIC_EXE=OFF \ - -DBUILD_STATIC_LIBS=OFF \ - -DCMAKE_C_COMPILER=${CC} \ - -DCMAKE_CXX_COMPILER=${CXX} \ - -DCMAKE_Fortran_COMPILER=gfortran \ - -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=ON \ - -Ddd_ROOT=${double_down_install_dir} && \ + cmake ../ \ + -DMOAB_DIR=${moab_install_dir} \ + -DBUILD_GEANT4=ON \ + -DGEANT4_DIR=${geant4_install_dir} \ + -DBUILD_CI_TESTS=ON \ + # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 + -DBUILD_MW_REG_TESTS=OFF \ + -DBUILD_STATIC_EXE=OFF \ + -DBUILD_STATIC_LIBS=OFF \ + -DCMAKE_C_COMPILER=${CC} \ + -DCMAKE_CXX_COMPILER=${CXX} \ + -DCMAKE_Fortran_COMPILER=gfortran \ + -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ + -DDOUBLE_DOWN=ON \ + -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From b9c88b658857ce2f25ded0722be24fbd16490edc Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 9 Dec 2023 12:06:00 +0600 Subject: [PATCH 07/33] add space --- .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 5c95b41a79..be4d8b42b0 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -23,10 +23,10 @@ jobs: clang, ] hdf5_version : [ - 1.10.4, + 1.10.4, ] moab_version : [ - 5.3.0, + 5.3.0, ] double_down_version : [ 1.1.0, From 26ad7e30b2e85a0874193b7fc74081fac63b3bda Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 9 Dec 2023 12:30:29 +0600 Subject: [PATCH 08/33] fix DOUBLE_DOWN_VERSION branch for develop --- .github/actions/upstream-test/action.yml | 2 +- .github/workflows/docker_publish.yml | 4 ++-- .github/workflows/linux_build_test.yml | 2 +- CI/Dockerfile | 8 ++++---- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 728382688c..87aa5e1e83 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: 1.1.0 + default: v1.1.0 runs: using: "composite" diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index be4d8b42b0..8f8db3455f 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -29,7 +29,7 @@ jobs: 5.3.0, ] double_down_version : [ - 1.1.0, + v1.1.0, ] geant4_version : [ 10.7.4, @@ -91,7 +91,7 @@ jobs: 5.3.0, ] double_down_version : [ - 1.1.0, + v1.1.0, ] geant4_version : [ 10.7.4, diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 77d19e6bf0..84c71875cc 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -43,7 +43,7 @@ jobs: compiler : [ gcc, clang, - ] + ] hdf5_version : [ 1.10.4, ] diff --git a/CI/Dockerfile b/CI/Dockerfile index 0574edffcc..467aa74ad0 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,10 +6,10 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.10.4 -ARG EMBREE_VERSION=4.0.1 +ARG EMBREE_VERSION=v4.0.1 ARG Geant4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 -ARG DOUBLE_DOWN_VERSION=1.1.0 +ARG DOUBLE_DOWN_VERSION=v1.1.0 ARG CI_JOBS=4 ARG build_dir=/root/build_dir @@ -107,7 +107,7 @@ 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 v${EMBREE_VERSION} https://github.com/embree/embree && \ + git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ cd build && \ cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ -DEMBREE_TASKING_SYSTEM=INTERNAL \ @@ -193,7 +193,7 @@ ENV double_down_install_dir=${install_dir}/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 v${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ + git clone -b ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ cd build && \ cmake ../double-down \ -DMOAB_DIR=${moab_install_dir} \ From 2dfa97b09d36cd8eedee347644847dfd4db10c54 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 09:15:16 +0600 Subject: [PATCH 09/33] Update name string Co-authored-by: Patrick Shriwise --- .github/workflows/linux_upstream_test_double_down.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_upstream_test_double_down.yml b/.github/workflows/linux_upstream_test_double_down.yml index 08c3361066..cfb1b92536 100644 --- a/.github/workflows/linux_upstream_test_double_down.yml +++ b/.github/workflows/linux_upstream_test_double_down.yml @@ -1,4 +1,4 @@ -name: Test against newer Double Down on PR merge +name: Test against Double Down development branch on PR merge on: # allows us to run workflows manually From 2a1133eea859541ee2f1c383ef906a6704d4a0df Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 09:15:36 +0600 Subject: [PATCH 10/33] Update name string Co-authored-by: Patrick Shriwise --- .github/workflows/linux_upstream_test_moab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux_upstream_test_moab.yml b/.github/workflows/linux_upstream_test_moab.yml index 6402012897..8d39fb17fc 100644 --- a/.github/workflows/linux_upstream_test_moab.yml +++ b/.github/workflows/linux_upstream_test_moab.yml @@ -1,4 +1,4 @@ -name: Test against newer MOAB on PR merge +name: Test against MOAB development branch (master) on PR merge on: # allows us to run workflows manually From fca55ad83bb54f33d5892763d5916aa9584f4df3 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 13:59:06 +0600 Subject: [PATCH 11/33] allow to chose building geant4 and dd from actions --- .github/actions/upstream-test/action.yml | 28 +++++++++-- .github/workflows/docker_publish.yml | 64 +++++++++++++++++------- .github/workflows/linux_build_test.yml | 11 ++-- CI/Dockerfile | 54 +++++++++++--------- 4 files changed, 106 insertions(+), 51 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 87aa5e1e83..d6b24f0435 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -8,7 +8,7 @@ inputs: geant4_version: description: Version of Geant4 required: false - default: 11.1.2 + default: '' ubuntu_version: description: Underlying OS version required: false @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: v1.1.0 + default: '' runs: using: "composite" @@ -40,14 +40,34 @@ runs: username: ${{ github.repository_owner }} password: ${{ inputs.token }} + - name: Configure docker image tag + shell: bash + run: | + image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-hdf5_${{ inputs.hdf5_version}}-moab_${{ inputs.moab_version }} + if [[ -n "${{ inputs.geant4_version }}" ]]; then + image_base_tag=${image_base_tag}-geant4_${{ inputs.geant4_version }} + GEANT4=ON + else + GEANT4=OFF + fi + if [[ -n "${{ inputs.double_down_version }}" ]]; then + image_base_tag=${image_base_tag}-double_down_${{ inputs.double_down_version }} + DOUBLE_DOWN=ON + else + DOUBLE_DOWN=OFF + fi + echo "image_base_tag=${image_base_tag}" >> $GITHUB_ENV + echo "GEANT4=${GEANT4}" >> $GITHUB_ENV + echo "DOUBLE_DOWN=${DOUBLE_DOWN}" >> $GITHUB_ENV + - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-geant4_${{ inputs.geant_version }}-hdf5_${{ inputs.hdf5_version }}-moab_${{ inputs.moab_version }} + repository: ${{ env.image_base_tag }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false parallel: true tag-latest-on-default: false dockerfile: CI/Dockerfile - build-args: COMPILER=${{ inputs.compiler }}, Geant4_VERSION=${{ inputs.geant4_version }}, UBUNTU_VERSION=${{ inputs.ubuntu_version }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} + build-args: UBUNTU_VERSION=${{ inputs.ubuntu_version }}, COMPILER=${{ inputs.compiler }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, GEANT4=${{ env.GEANT4 }}, GEANT4_VERSION=${{ inputs.geant4_version }}, DOUBLE_DOWN=${{ env.DOUBLE_DOWN }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 8f8db3455f..b1d53c9b4b 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -17,24 +17,24 @@ jobs: ubuntu_version : [ 20.04, 22.04, - ] + ] compiler : [ gcc, clang, - ] + ] hdf5_version : [ 1.10.4, ] moab_version : [ 5.3.0, ] - double_down_version : [ - v1.1.0, - ] geant4_version : [ 10.7.4, 11.1.2 ] + double_down_version : [ + + ] name: Installing Dependencies, Building DAGMC and running tests steps: @@ -57,17 +57,36 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Configure docker image tag and build arguments + run: | + image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} + if [[ -n "${{ matrix.geant4_version }}" ]]; then + image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} + GEANT4=ON + else + GEANT4=OFF + fi + if [[ -n "${{ matrix.double_down_version }}" ]]; then + image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} + DOUBLE_DOWN=ON + else + DOUBLE_DOWN=OFF + fi + echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" + echo "GEANT4=${GEANT4}" >> "$GITHUB_ENV" + echo "DOUBLE_DOWN=${DOUBLE_DOWN}" >> "$GITHUB_ENV" + - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-geant4_${{ matrix.geant4_version }}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} + repository: $image_base_tag stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false parallel: true - tag-latest-on-default: ${{ env.tag-latest-on-default }} + tag-latest-on-default: $tag-latest-on-default dockerfile: CI/Dockerfile - build-args: DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}}, Geant4_VERSION=${{ matrix.geant4_version }}, COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_version }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }} + build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4=$GEANT4, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN=$DOUBLE_DOWN, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} push_stable_ci_img: @@ -79,24 +98,24 @@ jobs: ubuntu_version : [ 20.04, 22.04, - ] + ] compiler : [ gcc, clang, - ] + ] hdf5_version : [ 1.10.4, ] moab_version : [ 5.3.0, ] - double_down_version : [ - v1.1.0, - ] geant4_version : [ 10.7.4, 11.1.2 ] + double_down_version : [ + + ] name: Pushing final images steps: @@ -108,21 +127,28 @@ jobs: username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Store image name + - name: Configure docker image tag if: ${{ github.repository_owner == 'svalinn' }} run: | - echo "image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler }}-geant4_${{ matrix.geant4_version }}-hdf5_${{ matrix.hdf5_version }}-moab_${{ matrix.moab_version }}" >> "$GITHUB_ENV" + image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} + if [[ -n "${{ matrix.geant4_version }}" ]]; then + image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} + fi + if [[ -n "${{ matrix.double_down_version }}" ]]; then + image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} + fi + echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" - name: Push Image as latest img if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ${{ env.image_base_tag }}/dagmc:latest - dst: ${{ env.image_base_tag }}:latest + src: $image_base_tag/dagmc:latest + dst: $image_base_tag:latest - name: Push Image as latest img if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: ${{ env.image_base_tag }}:latest - dst: ${{ env.image_base_tag }}:stable + src: $image_base_tag:latest + dst: $image_base_tag:stable diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 84c71875cc..f66d72249c 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -39,7 +39,7 @@ jobs: ubuntu_version : [ 20.04, 22.04, - ] + ] compiler : [ gcc, clang, @@ -53,9 +53,12 @@ jobs: geant_version : [ 10.7.4, ] + double_down_version : [ + + ] container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}/moab:latest + image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant_version != '' && '-geant4_' || '' }}${{ matrix.geant_version }}${{ matrix.double_down_version != '' && '-double_down_' || '' }}${{ matrix.double_down_version }}/moab:latest steps: - name: Checkout repository @@ -70,7 +73,7 @@ jobs: cd ./build git config --global --add safe.directory $GITHUB_WORKSPACE cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=ON \ + -DBUILD_GEANT4=${{ matrix.geant_version != '' && 'ON' || 'OFF' }} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=OFF \ @@ -80,7 +83,7 @@ jobs: -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \ - -DDOUBLE_DOWN=ON \ + -DDOUBLE_DOWN=${{ matrix.double_down_version != '' && 'ON' || 'OFF' }} \ -DCMAKE_CXX_FLAGS="-Werror=reorder" \ -Ddd_ROOT=${double_down_install_dir} && \ make -j2 && \ diff --git a/CI/Dockerfile b/CI/Dockerfile index 467aa74ad0..cc21eae2f9 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -7,8 +7,10 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.10.4 ARG EMBREE_VERSION=v4.0.1 -ARG Geant4_VERSION=11.1.2 +ARG GEANT4=ON +ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 +ARG DOUBLE_DOWN=ON ARG DOUBLE_DOWN_VERSION=v1.1.0 ARG CI_JOBS=4 @@ -29,25 +31,27 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone # Install Build Dependencies RUN apt-get update --yes && \ apt-get install --yes \ - git \ - wget \ - autoconf \ - clang \ - cmake \ - g++ \ - gcc \ - gfortran \ - libhdf5-dev \ - libtool \ - libeigen3-dev\ - python3-numpy \ - python3 \ - python3-pip \ - python3-setuptools \ - python3-dev \ - libpython3-dev \ - software-properties-common && \ + git \ + wget \ + autoconf \ + clang \ + cmake \ + g++ \ + gcc \ + gfortran \ + libhdf5-dev \ + libtool \ + libeigen3-dev\ + python3-numpy \ + python3 \ + python3-pip \ + python3-setuptools \ + python3-dev \ + libpython3-dev \ + software-properties-common && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \ + update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && \ + update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 && \ pip3 install "cython<3"; ARG build_dir @@ -69,7 +73,7 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage -ARG Geant4_VERSION +ARG GEANT4_VERSION ARG EMBREE_VERSION ARG install_dir ARG build_dir @@ -77,14 +81,14 @@ ARG CI_JOBS ARG CXX ARG CC -ENV geant4_basename=geant4-v${Geant4_VERSION} +ENV geant4_basename=geant4-v${GEANT4_VERSION} ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 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 && \ + wget https://gitlab.cern.ch/geant4/geant4/-/archive/v${GEANT4_VERSION}/${geant4_tarball} --no-check-certificate && \ tar -xzf ${geant4_tarball} && \ cd build && \ cmake ../${geant4_basename} \ @@ -210,6 +214,8 @@ ARG install_dir ARG build_dir ARG CXX ARG CC +ARG GEANT4 +ARG DOUBLE_DOWN ENV dagmc_build_dir=${build_dir}/dagmc ENV dagmc_install_dir=${install_dir}/dagmc @@ -224,7 +230,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd build && \ cmake ../ \ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=ON \ + -DBUILD_GEANT4=${GEANT4} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 @@ -235,7 +241,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=ON \ + -DDOUBLE_DOWN=${DOUBLE_DOWN} \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From 13efae64c2ab561d01ddfff7f8df917c30617e6c Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 15:25:11 +0600 Subject: [PATCH 12/33] double_down default OFF --- .github/actions/upstream-test/action.yml | 8 ++++---- .github/workflows/docker_publish.yml | 12 ++++++------ .github/workflows/linux_build_test.yml | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index d6b24f0435..183a481741 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -8,7 +8,7 @@ inputs: geant4_version: description: Version of Geant4 required: false - default: '' + default: OFF ubuntu_version: description: Underlying OS version required: false @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: '' + default: OFF runs: using: "composite" @@ -44,13 +44,13 @@ runs: shell: bash run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-hdf5_${{ inputs.hdf5_version}}-moab_${{ inputs.moab_version }} - if [[ -n "${{ inputs.geant4_version }}" ]]; then + if ${{ inputs.geant4_version }} ; then image_base_tag=${image_base_tag}-geant4_${{ inputs.geant4_version }} GEANT4=ON else GEANT4=OFF fi - if [[ -n "${{ inputs.double_down_version }}" ]]; then + if ${{ inputs.double_down_version }} ; then image_base_tag=${image_base_tag}-double_down_${{ inputs.double_down_version }} DOUBLE_DOWN=ON else diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index b1d53c9b4b..9c93d03767 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -33,7 +33,7 @@ jobs: 11.1.2 ] double_down_version : [ - + OFF ] name: Installing Dependencies, Building DAGMC and running tests @@ -60,13 +60,13 @@ jobs: - name: Configure docker image tag and build arguments run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if [[ -n "${{ matrix.geant4_version }}" ]]; then + if ${{ matrix.geant4_version }}; then image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} GEANT4=ON else GEANT4=OFF fi - if [[ -n "${{ matrix.double_down_version }}" ]]; then + if ${{ matrix.double_down_version }} image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} DOUBLE_DOWN=ON else @@ -114,7 +114,7 @@ jobs: 11.1.2 ] double_down_version : [ - + OFF ] name: Pushing final images @@ -131,10 +131,10 @@ jobs: if: ${{ github.repository_owner == 'svalinn' }} run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if [[ -n "${{ matrix.geant4_version }}" ]]; then + if ${{ matrix.geant4_version }} ; then image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} fi - if [[ -n "${{ matrix.double_down_version }}" ]]; then + if ${{ matrix.double_down_version }} ; then image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} fi echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index f66d72249c..a1cb1fb3f4 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -54,11 +54,11 @@ jobs: 10.7.4, ] double_down_version : [ - + OFF ] container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant_version != '' && '-geant4_' || '' }}${{ matrix.geant_version }}${{ matrix.double_down_version != '' && '-double_down_' || '' }}${{ matrix.double_down_version }}/moab:latest + image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant_version != 'OFF' && '-geant4_' || '' }}${{ matrix.geant_version }}${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }}${{ matrix.double_down_version }}/moab:latest steps: - name: Checkout repository @@ -73,7 +73,7 @@ jobs: cd ./build git config --global --add safe.directory $GITHUB_WORKSPACE cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${{ matrix.geant_version != '' && 'ON' || 'OFF' }} \ + -DBUILD_GEANT4=${{ matrix.geant_version != 'OFF' && 'ON' || 'OFF' }} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=OFF \ @@ -83,7 +83,7 @@ jobs: -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \ - -DDOUBLE_DOWN=${{ matrix.double_down_version != '' && 'ON' || 'OFF' }} \ + -DDOUBLE_DOWN=${{ matrix.double_down_version != 'OFF' && 'ON' || 'OFF' }} \ -DCMAKE_CXX_FLAGS="-Werror=reorder" \ -Ddd_ROOT=${double_down_install_dir} && \ make -j2 && \ From ff3ea55df404fd4499eeefd4b88340f99884639a Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 21:55:38 +0600 Subject: [PATCH 13/33] build Geant4 or DD if enabled --- .github/actions/upstream-test/action.yml | 6 +- .github/workflows/docker_publish.yml | 8 +- CI/Dockerfile | 105 +++++++++++++---------- 3 files changed, 65 insertions(+), 54 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 183a481741..93108f00db 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -41,16 +41,16 @@ runs: password: ${{ inputs.token }} - name: Configure docker image tag - shell: bash + shell: bash -l {0} run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-hdf5_${{ inputs.hdf5_version}}-moab_${{ inputs.moab_version }} - if ${{ inputs.geant4_version }} ; then + if [ ${{ inputs.geant4_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-geant4_${{ inputs.geant4_version }} GEANT4=ON else GEANT4=OFF fi - if ${{ inputs.double_down_version }} ; then + if [ ${{ inputs.double_down_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-double_down_${{ inputs.double_down_version }} DOUBLE_DOWN=ON else diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 9c93d03767..9ab1c6dc81 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -60,13 +60,13 @@ jobs: - name: Configure docker image tag and build arguments run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if ${{ matrix.geant4_version }}; then + if [ ${{ matrix.geant4_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} GEANT4=ON else GEANT4=OFF fi - if ${{ matrix.double_down_version }} + if [ ${{ matrix.double_down_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} DOUBLE_DOWN=ON else @@ -131,10 +131,10 @@ jobs: if: ${{ github.repository_owner == 'svalinn' }} run: | image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if ${{ matrix.geant4_version }} ; then + if [ ${{ matrix.geant4_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} fi - if ${{ matrix.double_down_version }} ; then + if [ ${{ matrix.double_down_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} fi echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" diff --git a/CI/Dockerfile b/CI/Dockerfile index cc21eae2f9..85304fe4a6 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -73,6 +73,7 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage +ARG GEANT4 ARG GEANT4_VERSION ARG EMBREE_VERSION ARG install_dir @@ -86,42 +87,25 @@ ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -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 && \ - 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 && \ - rm -rf ${geant4_build_dir} - - -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_VERSION} https://github.com/embree/embree && \ - cd build && \ - cmake ../embree -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ - -DEMBREE_TASKING_SYSTEM=INTERNAL \ - -DEMBREE_ISPC_SUPPORT=OFF \ - -DEMBREE_TUTORIALS=OFF \ - -DEMBREE_TBB_ROOT=/usr && \ - make -j${CI_JOBS} && \ - make -j${CI_JOBS} install && \ - cd && \ - rm -rf ${embree_build_dir} +RUN if [ "${GEANT4}" = "ON" ]; then \ + 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 && \ + 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 && \ + rm -rf ${geant4_build_dir} \ + fi FROM external_deps AS hdf5 @@ -158,6 +142,7 @@ FROM hdf5 AS moab # accessing gloabl ARGs in build stage ARG install_dir ARG MOAB_VERSION +ARG DOUBLE_DOWN ARG DOUBLE_DOWN_VERSION ARG build_dir ARG CI_JOBS @@ -190,21 +175,47 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd && \ rm -rf ${moab_build_dir} +ENV embree_install_dir=${install_dir}/embree +ENV embree_build_dir=${build_dir}/embree + +# Clone and install Embree +# Required for Double-Down +RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ + mkdir -p ${embree_build_dir}/build && \ + cd ${embree_build_dir} && \ + git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ + cd build && \ + cmake ../embree \ + -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ + -DEMBREE_TASKING_SYSTEM=INTERNAL \ + -DEMBREE_ISPC_SUPPORT=OFF \ + -DEMBREE_TUTORIALS=OFF \ + -DEMBREE_TBB_ROOT=/usr && \ + make -j${CI_JOBS} && \ + make -j${CI_JOBS} install && \ + cd && \ + rm -rf ${embree_build_dir} \ + fi + 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 -b ${DOUBLE_DOWN_VERSION} --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 +# Performed after moab and embree install as double-down requires moab and embree +RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ + mkdir -p ${double_down_build_dir}/build && \ + cd ${double_down_build_dir} && \ + git clone -b ${DOUBLE_DOWN_VERSION} --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 && \ + cd && \ + rm -rf ${double_down_build_dir} \ + fi FROM moab as dagmc From 78c2ac29f0991b915e678b78d0cd06e13ae4958f Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 22:04:46 +0600 Subject: [PATCH 14/33] fix ${{ env.image_base_tag }} --- .github/workflows/docker_publish.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 9ab1c6dc81..c917cd5d4e 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -79,14 +79,14 @@ jobs: - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: $image_base_tag + repository: ${{ env.image_base_tag }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false parallel: true - tag-latest-on-default: $tag-latest-on-default + tag-latest-on-default: ${{ env.tag-latest-on-default }} dockerfile: CI/Dockerfile - build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4=$GEANT4, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN=$DOUBLE_DOWN, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} + build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4=${{ env.GEANT4 }}, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN=${{ env.DOUBLE_DOWN }}, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} push_stable_ci_img: @@ -143,12 +143,12 @@ jobs: if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: $image_base_tag/dagmc:latest - dst: $image_base_tag:latest + src: ${{ env.image_base_tag }}/dagmc:latest + dst: ${{ env.image_base_tag }}:latest - name: Push Image as latest img if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} uses: akhilerm/tag-push-action@v2.1.0 with: - src: $image_base_tag:latest - dst: $image_base_tag:stable + src: ${{ env.image_base_tag }}:latest + dst: ${{ env.image_base_tag }}:stable From 91d51b0fe9760d8516318dd338fcdb8032010a7b Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 22:13:50 +0600 Subject: [PATCH 15/33] fix syntax error --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 85304fe4a6..90f1fca1cc 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -104,7 +104,7 @@ RUN if [ "${GEANT4}" = "ON" ]; then \ make -j${CI_JOBS} && \ make install && \ cd && \ - rm -rf ${geant4_build_dir} \ + rm -rf ${geant4_build_dir}; \ fi @@ -194,7 +194,7 @@ RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ make -j${CI_JOBS} && \ make -j${CI_JOBS} install && \ cd && \ - rm -rf ${embree_build_dir} \ + rm -rf ${embree_build_dir}; \ fi ENV double_down_build_dir=${build_dir}/double-down From 037e6fc6253f079b6d1bb242880bc8c550b311ca Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 11 Dec 2023 22:17:00 +0600 Subject: [PATCH 16/33] fix syntex --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 90f1fca1cc..af1b4584c2 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -214,7 +214,7 @@ RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ make -j${CI_JOBS} && \ make -j${CI_JOBS} install && \ cd && \ - rm -rf ${double_down_build_dir} \ + rm -rf ${double_down_build_dir}; \ fi From 42a6ab5b65575d6c95849b70889603fdeb6a296d Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Tue, 12 Dec 2023 12:57:35 +0600 Subject: [PATCH 17/33] add more conditions to container --- .github/workflows/linux_build_test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 942d94f580..8446140358 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -50,7 +50,7 @@ jobs: moab_version : [ 5.3.0, ] - geant_version : [ + geant4_version : [ 10.7.4, 11.1.2 ] @@ -59,7 +59,7 @@ jobs: ] container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant_version != 'OFF' && '-geant4_' || '' }}${{ matrix.geant_version }}${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }}${{ matrix.double_down_version }}/moab:latest + image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant4_version != 'OFF' && '-geant4_' || '' }}${{ matrix.geant4_version != 'OFF' && matrix.geant4_version || '' }}${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }}${{ matrix.double_down_version != 'OFF' && matrix.double_down_version || '' }}/moab:latest steps: - name: Checkout repository @@ -74,7 +74,7 @@ jobs: cd ./build git config --global --add safe.directory $GITHUB_WORKSPACE cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${{ matrix.geant_version != 'OFF' && 'ON' || 'OFF' }} \ + -DBUILD_GEANT4=${{ matrix.geant4_version != 'OFF' && 'ON' || 'OFF' }} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=OFF \ From 787403ad1eb19685353ba553fbc1a70cefdb949b Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 18 Dec 2023 23:05:35 +0600 Subject: [PATCH 18/33] DOUBLE_DOWN 1.1.0 REQUIRED --- cmake/DAGMC_macros.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index ab24897a52..609ba0146a 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -89,7 +89,7 @@ macro (dagmc_setup_options) endif() if (DOUBLE_DOWN) - find_package(DOUBLE_DOWN REQUIRED) + find_package(DOUBLE_DOWN 1.1.0 REQUIRED) endif() From ef39d664deba3e24ef5405c1402541f093babc7d Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Mon, 18 Dec 2023 23:29:17 +0600 Subject: [PATCH 19/33] Update cmake/DAGMC_macros.cmake Co-authored-by: Patrick Shriwise --- cmake/DAGMC_macros.cmake | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 609ba0146a..d872610f41 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -89,7 +89,11 @@ macro (dagmc_setup_options) endif() if (DOUBLE_DOWN) - find_package(DOUBLE_DOWN 1.1.0 REQUIRED) + find_package(DOUBLE_DOWN REQUIRED) + if (${DOUBLE_DOWN_VERSION} VERSION_LESS 1.1.0) + message(FATAL_ERROR "Discovered Double Down Version: ${DOUBLE_DOWN_VERSION}. \ + Please update Double Down to version 1.1.0 or greater.") + endif() endif() From 09dfdb3a2d2fd1fe95882dd4d123398546686bcf Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Wed, 20 Sep 2023 14:52:25 -0500 Subject: [PATCH 20/33] update pyne version --- src/pyne/pyne | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pyne/pyne b/src/pyne/pyne index 36a6b4bf46..e55e52e24a 160000 --- a/src/pyne/pyne +++ b/src/pyne/pyne @@ -1 +1 @@ -Subproject commit 36a6b4bf46582e59c9f5fed94d3cc5841f79233b +Subproject commit e55e52e24a5394aebec78a15e94842fba86f68c9 From d9adb178ac97d19b423daff07c2bd731fbcc92cf Mon Sep 17 00:00:00 2001 From: "Paul P.H. Wilson" Date: Wed, 20 Sep 2023 17:21:48 -0500 Subject: [PATCH 21/33] update version strings --- CMakeLists.txt | 2 +- doc/CHANGELOG.rst | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6fbd7b94c8..3ab2034a1a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,7 @@ enable_language(CXX) # Set DAGMC version set(DAGMC_MAJOR_VERSION 3) set(DAGMC_MINOR_VERSION 2) -set(DAGMC_PATCH_VERSION 2) +set(DAGMC_PATCH_VERSION 3) set(DAGMC_VERSION ${DAGMC_MAJOR_VERSION}.${DAGMC_MINOR_VERSION}.${DAGMC_PATCH_VERSION}) if(MSVC) diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 9ef48281f4..75c3f46228 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -7,6 +7,9 @@ DAGMC Changelog Next version ==================== +v3.2.3 +==================== + **Changed:** * Improvements/corrections to graveyard capabilities (#855) From fe7acca6b474344387cd2f4c1ca67b04ad0e8257 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 21:59:45 +0600 Subject: [PATCH 22/33] remove extra variables --- .github/actions/upstream-test/action.yml | 10 +-------- .github/workflows/docker_publish.yml | 10 +-------- CI/Dockerfile | 27 +++++++++++------------- 3 files changed, 14 insertions(+), 33 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index f15e09120c..1c4057eb6e 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -46,19 +46,11 @@ runs: image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-hdf5_${{ inputs.hdf5_version}}-moab_${{ inputs.moab_version }} if [ ${{ inputs.geant4_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-geant4_${{ inputs.geant4_version }} - GEANT4=ON - else - GEANT4=OFF fi if [ ${{ inputs.double_down_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-double_down_${{ inputs.double_down_version }} - DOUBLE_DOWN=ON - else - DOUBLE_DOWN=OFF fi echo "image_base_tag=${image_base_tag}" >> $GITHUB_ENV - echo "GEANT4=${GEANT4}" >> $GITHUB_ENV - echo "DOUBLE_DOWN=${DOUBLE_DOWN}" >> $GITHUB_ENV - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 @@ -70,4 +62,4 @@ runs: parallel: true tag-latest-on-default: false dockerfile: CI/Dockerfile - build-args: UBUNTU_VERSION=${{ inputs.ubuntu_version }}, COMPILER=${{ inputs.compiler }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, GEANT4=${{ env.GEANT4 }}, GEANT4_VERSION=${{ inputs.geant4_version }}, DOUBLE_DOWN=${{ env.DOUBLE_DOWN }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} + build-args: UBUNTU_VERSION=${{ inputs.ubuntu_version }}, COMPILER=${{ inputs.compiler }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, GEANT4_VERSION=${{ inputs.geant4_version }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 403f05361f..481f70c054 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -62,19 +62,11 @@ jobs: image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} if [ ${{ matrix.geant4_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} - GEANT4=ON - else - GEANT4=OFF fi if [ ${{ matrix.double_down_version }} != "OFF" ] ; then image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} - DOUBLE_DOWN=ON - else - DOUBLE_DOWN=OFF fi echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" - echo "GEANT4=${GEANT4}" >> "$GITHUB_ENV" - echo "DOUBLE_DOWN=${DOUBLE_DOWN}" >> "$GITHUB_ENV" - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 @@ -86,7 +78,7 @@ jobs: parallel: true tag-latest-on-default: ${{ env.tag-latest-on-default }} dockerfile: CI/Dockerfile - build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4=${{ env.GEANT4 }}, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN=${{ env.DOUBLE_DOWN }}, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} + build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} push_stable_ci_img: diff --git a/CI/Dockerfile b/CI/Dockerfile index 04f0203681..cbc3837fe6 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -7,10 +7,10 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 ARG EMBREE_VERSION=v4.0.1 -ARG GEANT4=ON +# Setting GEANT4_VERSION=OFF will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 -ARG DOUBLE_DOWN=ON +# Setting DOUBLE_DOWN_VERSION=OFF will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 ARG CI_JOBS=4 @@ -42,9 +42,9 @@ RUN apt-get update --yes && \ libhdf5-dev \ libtool \ libeigen3-dev\ - python3-numpy \ python3 \ python3-pip \ + python3-numpy \ python3-setuptools \ python3-dev \ libpython3-dev \ @@ -52,7 +52,7 @@ RUN apt-get update --yes && \ apt-get clean && rm -rf /var/lib/apt/lists/* && \ update-alternatives --install /usr/bin/python python /usr/bin/python3 10 && \ update-alternatives --install /usr/bin/pip pip /usr/bin/pip3 10 && \ - pip3 install "cython<3"; + pip install "cython<3"; ARG build_dir ARG install_dir @@ -73,7 +73,6 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage -ARG GEANT4 ARG GEANT4_VERSION ARG EMBREE_VERSION ARG install_dir @@ -87,7 +86,7 @@ ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -RUN if [ "${GEANT4}" = "ON" ]; then \ +RUN if [ "${GEANT4_VERSION}" != "OFF" ]; then \ 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 && \ @@ -123,7 +122,7 @@ ENV hdf5_install_dir=${install_dir}/hdf5 RUN mkdir -p ${hdf5_build_dir}/build && \ cd ${hdf5_build_dir} && \ - export HDF5_VERSION_major=`python3 -c "print('.'.join('${HDF5_VERSION}'.split('.')[:-1]))"` && \ + export HDF5_VERSION_major=`python -c "print('.'.join('${HDF5_VERSION}'.split('.')[:-1]))"` && \ 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 build && \ @@ -142,7 +141,6 @@ FROM hdf5 AS moab # accessing gloabl ARGs in build stage ARG install_dir ARG MOAB_VERSION -ARG DOUBLE_DOWN ARG DOUBLE_DOWN_VERSION ARG build_dir ARG CI_JOBS @@ -179,8 +177,7 @@ ENV embree_install_dir=${install_dir}/embree ENV embree_build_dir=${build_dir}/embree # Clone and install Embree -# Required for Double-Down -RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then \ mkdir -p ${embree_build_dir}/build && \ cd ${embree_build_dir} && \ git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ @@ -202,7 +199,7 @@ ENV double_down_install_dir=${install_dir}/double-down # Clone and install Double-Down # Performed after moab and embree install as double-down requires moab and embree -RUN if [ "${DOUBLE_DOWN}" = "ON" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then \ mkdir -p ${double_down_build_dir}/build && \ cd ${double_down_build_dir} && \ git clone -b ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ @@ -225,8 +222,8 @@ ARG install_dir ARG build_dir ARG CXX ARG CC -ARG GEANT4 -ARG DOUBLE_DOWN +ARG GEANT4_VERSION +ARG DOUBLE_DOWN_VERSION ENV dagmc_build_dir=${build_dir}/dagmc ENV dagmc_install_dir=${install_dir}/dagmc @@ -241,7 +238,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd build && \ cmake ../ \ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${GEANT4} \ + -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "OFF" ]; then echo "ON"; else echo "OFF"; fi} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 @@ -252,7 +249,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=${DOUBLE_DOWN} \ + -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then echo "ON"; else echo "OFF"; fi} \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From d2aaca993584f355f055d8bb8e297f7a26070b22 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 22:10:48 +0600 Subject: [PATCH 23/33] one arg per line --- .github/actions/upstream-test/action.yml | 8 +++++++- .github/workflows/docker_publish.yml | 8 +++++++- .github/workflows/linux_build_test.yml | 12 +++++++++++- 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 1c4057eb6e..711fbd1e5b 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -62,4 +62,10 @@ runs: parallel: true tag-latest-on-default: false dockerfile: CI/Dockerfile - build-args: UBUNTU_VERSION=${{ inputs.ubuntu_version }}, COMPILER=${{ inputs.compiler }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_VERSION=${{ inputs.moab_version }}, GEANT4_VERSION=${{ inputs.geant4_version }}, DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} + build-args: > + UBUNTU_VERSION=${{ inputs.ubuntu_version }}, + COMPILER=${{ inputs.compiler }}, + HDF5_VERSION=${{ inputs.hdf5_version }}, + MOAB_VERSION=${{ inputs.moab_version }}, + GEANT4_VERSION=${{ inputs.geant4_version }}, + DOUBLE_DOWN_VERSION=${{ inputs.double_down_version }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 481f70c054..2e197a6270 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -78,7 +78,13 @@ jobs: parallel: true tag-latest-on-default: ${{ env.tag-latest-on-default }} dockerfile: CI/Dockerfile - build-args: UBUNTU_VERSION=${{ matrix.ubuntu_version }}, COMPILER=${{ matrix.compiler }}, HDF5_VERSION=${{ matrix.hdf5_version }}, MOAB_VERSION=${{ matrix.moab_version }}, GEANT4_VERSION=${{ matrix.geant4_version }}, DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} + build-args: > + UBUNTU_VERSION=${{ matrix.ubuntu_version }}, + COMPILER=${{ matrix.compiler }}, + HDF5_VERSION=${{ matrix.hdf5_version }}, + MOAB_VERSION=${{ matrix.moab_version }}, + GEANT4_VERSION=${{ matrix.geant4_version }}, + DOUBLE_DOWN_VERSION=${{ matrix.double_down_version}} push_stable_ci_img: diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 14aa6768e2..f2497d1811 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -59,7 +59,17 @@ jobs: ] container: - image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }}${{ matrix.geant4_version != 'OFF' && '-geant4_' || '' }}${{ matrix.geant4_version != 'OFF' && matrix.geant4_version || '' }}${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }}${{ matrix.double_down_version != 'OFF' && matrix.double_down_version || '' }}/moab:latest + image: > + ghcr.io/svalinn/dagmc-ci + -ubuntu-${{ matrix.ubuntu_version }} + -${{ matrix.compiler}} + -hdf5_${{ matrix.hdf5_version}} + -moab_${{ matrix.moab_version }} + ${{ matrix.geant4_version != 'OFF' && '-geant4_' || '' }} + ${{ matrix.geant4_version != 'OFF' && matrix.geant4_version || '' }} + ${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }} + ${{ matrix.double_down_version != 'OFF' && matrix.double_down_version || '' }} + /moab:latest steps: - name: Checkout repository From e62f0ffab32a62f4e90d7d4dc0d8c20213acbba6 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:05:37 +0600 Subject: [PATCH 24/33] OFF -> no --- .github/actions/upstream-test/action.yml | 25 +++++++--------- .github/workflows/docker_publish.yml | 38 +++++++++++------------- .github/workflows/linux_build_test.yml | 12 ++++---- CI/Dockerfile | 14 ++++----- 4 files changed, 39 insertions(+), 50 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 711fbd1e5b..0986f50085 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -8,7 +8,7 @@ inputs: geant4_version: description: Version of Geant4 required: false - default: OFF + default: no ubuntu_version: description: Underlying OS version required: false @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: OFF + default: no runs: using: "composite" @@ -40,22 +40,17 @@ runs: username: ${{ github.repository_owner }} password: ${{ inputs.token }} - - name: Configure docker image tag - shell: bash -l {0} - run: | - image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ inputs.ubuntu_version }}-${{ inputs.compiler}}-hdf5_${{ inputs.hdf5_version}}-moab_${{ inputs.moab_version }} - if [ ${{ inputs.geant4_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-geant4_${{ inputs.geant4_version }} - fi - if [ ${{ inputs.double_down_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-double_down_${{ inputs.double_down_version }} - fi - echo "image_base_tag=${image_base_tag}" >> $GITHUB_ENV - - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: ${{ env.image_base_tag }} + repository: > + ghcr.io/${{ github.repository_owner }}/ + dagmc-ci-ubuntu-${{ inputs.ubuntu_version }} + -${{ inputs.compiler}} + -hdf5_${{ inputs.hdf5_version}} + -moab_${{ inputs.moab_version }} + -geant4_${{ inputs.geant4_version }} + -double_down_${{ inputs.double_down_version }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 2e197a6270..92827c9569 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -33,7 +33,7 @@ jobs: 11.1.2 ] double_down_version : [ - OFF + no ] name: Installing Dependencies, Building DAGMC and running tests @@ -57,21 +57,17 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 - - name: Configure docker image tag and build arguments - run: | - image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if [ ${{ matrix.geant4_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} - fi - if [ ${{ matrix.double_down_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} - fi - echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" - - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: ${{ env.image_base_tag }} + repository: > + ghcr.io/${{ github.repository_owner }}/ + dagmc-ci-ubuntu-${{ matrix.ubuntu_version }} + -${{ matrix.compiler}} + -hdf5_${{ matrix.hdf5_version}} + -moab_${{ matrix.moab_version }} + -geant4_${{ matrix.geant4_version }} + -double_down_${{ matrix.double_down_version }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false @@ -112,7 +108,7 @@ jobs: 11.1.2 ] double_down_version : [ - OFF + no ] name: Pushing final images @@ -128,13 +124,13 @@ jobs: - name: Configure docker image tag if: ${{ github.repository_owner == 'svalinn' }} run: | - image_base_tag=ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_version }}-${{ matrix.compiler}}-hdf5_${{ matrix.hdf5_version}}-moab_${{ matrix.moab_version }} - if [ ${{ matrix.geant4_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-geant4_${{ matrix.geant4_version }} - fi - if [ ${{ matrix.double_down_version }} != "OFF" ] ; then - image_base_tag=${image_base_tag}-double_down_${{ matrix.double_down_version }} - fi + image_base_tag=ghcr.io/${{ github.repository_owner }}/ + image_base_tag+=dagmc-ci-ubuntu-${{ matrix.ubuntu_version }} + image_base_tag+=-${{ matrix.compiler}} + image_base_tag+=-hdf5_${{ matrix.hdf5_version}} + image_base_tag+=-moab_${{ matrix.moab_version }} + image_base_tag+=-geant4_${{ matrix.geant4_version }} + image_base_tag+=-double_down_${{ matrix.double_down_version }} echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" - name: Push Image as latest img diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index f2497d1811..36a51fab59 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -55,7 +55,7 @@ jobs: 11.1.2 ] double_down_version : [ - OFF + no ] container: @@ -65,10 +65,8 @@ jobs: -${{ matrix.compiler}} -hdf5_${{ matrix.hdf5_version}} -moab_${{ matrix.moab_version }} - ${{ matrix.geant4_version != 'OFF' && '-geant4_' || '' }} - ${{ matrix.geant4_version != 'OFF' && matrix.geant4_version || '' }} - ${{ matrix.double_down_version != 'OFF' && '-double_down_' || '' }} - ${{ matrix.double_down_version != 'OFF' && matrix.double_down_version || '' }} + -geant4_${{ matrix.geant4_version }} + -double_down_${{ matrix.double_down_version }} /moab:latest steps: @@ -84,7 +82,7 @@ jobs: cd ./build git config --global --add safe.directory $GITHUB_WORKSPACE cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${{ matrix.geant4_version != 'OFF' && 'ON' || 'OFF' }} \ + -DBUILD_GEANT4=${{ matrix.geant4_version != 'no' && 'ON' || 'OFF' }} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=OFF \ @@ -94,7 +92,7 @@ jobs: -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \ - -DDOUBLE_DOWN=${{ matrix.double_down_version != 'OFF' && 'ON' || 'OFF' }} \ + -DDOUBLE_DOWN=${{ matrix.double_down_version != 'no' && 'ON' || 'OFF' }} \ -DCMAKE_CXX_FLAGS="-Werror=reorder" \ -Ddd_ROOT=${double_down_install_dir} && \ make -j2 && \ diff --git a/CI/Dockerfile b/CI/Dockerfile index cbc3837fe6..2f22b99e30 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -7,10 +7,10 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 ARG EMBREE_VERSION=v4.0.1 -# Setting GEANT4_VERSION=OFF will disable GEANT4 build +# Setting GEANT4_VERSION=no will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 -# Setting DOUBLE_DOWN_VERSION=OFF will disable DOUBLE_DOWN build +# Setting DOUBLE_DOWN_VERSION=no will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 ARG CI_JOBS=4 @@ -86,7 +86,7 @@ ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -RUN if [ "${GEANT4_VERSION}" != "OFF" ]; then \ +RUN if [ "${GEANT4_VERSION}" != "no" ]; then \ 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 && \ @@ -177,7 +177,7 @@ ENV embree_install_dir=${install_dir}/embree ENV embree_build_dir=${build_dir}/embree # Clone and install Embree -RUN if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then \ mkdir -p ${embree_build_dir}/build && \ cd ${embree_build_dir} && \ git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ @@ -199,7 +199,7 @@ ENV double_down_install_dir=${install_dir}/double-down # Clone and install Double-Down # Performed after moab and embree install as double-down requires moab and embree -RUN if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then \ mkdir -p ${double_down_build_dir}/build && \ cd ${double_down_build_dir} && \ git clone -b ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ @@ -238,7 +238,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd build && \ cmake ../ \ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "OFF" ]; then echo "ON"; else echo "OFF"; fi} \ + -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "no" ]; then echo "ON"; else echo "OFF"; fi} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 @@ -249,7 +249,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "OFF" ]; then echo "ON"; else echo "OFF"; fi} \ + -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then echo "ON"; else echo "OFF"; fi} \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From 27430e7dc0c12803e66f93ede7a8f33598a88f14 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:07:05 +0600 Subject: [PATCH 25/33] restore --- .github/workflows/linux_build_test.yml | 28 +++++++++----------------- 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 36a51fab59..02f43977e7 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -36,7 +36,7 @@ jobs: strategy: matrix: - ubuntu_version : [ + ubuntu_versions : [ 20.04, 22.04, ] @@ -44,30 +44,22 @@ jobs: gcc, clang, ] - hdf5_version : [ + hdf5_versions : [ 1.14.3, ] - moab_version : [ + moab_versions : [ 5.3.0, ] - geant4_version : [ + double_down : [ + OFF, + ] + geant_version : [ 10.7.4, 11.1.2 ] - double_down_version : [ - no - ] container: - image: > - ghcr.io/svalinn/dagmc-ci - -ubuntu-${{ matrix.ubuntu_version }} - -${{ matrix.compiler}} - -hdf5_${{ matrix.hdf5_version}} - -moab_${{ matrix.moab_version }} - -geant4_${{ matrix.geant4_version }} - -double_down_${{ matrix.double_down_version }} - /moab:latest + image: ghcr.io/svalinn/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-geant4_${{ matrix.geant_version }}-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}/moab:latest steps: - name: Checkout repository @@ -82,7 +74,7 @@ jobs: cd ./build git config --global --add safe.directory $GITHUB_WORKSPACE cmake ../ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${{ matrix.geant4_version != 'no' && 'ON' || 'OFF' }} \ + -DBUILD_GEANT4=ON \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ -DBUILD_MW_REG_TESTS=OFF \ @@ -92,7 +84,7 @@ jobs: -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${install_dir}/dagmc \ - -DDOUBLE_DOWN=${{ matrix.double_down_version != 'no' && 'ON' || 'OFF' }} \ + -DDOUBLE_DOWN=${double_down} \ -DCMAKE_CXX_FLAGS="-Werror=reorder" \ -Ddd_ROOT=${double_down_install_dir} && \ make -j2 && \ From 4219b7c12874caec92a6d4975c0118a43e022b42 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:40:03 +0600 Subject: [PATCH 26/33] no -> off --- .github/actions/upstream-test/action.yml | 4 ++-- .github/workflows/docker_publish.yml | 4 ++-- CI/Dockerfile | 14 +++++++------- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml index 0986f50085..7cbf61ee18 100644 --- a/.github/actions/upstream-test/action.yml +++ b/.github/actions/upstream-test/action.yml @@ -8,7 +8,7 @@ inputs: geant4_version: description: Version of Geant4 required: false - default: no + default: off ubuntu_version: description: Underlying OS version required: false @@ -28,7 +28,7 @@ inputs: double_down_version: description: Version of Double Down required: false - default: no + default: off runs: using: "composite" diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 92827c9569..977ca36c33 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -33,7 +33,7 @@ jobs: 11.1.2 ] double_down_version : [ - no + off ] name: Installing Dependencies, Building DAGMC and running tests @@ -108,7 +108,7 @@ jobs: 11.1.2 ] double_down_version : [ - no + off ] name: Pushing final images diff --git a/CI/Dockerfile b/CI/Dockerfile index 2f22b99e30..82372b7685 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -7,10 +7,10 @@ ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 ARG EMBREE_VERSION=v4.0.1 -# Setting GEANT4_VERSION=no will disable GEANT4 build +# Setting GEANT4_VERSION=off will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.3.0 -# Setting DOUBLE_DOWN_VERSION=no will disable DOUBLE_DOWN build +# Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build ARG DOUBLE_DOWN_VERSION=v1.1.0 ARG CI_JOBS=4 @@ -86,7 +86,7 @@ ENV geant4_tarball=${geant4_basename}.tar.gz ENV geant4_build_dir=${build_dir}/geant4 ENV geant4_install_dir=${install_dir}/geant4 -RUN if [ "${GEANT4_VERSION}" != "no" ]; then \ +RUN if [ "${GEANT4_VERSION}" != "off" ]; then \ 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 && \ @@ -177,7 +177,7 @@ ENV embree_install_dir=${install_dir}/embree ENV embree_build_dir=${build_dir}/embree # Clone and install Embree -RUN if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ mkdir -p ${embree_build_dir}/build && \ cd ${embree_build_dir} && \ git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ @@ -199,7 +199,7 @@ ENV double_down_install_dir=${install_dir}/double-down # Clone and install Double-Down # Performed after moab and embree install as double-down requires moab and embree -RUN if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then \ +RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ mkdir -p ${double_down_build_dir}/build && \ cd ${double_down_build_dir} && \ git clone -b ${DOUBLE_DOWN_VERSION} --depth 1 https://github.com/pshriwise/double-down.git && \ @@ -238,7 +238,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd build && \ cmake ../ \ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "no" ]; then echo "ON"; else echo "OFF"; fi} \ + -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "off" ]; then echo "ON"; else echo "OFF"; fi} \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 @@ -249,7 +249,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "no" ]; then echo "ON"; else echo "OFF"; fi} \ + -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then echo "ON"; else echo "OFF"; fi} \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From d645877ef80769f1948dd35ab60be2a808745e41 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:49:01 +0600 Subject: [PATCH 27/33] fix image tag --- .github/workflows/docker_publish.yml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 977ca36c33..04f478b714 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -57,17 +57,21 @@ jobs: - name: Checkout repository uses: actions/checkout@v3 + - name: Configure docker image tag + run: | + image_base_tag=ghcr.io/${{ github.repository_owner }}/ + image_base_tag+=dagmc-ci-ubuntu-${{ matrix.ubuntu_version }} + image_base_tag+=-${{ matrix.compiler}} + image_base_tag+=-hdf5_${{ matrix.hdf5_version}} + image_base_tag+=-moab_${{ matrix.moab_version }} + image_base_tag+=-geant4_${{ matrix.geant4_version }} + image_base_tag+=-double_down_${{ matrix.double_down_version }} + echo "image_base_tag=${image_base_tag}" >> "$GITHUB_ENV" + - name: Installing Dependencies in Docker image uses: firehed/multistage-docker-build-action@v1 with: - repository: > - ghcr.io/${{ github.repository_owner }}/ - dagmc-ci-ubuntu-${{ matrix.ubuntu_version }} - -${{ matrix.compiler}} - -hdf5_${{ matrix.hdf5_version}} - -moab_${{ matrix.moab_version }} - -geant4_${{ matrix.geant4_version }} - -double_down_${{ matrix.double_down_version }} + repository: ${{ env.image_base_tag }} stages: base, external_deps, hdf5, moab, dagmc server-stage: dagmc_test quiet: false From b68d9f8a379c29f9d16812cba4406bf34f18ddc4 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:56:09 +0600 Subject: [PATCH 28/33] bad substitution fix --- CI/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 82372b7685..a47edf80da 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -238,7 +238,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ cd build && \ cmake ../ \ -DMOAB_DIR=${moab_install_dir} \ - -DBUILD_GEANT4=${if [ "${GEANT4_VERSION}" != "off" ]; then echo "ON"; else echo "OFF"; fi} \ + -DBUILD_GEANT4=$([ "${GEANT4_VERSION}" != "off" ] && echo "ON" || echo "OFF") \ -DGEANT4_DIR=${geant4_install_dir} \ -DBUILD_CI_TESTS=ON \ # reg tests disabled see issue https://github.com/svalinn/DAGMC/issues/858 @@ -249,7 +249,7 @@ RUN mkdir -p ${dagmc_build_dir}/build && \ -DCMAKE_CXX_COMPILER=${CXX} \ -DCMAKE_Fortran_COMPILER=gfortran \ -DCMAKE_INSTALL_PREFIX=${dagmc_install_dir} \ - -DDOUBLE_DOWN=${if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then echo "ON"; else echo "OFF"; fi} \ + -DDOUBLE_DOWN=$([ "${DOUBLE_DOWN_VERSION}" != "off" ] && echo "ON" || echo "OFF") \ -Ddd_ROOT=${double_down_install_dir} && \ make -j${CI_JOBS} && \ make install From 5f844bc2fa6b4107185b3d296e8ea8f41c529c74 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Sat, 17 Feb 2024 00:08:09 +0600 Subject: [PATCH 29/33] move embree to external_deps stage --- CI/Dockerfile | 53 +++++++++++++++++++++++++++------------------------ 1 file changed, 28 insertions(+), 25 deletions(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index c9a23c4fcd..93e6a5219e 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -73,13 +73,36 @@ ENV CXX=clang++ FROM compiler-${COMPILER} as external_deps # accessing gloabl ARGs in build stage -ARG GEANT4_VERSION -ARG EMBREE_VERSION ARG install_dir ARG build_dir ARG CI_JOBS ARG CXX ARG CC +ARG DOUBLE_DOWN_VERSION +ARG EMBREE_VERSION +ARG GEANT4_VERSION + +ENV embree_install_dir=${install_dir}/embree +ENV embree_build_dir=${build_dir}/embree + +# Clone and install Embree +RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ + mkdir -p ${embree_build_dir}/build && \ + cd ${embree_build_dir} && \ + git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ + cd build && \ + cmake ../embree \ + -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ + -DEMBREE_TASKING_SYSTEM=INTERNAL \ + -DEMBREE_ISPC_SUPPORT=OFF \ + -DEMBREE_TUTORIALS=OFF \ + -DEMBREE_TBB_ROOT=/usr && \ + make -j${CI_JOBS} && \ + make -j${CI_JOBS} install && \ + cd && \ + rm -rf ${embree_build_dir}; \ + fi + ENV geant4_basename=geant4-v${GEANT4_VERSION} ENV geant4_tarball=${geant4_basename}.tar.gz @@ -110,12 +133,12 @@ RUN if [ "${GEANT4_VERSION}" != "off" ]; then \ FROM external_deps AS hdf5 # accessing gloabl ARGs in build stage -ARG HDF5_VERSION ARG install_dir ARG build_dir ARG CI_JOBS ARG CXX ARG CC +ARG HDF5_VERSION ENV hdf5_build_dir=${build_dir}/hdf5 ENV hdf5_install_dir=${install_dir}/hdf5 @@ -140,12 +163,12 @@ FROM hdf5 AS moab # accessing gloabl ARGs in build stage ARG install_dir -ARG MOAB_VERSION -ARG DOUBLE_DOWN_VERSION ARG build_dir ARG CI_JOBS ARG CXX ARG CC +ARG MOAB_VERSION +ARG DOUBLE_DOWN_VERSION # Set MOAB env variable @@ -173,26 +196,6 @@ RUN mkdir -p ${moab_build_dir}/build && \ cd && \ rm -rf ${moab_build_dir} -ENV embree_install_dir=${install_dir}/embree -ENV embree_build_dir=${build_dir}/embree - -# Clone and install Embree -RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \ - mkdir -p ${embree_build_dir}/build && \ - cd ${embree_build_dir} && \ - git clone -b ${EMBREE_VERSION} https://github.com/embree/embree && \ - cd build && \ - cmake ../embree \ - -DCMAKE_INSTALL_PREFIX=${embree_install_dir} \ - -DEMBREE_TASKING_SYSTEM=INTERNAL \ - -DEMBREE_ISPC_SUPPORT=OFF \ - -DEMBREE_TUTORIALS=OFF \ - -DEMBREE_TBB_ROOT=/usr && \ - make -j${CI_JOBS} && \ - make -j${CI_JOBS} install && \ - cd && \ - rm -rf ${embree_build_dir}; \ - fi ENV double_down_build_dir=${build_dir}/double-down ENV double_down_install_dir=${install_dir}/double-down From 7bd408c115e158322ecccf47e5933e20cf084eca Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Wed, 21 Feb 2024 10:54:48 +0600 Subject: [PATCH 30/33] find_package to set min version --- .github/workflows/docker_publish.yml | 3 ++- cmake/DAGMC_macros.cmake | 6 +----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 8ae166fa2f..e89a79b530 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -34,7 +34,8 @@ jobs: 11.1.2 ] double_down_version : [ - off + v1.0.0, + v1.1.0, ] name: Installing Dependencies, Building DAGMC and running tests diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index d872610f41..609ba0146a 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -89,11 +89,7 @@ macro (dagmc_setup_options) endif() if (DOUBLE_DOWN) - find_package(DOUBLE_DOWN REQUIRED) - if (${DOUBLE_DOWN_VERSION} VERSION_LESS 1.1.0) - message(FATAL_ERROR "Discovered Double Down Version: ${DOUBLE_DOWN_VERSION}. \ - Please update Double Down to version 1.1.0 or greater.") - endif() + find_package(DOUBLE_DOWN 1.1.0 REQUIRED) endif() From b2609ff0286dbe3c8366ca310f591fc4a3bf7560 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Wed, 21 Feb 2024 16:13:01 +0600 Subject: [PATCH 31/33] embre 3.6.1 --- CI/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Dockerfile b/CI/Dockerfile index 93e6a5219e..3a5512daf3 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,7 +6,7 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 -ARG EMBREE_VERSION=v4.0.1 +ARG EMBREE_VERSION=v3.6.1 # Setting GEANT4_VERSION=off will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.5.1 From 61dff564f20e624b0f317e782a90b4e4a5686749 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 22 Feb 2024 00:14:26 +0600 Subject: [PATCH 32/33] set min version of DD and Geant4 in legacy way --- .github/workflows/docker_publish.yml | 5 +++-- CI/Dockerfile | 2 +- cmake/DAGMC_macros.cmake | 6 +++++- src/geant4/CMakeLists.txt | 6 +++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index e89a79b530..0337034b52 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -34,7 +34,7 @@ jobs: 11.1.2 ] double_down_version : [ - v1.0.0, + off, v1.1.0, ] @@ -115,7 +115,8 @@ jobs: 11.1.2 ] double_down_version : [ - off + off, + v1.1.0, ] name: Pushing final images diff --git a/CI/Dockerfile b/CI/Dockerfile index 3a5512daf3..93e6a5219e 100644 --- a/CI/Dockerfile +++ b/CI/Dockerfile @@ -6,7 +6,7 @@ # Global ARGS set before the first build stage are accessable by all build stages ARG UBUNTU_VERSION=22.04 ARG HDF5_VERSION=1.14.3 -ARG EMBREE_VERSION=v3.6.1 +ARG EMBREE_VERSION=v4.0.1 # Setting GEANT4_VERSION=off will disable GEANT4 build ARG GEANT4_VERSION=11.1.2 ARG MOAB_VERSION=5.5.1 diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index 609ba0146a..f77c316e7d 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -89,7 +89,11 @@ macro (dagmc_setup_options) endif() if (DOUBLE_DOWN) - find_package(DOUBLE_DOWN 1.1.0 REQUIRED) + find_package(DOUBLE_DOWN REQUIRED) + if (${DOUBLE_DOWN_VERSION} VERSION_LESS 1.1.0) + message(FATAL_ERROR "Discovered Double Down Version: ${DOUBLE_DOWN_VERSION}. \ + Please update Double Down version to 1.1.0 or greater.") + endif() endif() diff --git a/src/geant4/CMakeLists.txt b/src/geant4/CMakeLists.txt index 7599946d9b..a51ec20c3c 100644 --- a/src/geant4/CMakeLists.txt +++ b/src/geant4/CMakeLists.txt @@ -1,6 +1,10 @@ message("") -find_package(Geant4 10.4.2 REQUIRED) +find_package(Geant4 REQUIRED) +if (${Geant4_VERSION} VERSION_LESS 10.4.2) + message(FATAL_ERROR "Discovered Geant4 Version: ${Geant4_VERSION}. \ + Please update Geant4 version to 10.4.2 or greater.") +endif() if ( Geant4_VERSION GREATER_EQUAL 11.0 ) message(STATUS "Configuring DAGMC for Geant4 version >= 11.0") From abe00a46940146c8566bbf93c7954644fb8303e1 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 22 Feb 2024 10:36:26 +0600 Subject: [PATCH 33/33] if statements in CMake do not require the use of ${} for variable expansion --- cmake/DAGMC_macros.cmake | 4 ++-- src/geant4/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/DAGMC_macros.cmake b/cmake/DAGMC_macros.cmake index f77c316e7d..9b8b5b9db6 100644 --- a/cmake/DAGMC_macros.cmake +++ b/cmake/DAGMC_macros.cmake @@ -90,9 +90,9 @@ macro (dagmc_setup_options) if (DOUBLE_DOWN) find_package(DOUBLE_DOWN REQUIRED) - if (${DOUBLE_DOWN_VERSION} VERSION_LESS 1.1.0) + if (DOUBLE_DOWN_VERSION VERSION_LESS 1.1.0) message(FATAL_ERROR "Discovered Double Down Version: ${DOUBLE_DOWN_VERSION}. \ - Please update Double Down version to 1.1.0 or greater.") + Please update Double Down to version 1.1.0 or greater.") endif() endif() diff --git a/src/geant4/CMakeLists.txt b/src/geant4/CMakeLists.txt index a51ec20c3c..3df5256e50 100644 --- a/src/geant4/CMakeLists.txt +++ b/src/geant4/CMakeLists.txt @@ -1,7 +1,7 @@ message("") find_package(Geant4 REQUIRED) -if (${Geant4_VERSION} VERSION_LESS 10.4.2) +if (Geant4_VERSION VERSION_LESS 10.4.2) message(FATAL_ERROR "Discovered Geant4 Version: ${Geant4_VERSION}. \ Please update Geant4 version to 10.4.2 or greater.") endif()