Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"build": {
"dockerfile": "Dockerfile",
"args": {
"GEOS_TPL_TAG": "315-749"
"GEOS_TPL_TAG": "259-761"
}
},
"runArgs": [
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build_and_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ on:
ENABLE_HYPRE_DEVICE:
required: false
type: string
ENABLE_PYGEOSX:
required: false
type: string
ENABLE_TRILINOS:
required: false
type: string
Expand Down Expand Up @@ -230,6 +233,12 @@ jobs:
script_args+=(--enable-hypre-device "${{ inputs.ENABLE_HYPRE_DEVICE }}")
fi


# pygeosx testing
if [ "${{ inputs.ENABLE_PYGEOSX }}" == 'ON' ]; then
script_args+=(--run-pygeosx-tests)
fi

docker_args+=(--cap-add=SYS_PTRACE --rm)

script_args+=(--cmake-build-type ${{ inputs.CMAKE_BUILD_TYPE }})
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/ci_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,7 @@ jobs:
GEOS_ENABLE_BOUNDS_CHECK: OFF
GCP_BUCKET: geosx/ubuntu22.04-gcc11
HOST_CONFIG: /spack-generated.cmake
ENABLE_PYGEOSX: ON

- name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2)
CMAKE_BUILD_TYPE: Release
Expand All @@ -193,6 +194,7 @@ jobs:
BUILD_SHARED_LIBS: ON
GEOS_ENABLE_BOUNDS_CHECK: ON
HOST_CONFIG: /spack-generated.cmake
ENABLE_PYGEOSX: ON

- name: Ubuntu (22.04, gcc 12.3.0, open-mpi 4.1.2) - NO BOUNDS CHECK
CMAKE_BUILD_TYPE: Release
Expand All @@ -203,6 +205,7 @@ jobs:
BUILD_SHARED_LIBS: ON
GEOS_ENABLE_BOUNDS_CHECK: OFF
HOST_CONFIG: /spack-generated.cmake
ENABLE_PYGEOSX: ON

- name: Ubuntu (22.04, clang 15.0.7, open-mpi 4.1.2)
CMAKE_BUILD_TYPE: Release
Expand All @@ -212,6 +215,7 @@ jobs:
GEOS_ENABLE_BOUNDS_CHECK: ON
BUILD_SHARED_LIBS: ON
HOST_CONFIG: /spack-generated.cmake
ENABLE_PYGEOSX: ON

- name: Sherlock CPU (centos 7.9.2009, gcc 10.1.0, open-mpi 4.1.2, openblas 0.3.10)
CMAKE_BUILD_TYPE: Release
Expand All @@ -231,6 +235,7 @@ jobs:
DOCKER_IMAGE_TAG: ${{ needs.is_not_draft_pull_request.outputs.DOCKER_IMAGE_TAG }}
DOCKER_REPOSITORY: ${{ matrix.DOCKER_REPOSITORY }}
ENABLE_HYPRE: ${{ matrix.ENABLE_HYPRE }}
ENABLE_PYGEOSX: ${{ matrix.ENABLE_PYGEOSX }}
ENABLE_TRILINOS: ${{ matrix.ENABLE_TRILINOS }}
GEOS_ENABLE_BOUNDS_CHECK: ${{ matrix.GEOS_ENABLE_BOUNDS_CHECK }}
GCP_BUCKET: ${{ matrix.GCP_BUCKET }}
Expand Down
11 changes: 11 additions & 0 deletions host-configs/environment.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ else()
set(ENABLE_HYPRE OFF CACHE BOOL "" FORCE)
endif()

# pygeosx
if(NOT DEFINED ENABLE_PYGEOSX)
set(ENABLE_PYGEOSX "$ENV{ENABLE_PYGEOSX}" CACHE BOOL "" FORCE)
endif()
if(ENABLE_PYGEOSX)
set(Python3_EXECUTABLE /usr/bin/python3 CACHE PATH "")
set(ENABLE_PYLVARRAY ON CACHE BOOL "")
else()
set(ENABLE_PYGEOSX OFF CACHE BOOL "" FORCE)
endif()

# Same pattern
if(NOT DEFINED ENABLE_TRILINOS)
set(ENABLE_TRILINOS "$ENV{ENABLE_TRILINOS}" CACHE BOOL "" FORCE)
Expand Down
23 changes: 20 additions & 3 deletions scripts/ci_build_and_test_in_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ Usage: $0
--nproc N
Number of cores to use for the build.
--repository /path/to/repository
Internal mountpoint where the geos repository will be available.
Internal mountpoint where the geos repository will be available.
--run-pygeosx-tests
Runs the pygeosx tests.
--run-integrated-tests
Run the integrated tests. Then bundle and send the results to the cloud.
--sccache-credentials credentials.json
Expand All @@ -79,7 +81,7 @@ exit 1
# Then we'll move to the build dir.
or_die cd $(dirname $0)/..

