Skip to content

Commit

Permalink
OFF -> no
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnaf-tahmid-chowdhury committed Dec 21, 2023
1 parent d2aaca9 commit e62f0ff
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 50 deletions.
25 changes: 10 additions & 15 deletions .github/actions/upstream-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -28,7 +28,7 @@ inputs:
double_down_version:
description: Version of Double Down
required: false
default: OFF
default: no

runs:
using: "composite"
Expand All @@ -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
Expand Down
38 changes: 17 additions & 21 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ jobs:
11.1.2
]
double_down_version : [
OFF
no
]

name: Installing Dependencies, Building DAGMC and running tests
Expand All @@ -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
Expand Down Expand Up @@ -112,7 +108,7 @@ jobs:
11.1.2
]
double_down_version : [
OFF
no
]

name: Pushing final images
Expand All @@ -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
Expand Down
12 changes: 5 additions & 7 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ jobs:
11.1.2
]
double_down_version : [
OFF
no
]

container:
Expand All @@ -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:
Expand All @@ -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 \
Expand All @@ -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 && \
Expand Down
14 changes: 7 additions & 7 deletions CI/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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 && \
Expand Down Expand Up @@ -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 && \
Expand All @@ -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 && \
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e62f0ff

Please sign in to comment.