Skip to content

Commit

Permalink
Merge pull request #899 from gonuke/upstream_tests
Browse files Browse the repository at this point in the history
Add tests on merge for various upstream packages
  • Loading branch information
pshriwise authored Aug 31, 2023
2 parents b3e2b13 + 717d694 commit a7d1f3f
Show file tree
Hide file tree
Showing 11 changed files with 192 additions and 138 deletions.
53 changes: 53 additions & 0 deletions .github/actions/upstream-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Test newest version of upstream dependencies on merge
description: Builds and tests the newest merged version of DAGMC against newer versions of upstream dependencies
inputs:
token:
description: token for logging in to the GHCR
required: true
default: ''
geant_version:
description: Version of Geant4
required: false
default: 10.7.4
ubuntu_version:
description: Underlying OS version
required: false
default: 22.04
compiler:
description: which compiler to use gcc or clang
required: false
default: gcc
hdf5_version:
description: Version of HDF5
required: false
default: 1.10.4
moab_version:
description: Version of MOAB
required: false
default: 5.3.0
double_down:
description: Whether or not to test Double Down
required: false
default: OFF

runs:
using: "composite"
steps:
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ inputs.token }}

- 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 }}
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.geant_version }}, UBUNTU_VERSION=${{ inputs.ubuntu_version }}, HDF5_VERSION=${{ inputs.hdf5_version }}, MOAB_BRANCH=${{ inputs.moab_version }}, double_down=${{ inputs.double_down }}
30 changes: 24 additions & 6 deletions .github/workflows/docker_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ jobs:
moab_versions : [
5.3.0,
]
double_down : [
OFF,
]
geant_version : [
10.7.4,
]

name: Installing Dependencies, Building DAGMC and running tests
steps:
Expand All @@ -53,14 +59,15 @@ 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}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}
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 }}
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: COMPILER=${{ matrix.compiler }}, UBUNTU_VERSION=${{ matrix.ubuntu_versions }}, HDF5_VERSION=${{ matrix.hdf5_versions }}, MOAB_BRANCH=${{ matrix.moab_versions }}
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 }}


push_stable_ci_img:
needs: [build-dependency-and-test-img]
Expand All @@ -82,6 +89,12 @@ jobs:
moab_versions : [
5.3.0,
]
double_down : [
OFF,
]
geant_version : [
10.7.4,
]

name: Pushing final images
steps:
Expand All @@ -93,16 +106,21 @@ jobs:
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- 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"
- 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: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}/dagmc:latest
dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}: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: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler }}-ext-hdf5_${{ matrix.hdf5_versions }}-moab_${{ matrix.moab_versions }}:latest
dst: ghcr.io/${{ github.repository_owner }}/dagmc-ci-ubuntu-${{ matrix.ubuntu_versions }}-${{ matrix.compiler}}-ext-hdf5_${{ matrix.hdf5_versions}}-moab_${{ matrix.moab_versions }}:stable
src: ${{ env.image_base_tag }}:latest
dst: ${{ env.image_base_tag }}:stable
6 changes: 4 additions & 2 deletions .github/workflows/linux_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ on:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/linux_build_test_merge.yml'
- '.github/workflows/linux_upstream_test_*'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- '.github/actions/**'
- 'CI/**'
- 'doc/**'
push:
Expand All @@ -22,9 +23,10 @@ on:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/linux_build_test_merge.yml'
- '.github/workflows/linux_upstream_test_*'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- '.github/actions/**'
- 'CI/**'
- 'doc/**'

Expand Down
121 changes: 0 additions & 121 deletions .github/workflows/linux_build_test_merge.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/linux_upstream_test_double_down.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Test against Double Down on PR merge

on:
# allows us to run workflows manually
workflow_dispatch:
push:
branches:
- develop
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/**'
jobs:
build-dependency-and-test-img:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: use upstream test composite action
uses: ./.github/actions/upstream-test
with:
token: ${{ secrets.GITHUB_TOKEN }}
double_down: ON


31 changes: 31 additions & 0 deletions .github/workflows/linux_upstream_test_geant4.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Test against newer Geant4 on PR merge

on:
# allows us to run workflows manually
workflow_dispatch:
push:
branches:
- develop
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/**'
jobs:
build-dependency-and-test-img:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: use upstream test composite action
uses: ./.github/actions/upstream-test
with:
token: ${{ secrets.GITHUB_TOKEN }}
geant_version: 11.1.1

30 changes: 30 additions & 0 deletions .github/workflows/linux_upstream_test_moab.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Test against MOAB master on PR merge

on:
# allows us to run workflows manually
workflow_dispatch:
push:
branches:
- develop
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/mac_build_test.yml'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- 'CI/**'
- 'doc/**'
jobs:
build-dependency-and-test-img:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: use upstream test composite action
uses: ./.github/actions/upstream-test
with:
token: ${{ secrets.GITHUB_TOKEN }}
moab_version: master
6 changes: 4 additions & 2 deletions .github/workflows/mac_build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@ on:
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/linux_build_test_merge.yml'
- '.github/workflows/linux_upstream_test_*'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- '.github/actions/**'
- 'CI/**'
- 'doc/**'

Expand All @@ -22,10 +23,11 @@ on:
paths-ignore:
- '.github/workflows/docker_publish.yml'
- '.github/workflows/linux_build_test.yml'
- '.github/workflows/linux_build_test_merge.yml'
- '.github/workflows/linux_upstream_test_*'
- '.github/workflows/windows_build_test.yml'
- '.github/workflows/housekeeping.yml'
- '.github/workflows/changelog_test.yml'
- '.github/actions/**'
- 'CI/**'
- 'doc/**'

Expand Down
Loading

0 comments on commit a7d1f3f

Please sign in to comment.