args=$(or_die getopt -a -o h --long build-exe-only,cmake-build-type:,code-coverage,data-basename:,geos-enable-bounds-check:,enable-hypre:,enable-hypre-device:,enable-trilinos:,exchange-dir:,host-config:,install-dir-basename:,makefile,ninja,no-install-schema,no-run-unit-tests,nproc:,repository:,run-integrated-tests,sccache-credentials:,test-code-style,test-documentation,help -- "$@")
args=$(or_die getopt -a -o h --long build-exe-only,cmake-build-type:,code-coverage,data-basename:,geos-enable-bounds-check:,enable-hypre:,enable-hypre-device:,enable-trilinos:,exchange-dir:,host-config:,install-dir-basename:,makefile,ninja,no-install-schema,no-run-unit-tests,nproc:,repository:,run-pygeosx-tests,run-integrated-tests,sccache-credentials:,test-code-style,test-documentation,help -- "$@")

# Variables with default values
BUILD_EXE_ONLY=false
Expand All @@ -90,6 +92,7 @@ ENABLE_HYPRE=ON
ENABLE_HYPRE_DEVICE=CPU
GEOS_LA_INTERFACE=Hypre
RUN_UNIT_TESTS=true
RUN_PYGEOSX_TESTS=false
RUN_INTEGRATED_TESTS=false
UPLOAD_TEST_BASELINES=false
TEST_CODE_STYLE=false
Expand Down Expand Up @@ -133,6 +136,7 @@ do
--no-run-unit-tests) RUN_UNIT_TESTS=false; shift;;
--nproc) NPROC=$2; shift 2;;
--repository) GEOS_SRC_DIR=$2; shift 2;;
--run-pygeosx-tests) RUN_PYGEOSX_TESTS=true; shift;;
--run-integrated-tests) RUN_INTEGRATED_TESTS=true; shift;;
--upload-test-baselines) UPLOAD_TEST_BASELINES=true; shift;;
--code-coverage) CODE_COVERAGE=true; shift;;
Expand Down Expand Up @@ -225,6 +229,10 @@ if [[ "${RUN_INTEGRATED_TESTS}" = true ]]; then
ATS_CMAKE_ARGS="-DATS_ARGUMENTS=\"--machine openmpi --ats openmpi_mpirun=/usr/bin/mpirun --ats openmpi_args=--allow-run-as-root --ats openmpi_procspernode=32 --ats openmpi_maxprocs=32\" -DPython3_ROOT_DIR=${ATS_PYTHON_HOME} -DPython3_EXECUTABLE=${ATS_PYTHON_HOME}/bin/python3 -DATS_BASELINE_DIR=${ATS_BASELINE_DIR} -DATS_WORKING_DIR=${ATS_WORKING_DIR}"
fi

# Set CMake options for pygeosx testing
if [[ "${RUN_PYGEOSX_TESTS}" = true ]]; then
PYGEOSX_CMAKE_ARGS="-DENABLE_PYGEOSX=ON -DENABLE_PYLVARRAY=ON"
fi

if [[ "${CODE_COVERAGE}" = true ]]; then
or_die apt-get update
Expand Down Expand Up @@ -260,7 +268,8 @@ or_die python3 scripts/config-build.py \
-DENABLE_COVERAGE=$([[ "${CODE_COVERAGE}" = true ]] && echo 1 || echo 0) \
-DGEOS_ENABLE_BOUNDS_CHECK=${GEOS_ENABLE_BOUNDS_CHECK} \
${SCCACHE_CMAKE_ARGS} \
${ATS_CMAKE_ARGS}
${ATS_CMAKE_ARGS} \
${PYGEOSX_CMAKE_ARGS}

# The configuration step is now over, we can now move to the build directory for the build!
or_die cd ${GEOS_BUILD_DIR}
Expand All @@ -284,6 +293,14 @@ else
or_die cmake --build . -j $NPROC
or_die cmake --install .

if [[ "${RUN_PYGEOSX_TESTS}" = true ]]; then
# fix the setuptools/distutils conflict
export SETUPTOOLS_USE_DISTUTILS=stdlib
or_die ninja pygeosx
or_die ninja geosx_python_tools
or_die ninja pygeosx_unit_tests
fi

if [[ ! -z "${DATA_BASENAME_WE}" ]]; then
# Here we pack the installation.
# The `--transform` parameter provides consistency between the tarball name and the unpacked folder.
Expand Down