diff --git a/.github/actions/upstream-test/action.yml b/.github/actions/upstream-test/action.yml new file mode 100644 index 0000000000..0cb8182274 --- /dev/null +++ b/.github/actions/upstream-test/action.yml @@ -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 }} diff --git a/.github/workflows/docker_publish.yml b/.github/workflows/docker_publish.yml index 5b9d9cadc3..c8d84031f4 100644 --- a/.github/workflows/docker_publish.yml +++ b/.github/workflows/docker_publish.yml @@ -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: @@ -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] @@ -82,6 +89,12 @@ jobs: moab_versions : [ 5.3.0, ] + double_down : [ + OFF, + ] + geant_version : [ + 10.7.4, + ] name: Pushing final images steps: @@ -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 diff --git a/.github/workflows/linux_build_test.yml b/.github/workflows/linux_build_test.yml index 51fbd0a598..5dc1b221da 100644 --- a/.github/workflows/linux_build_test.yml +++ b/.github/workflows/linux_build_test.yml @@ -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: @@ -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/**' diff --git a/.github/workflows/linux_build_test_merge.yml b/.github/workflows/linux_build_test_merge.yml deleted file mode 100644 index 3cd90689a8..0000000000 --- a/.github/workflows/linux_build_test_merge.yml +++ /dev/null @@ -1,121 +0,0 @@ -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 - continue-on-error: true - - strategy: - matrix: - ubuntu_versions : [ - 22.04, - ] - compiler : [ - gcc, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - master, - ] - double_down : [ - OFF, - ] - include: - - ubuntu_versions: 22.04 - compiler: gcc - hdf5_versions: 1.10.4 - moab_versions : 5.3.0 - double_down : ON - - name: Installing Dependencies - steps: - - name: default environment - run: | - echo "tag-latest-on-default=false" >> "$GITHUB_ENV" - - - name: condition on trigger parameters - if: ${{ github.repository_owner == 'svalinn' && github.ref == 'refs/heads/develop' }} - run: | - echo "tag-latest-on-default=true" >> "$GITHUB_ENV" - - - name: Log in to the Container registry - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Checkout repository - uses: actions/checkout@v3 - - - 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 }} - 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 }}, double_down=${{ matrix.double_down }} - - push_stable_ci_img: - needs: [build-dependency-and-test-img] - runs-on: ubuntu-latest - - strategy: - matrix: - ubuntu_versions : [ - 22.04, - ] - compiler : [ - gcc, - ] - hdf5_versions : [ - 1.10.4, - ] - moab_versions : [ - master, - ] - - name: Pushing final images - steps: - - name: Log in to the Container registry - if: ${{ github.repository_owner == 'svalinn' }} - uses: docker/login-action@v2 - with: - registry: ghcr.io - username: ${{ github.repository_owner }} - password: ${{ secrets.GITHUB_TOKEN }} - - - 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 - - - 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 diff --git a/.github/workflows/linux_upstream_test_double_down.yml b/.github/workflows/linux_upstream_test_double_down.yml new file mode 100644 index 0000000000..b23332db74 --- /dev/null +++ b/.github/workflows/linux_upstream_test_double_down.yml @@ -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 + + diff --git a/.github/workflows/linux_upstream_test_geant4.yml b/.github/workflows/linux_upstream_test_geant4.yml new file mode 100644 index 0000000000..d5871a4907 --- /dev/null +++ b/.github/workflows/linux_upstream_test_geant4.yml @@ -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 + diff --git a/.github/workflows/linux_upstream_test_moab.yml b/.github/workflows/linux_upstream_test_moab.yml new file mode 100644 index 0000000000..4e6df8faf2 --- /dev/null +++ b/.github/workflows/linux_upstream_test_moab.yml @@ -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 diff --git a/.github/workflows/mac_build_test.yml b/.github/workflows/mac_build_test.yml index 8703829cf3..83a859f655 100644 --- a/.github/workflows/mac_build_test.yml +++ b/.github/workflows/mac_build_test.yml @@ -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/**' @@ -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/**' diff --git a/.github/workflows/windows_build_test.yml b/.github/workflows/windows_build_test.yml index 6c4c9143b7..2667416707 100644 --- a/.github/workflows/windows_build_test.yml +++ b/.github/workflows/windows_build_test.yml @@ -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/mac_build_test.yml' - '.github/workflows/housekeeping.yml' - '.github/workflows/changelog_test.yml' + - '.github/actions/**' - 'CI/**' - 'doc/**' @@ -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/mac_build_test.yml' - '.github/workflows/housekeeping.yml' - '.github/workflows/changelog_test.yml' + - '.github/actions/**' - 'CI/**' - 'doc/**' diff --git a/README.rst b/README.rst index 574db2aac9..9a6a95a460 100644 --- a/README.rst +++ b/README.rst @@ -42,10 +42,16 @@ Quick links: * `Contributors guide `_ * `Release instructions `_ -*Preview CI for MOAB `master` and `develop`* +*Preview CI for versions of upstream dependencies * -.. image:: https://github.com/svalinn/DAGMC/actions/workflows/linux_build_test_merge.yml/badge.svg?branch=develop - :target: https://github.com/svalinn/DAGMC/actions/workflows/linux_build_test_merge.yml +.. image:: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_moab.yml/badge.svg?branch=develop + :target: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_moab.yml + +.. image:: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_geant4.yml/badge.svg?branch=develop + :target: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_geant4.yml + +.. image:: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_double_down.yml/badge.svg?branch=develop + :target: https://github.com/svalinn/DAGMC/actions/workflows/linux_upstream_test_double_down.yml .. _DAGMC: https://svalinn.github.io/DAGMC .. _Cubit: https://coreform.com/products/coreform-cubit/ diff --git a/doc/CHANGELOG.rst b/doc/CHANGELOG.rst index 3ec4626740..23f6aad0bb 100644 --- a/doc/CHANGELOG.rst +++ b/doc/CHANGELOG.rst @@ -20,11 +20,10 @@ Next version * Moved scripts to Dockerfile and parallel CI (#863) * Removed unused Circle CI yml (#859) * Added configuration options to CMake configuration file (#867) - * Change test-on-merge against MOAB master/develop to be optional (#870) * Introduced logger to better manage console output (#876) * Streamline CI to take advantage of better docker image management (#880, #896) * Move more CI from scripts to actions (#895) - * Add double-down to test-on-merge (#898) + * Develop advisory tests on merge for MOAB, double-down and Geant4 (#870, #898, #899) **Fixed:** * Patch to compile with Geant4 10.6 (#803)