-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
allow to chose building geant4 and dd from actions
- Loading branch information
1 parent
2a1133e
commit fca55ad
Showing
4 changed files
with
106 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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/[email protected] | ||
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/[email protected] | ||
with: | ||
src: ${{ env.image_base_tag }}:latest | ||
dst: ${{ env.image_base_tag }}:stable | ||
src: $image_base_tag:latest | ||
dst: $image_base_tag:stable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters