Skip to content

Factoring hysteresis model out of TableRelativePermeabilityHysteresis #494

Factoring hysteresis model out of TableRelativePermeabilityHysteresis

Factoring hysteresis model out of TableRelativePermeabilityHysteresis #494

Workflow file for this run

name: GEOS CI
on: pull_request
# Cancels in-progress workflows for a PR when updated
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
GEOSX_TPL_TAG: 224-965
jobs:
# Matrix jobs will be cancelled if PR is a draft.
# PR status must be "Open" to run CI.
check_pull_request_is_not_a_draft:
# We use the most recent ubuntu distribution available in Github Actions to ensure maximum support of google cloud's sdk.
runs-on: ubuntu-22.04
steps:
- name: Check that the PR is not a draft (cancel rest of jobs otherwise)
run: |
echo "Is PR a draft?"
echo ${{ toJSON(github.event.pull_request.draft) }}
if [[ ${{ toJSON(github.event.pull_request.draft) }} == true ]]; then "false" ; else "true"; fi
# PR must be assigned to be merged.
# This job will fail if this is not the case.
check_pull_request_is_assigned:
needs: [check_pull_request_is_not_a_draft]
runs-on: ubuntu-22.04
steps:
# Assignee ID will be null if PR is not assigned
- name: Check that the PR is assigned
run: |
id=$(curl -H "Accept: application/vnd.github+json" \
https://api.github.com/repos/${{ github.repository }}/pulls/${{ github.event.number }} \
| jq '.assignee.id')
echo "Is PR Assigned? (Check for Assignee ID)"
echo $id
if [[ $id != null ]]; then "true" ; else "false"; fi
check_submodules:
needs: [check_pull_request_is_not_a_draft]
runs-on: ubuntu-22.04
steps:
# The integrated test submodule repository contains large data (using git lfs).
# To save time (and money) we do not let Github Actions automatically clone all our (lfs) subrepositories and do it by hand.
- name: Checkout Repository
uses: actions/checkout@v3
with:
# Let script update submodules; Github Actions submodule history causes error
submodules: false
lfs: false
- name: Check that submodules are up to date
run: "scripts/test_submodule_updated.sh"
code_style:
needs: [check_pull_request_is_not_a_draft]
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Check style
env:
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: --test-code-style
run: ./scripts/ci_build_and_test.sh
documentation:
needs: [check_pull_request_is_not_a_draft]
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
lfs: false
- name: Check documentation
env:
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: --test-documentation
run: ./scripts/ci_build_and_test.sh
linux_builds:
name: ${{ matrix.name }}
# runs-on: ubuntu-22.04
runs-on: ${{ matrix.os }}
needs: [check_pull_request_is_not_a_draft]
strategy:
# In-progress jobs will not be cancelled if there is a failure
fail-fast : false
matrix:
include:
- name: Ubuntu CUDA debug (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.2.152)
DOCKER_REPOSITORY: geosx/ubuntu20.04-clang10.0.0-cuda11.2.152
OS: Runner_4core_16GB
CMAKE_BUILD_TYPE: Debug
BUILD_AND_TEST_ARGS: "--disable-unit-tests --build-exe-only --disable-schema-deployment"
ENABLE_HYPRE: ON
ENABLE_HYPRE_DEVICE: CUDA
ENABLE_TRILINOS: OFF
- name: Ubuntu CUDA (20.04, clang 10.0.0 + gcc 9.4.0, open-mpi 4.0.3, cuda-11.2.152)
DOCKER_REPOSITORY: geosx/ubuntu20.04-clang10.0.0-cuda11.2.152
# OS: Runner_8core_32GB
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: "--disable-unit-tests --disable-schema-deployment"
ENABLE_HYPRE: ON
ENABLE_HYPRE_DEVICE: CUDA
ENABLE_TRILINOS: OFF
- name: Centos (7.7, gcc 8.3.1, open-mpi 1.10.7, cuda 11.8.0)
DOCKER_REPOSITORY: geosx/centos7.7-gcc8.3.1-cuda11.8.0
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: "--disable-unit-tests --disable-schema-deployment"
- name: Ubuntu (20.04, gcc 9.3.0, open-mpi 4.0.3)
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc9
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
- name: Ubuntu debug (20.04, gcc 10.3.0, open-mpi 4.0.3)
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Debug
- name: Ubuntu (20.04, gcc 10.3.0, open-mpi 4.0.3)
DOCKER_REPOSITORY: geosx/ubuntu20.04-gcc10
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
# Matrix jobs that deploy to Google Cloud
- name: Pecan GPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5, cuda 11.5.119)
DOCKER_REPOSITORY: geosx/pecan-gpu-gcc8.2.0-openmpi4.0.1-mkl2019.5-cuda11.5.119
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
BUILD_AND_TEST_ARGS: "--build-exe-only --disable-unit-tests --disable-schema-deployment"
HOST_CONFIG: host-configs/TOTAL/pecan-GPU.cmake
GCP_BUCKET: geosx/Pecan-GPU
- name: Pecan CPU (centos 7.7, gcc 8.2.0, open-mpi 4.0.1, mkl 2019.5)
DOCKER_REPOSITORY: geosx/pecan-cpu-gcc8.2.0-openmpi4.0.1-mkl2019.5
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
HOST_CONFIG: host-configs/TOTAL/pecan-CPU.cmake
GCP_BUCKET: geosx/Pecan-CPU
- name: Pangea 2 (centos 7.6, gcc 8.3.0, open-mpi 2.1.5, mkl 2019.3)
DOCKER_REPOSITORY: geosx/pangea2-gcc8.3.0-openmpi2.1.5-mkl2019.3
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
GCP_BUCKET: geosx/Pangea2
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
- name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10)
DOCKER_REPOSITORY: geosx/sherlock-gcc10.1.0-openmpi4.1.2-openblas0.3.10-zlib1.2.11
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
HOST_CONFIG: host-configs/Stanford/sherlock-gcc10-ompi4.1.2-openblas0.3.10.cmake
GCP_BUCKET: geosx/Sherlock-CPU
ENABLE_HYPRE: ON
ENABLE_TRILINOS: OFF
- name: Ubuntu (22.04, gcc 11.2.0, open-mpi 4.1.2)
DOCKER_REPOSITORY: geosx/ubuntu22.04-gcc11
OS: ubuntu-22.04
CMAKE_BUILD_TYPE: Release
GCP_BUCKET: geosx/ubuntu22.04-gcc11
steps:
- name: Checkout Repository
uses: actions/checkout@v3
with:
submodules: true
lfs: false
- id: 'auth'
if: matrix.GCP_BUCKET
uses: 'google-github-actions/auth@v1'
with:
credentials_json: '${{ secrets.GOOGLE_CLOUD_GCP }}'
- name: 'Set up Cloud SDK'
if: matrix.GCP_BUCKET
uses: 'google-github-actions/setup-gcloud@v1'
with:
version: '>= 363.0.0'
- name: Print environment
run: printenv
# Build and test only
# Builds only the geosx executable (timeout when building tests)
- name: Build and test
if: ${{ !(matrix.GCP_BUCKET) }}
env:
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
BUILD_AND_TEST_ARGS: ${{ matrix.BUILD_AND_TEST_ARGS }}
ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }}
ENABLE_HYPRE_DEVICE: ${{ matrix.ENABLE_HYPRE_DEVICE }}
ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }}
run: ./scripts/ci_build_and_test.sh
# Build, test, uploads GEOSX and its TPL to GCP/GCS using gcloud CLI
- name: Build and test and deploy
if: matrix.GCP_BUCKET
env:
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
CMAKE_BUILD_TYPE: ${{ matrix.CMAKE_BUILD_TYPE }}
BUILD_AND_TEST_ARGS: ${{ matrix.BUILD_AND_TEST_ARGS }}
HOST_CONFIG: ${{ matrix.HOST_CONFIG }}
ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }}
ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }}
GCP_BUCKET: ${{ matrix.GCP_BUCKET }}
run: |
source ./scripts/ci_build_and_test.sh
TMP_DIR=/tmp
GEOSX_EXPORT_DIR=GEOSX-and-TPL-${GITHUB_SHA:0:7}
docker cp -a ${CONTAINER_NAME}:${GEOSX_TPL_DIR}/.. ${TMP_DIR}/${GEOSX_EXPORT_DIR}
GEOSX_BUNDLE=${TMP_DIR}/${GEOSX_EXPORT_DIR}.tar.gz
tar czf ${GEOSX_BUNDLE} --directory=${TMP_DIR} ${GEOSX_EXPORT_DIR}
CLOUDSDK_PYTHON=python3 gsutil cp -a public-read ${GEOSX_BUNDLE} gs://${GCP_BUCKET}/
# Convenience job - passes when all other jobs have passed.
check_that_all_jobs_succeeded:
runs-on: ubuntu-22.04
needs: [check_pull_request_is_not_a_draft, check_pull_request_is_assigned, check_submodules, code_style, documentation, linux_builds]
steps:
- name: Success
run: "true"