Skip to content

Commit

Permalink
streamline dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnaf-tahmid-chowdhury committed Mar 1, 2024
1 parent 986c7d2 commit 3b90d4c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/actions/upstream-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ inputs:
hdf5_version:
description: Version of HDF5
required: false
default: 1.14.3
default: hdf5_1_14_3
moab_version:
description: Version of MOAB
required: false
Expand Down
12 changes: 6 additions & 6 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:
clang,
]
hdf5_version : [
1.14.3,
hdf5_1_14_3,
]
moab_version : [
5.4.1,
5.5.1,
]
geant4_version : [
off,
10.7.4,
11.1.2
v10.7.4,
v11.1.2
]
double_down_version : [
off,
Expand Down Expand Up @@ -105,16 +105,16 @@ jobs:
clang,
]
hdf5_version : [
1.14.3,
hdf5_1_14_3,
]
moab_version : [
5.4.1,
5.5.1,
]
geant4_version : [
off,
10.7.4,
11.1.2
v10.7.4,
v11.1.2
]
double_down_version : [
off,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linux_upstream_test_geant4.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test against newer Geant4 on PR merge
name: Test against Geant4 development branch (master) on PR merge

on:
# allows us to run workflows manually
Expand Down Expand Up @@ -27,4 +27,4 @@ jobs:
uses: ./.github/actions/upstream-test
with:
token: ${{ secrets.GITHUB_TOKEN }}
geant_version: 11.1.2
geant_version: master
4 changes: 2 additions & 2 deletions .github/workflows/linux_upstream_test_hdf5.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test against newer hdf5 on PR merge
name: Test against HDF5 development branch on PR merge

on:
# allows us to run workflows manually
Expand Down Expand Up @@ -28,4 +28,4 @@ jobs:
uses: ./.github/actions/upstream-test
with:
token: ${{ secrets.GITHUB_TOKEN }}
hdf5_version: 1.14.3
hdf5_version: develop
30 changes: 23 additions & 7 deletions CI/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ARG UBUNTU_VERSION=22.04
ARG HDF5_VERSION=hdf5_1_14_3
ARG MOAB_VERSION=5.5.1
# Setting GEANT4_VERSION=off will disable GEANT4 build
ARG GEANT4_VERSION=v11.1.2
ARG GEANT4_VERSION=off
# Setting DOUBLE_DOWN_VERSION=off will disable DOUBLE_DOWN build
ARG DOUBLE_DOWN_VERSION=v1.1.0
ARG DOUBLE_DOWN_VERSION=off
# Setting DOUBLE_DOWN_VERSION=off will disable EMBREE build
ARG EMBREE_VERSION=v4.0.1

Expand Down Expand Up @@ -51,17 +51,17 @@ ARG INSTALL_DIR
ENV BUILD_DIR=${BUILD_DIR}
ENV INSTALL_DIR=${INSTALL_DIR}

FROM base as compiler-gcc
FROM base AS compiler-gcc

ENV CC=gcc
ENV CXX=g++

FROM base as compiler-clang
FROM base AS compiler-clang

ENV CC=clang
ENV CXX=clang++

FROM compiler-${COMPILER} as external_deps
FROM compiler-${COMPILER} AS external_deps

# accessing gloabl ARGs in build stage
ARG INSTALL_DIR
Expand Down Expand Up @@ -204,7 +204,7 @@ RUN if [ "${DOUBLE_DOWN_VERSION}" != "off" ]; then \
fi


FROM moab as dagmc
FROM moab AS dagmc

# accessing gloabl ARGs in build stage
ARG INSTALL_DIR
Expand Down Expand Up @@ -243,7 +243,7 @@ RUN mkdir -p ${DAGMC_BUILD_DIR}/build && \
make install


FROM dagmc as dagmc_test
FROM dagmc AS dagmc_test

ENV DAGMC_BUILD_DIR=${BUILD_DIR}/dagmc
ENV DAGMC_INSTALL_DIR=${INSTALL_DIR}/dagmc
Expand All @@ -261,3 +261,19 @@ RUN cd ${DAGMC_BUILD_DIR}/cmake/test_config && \
cmake . -DDAGMC_ROOT=${DAGMC_INSTALL_DIR} && \
CTEST_OUTPUT_ON_FAILURE=1 make all test

FROM scratch AS binaries

ARG INSTALL_DIR

COPY --from=dagmc_test ${INSTALL_DIR} ${INSTALL_DIR}

ENV PATH=${DAGMC_INSTALL_DIR}/bin:$PATH
ENV PATH=${MOAB_INSTALL_DIR}/bin:$PATH
ENV PATH=${EMBREE_INSTALL_DIR}/bin:$PATH
ENV PATH=${DOUBLE_DOWN_INSTALL_DIR}/bin:$PATH
ENV PATH=${HDF5_INSTALL_DIR}/bin:$PATH
ENV PATH=${GEANT4_INSTALL_DIR}/bin:$PATH

WORKDIR ${INSTALL_DIR}

ENTRYPOINT ["/bin/bash"]

0 comments on commit 3b90d4c

Please sign in to comment.