From e62f0ffab32a62f4e90d7d4dc0d8c20213acbba6 Mon Sep 17 00:00:00 2001 From: Ahnaf Tahmid Chowdhury Date: Thu, 21 Dec 2023 23:05:37 +0600 Subject: [PATCH] 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 711fbd1e5..0986f5008 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 2e197a627..92827c956 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 f2497d181..36a51fab5 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 cbc3837fe..2f22b99e3 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