Skip to content

Commit

Permalink
CTest: add xdr test configuration for Linux/MacOS
Browse files Browse the repository at this point in the history
Fix build name when using dynamic plugins
  • Loading branch information
soumagne committed Dec 19, 2024
1 parent 184d67b commit 5237fe5
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 1 deletion.
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,27 +81,43 @@ jobs:
build_type: [Debug, RelWithDebInfo, Release]
libs: [shared]
plugins: [static_plugins]
encoding: [xdr_off]
include:
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: Debug
libs: static
plugins: static_plugins
encoding: xdr_off
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: Asan
libs: shared
plugins: static_plugins
encoding: xdr_off
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: Tsan
libs: shared
plugins: static_plugins
encoding: xdr_off
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: Ubsan
libs: shared
plugins: static_plugins
encoding: xdr_off
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: RelWithDebInfo
libs: shared
plugins: dynamic_plugins
encoding: xdr_off
- config: {os: ubuntu-latest, cc: gcc, cxx: g++}
build_type: RelWithDebInfo
libs: shared
plugins: static_plugins
encoding: xdr_on
- config: {os: macos-latest, cc: clang, cxx: clang++}
build_type: RelWithDebInfo
libs: shared
plugins: static_plugins
encoding: xdr_on

runs-on: ${{ matrix.config.os }}

Expand All @@ -110,6 +126,7 @@ jobs:
MERCURY_BUILD_CONFIGURATION: ${{ matrix.build_type }}
MERCURY_LIBS: ${{ matrix.libs }}
MERCURY_PLUGINS: ${{ matrix.plugins }}
MERCURY_ENCODING: ${{ matrix.encoding }}
CC: ${{ matrix.config.cc }}
CXX: ${{ matrix.config.cxx }}
INSTALL_DIR: install
Expand Down
7 changes: 7 additions & 0 deletions Testing/script/gh_ctest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ else
BUILD_DYNAMIC_PLUGINS=FALSE
fi

if [[ ${MERCURY_ENCODING} == 'xdr_on' ]]; then
MERCURY_USE_XDR=TRUE
else
MERCURY_USE_XDR=FALSE
fi

# Source intel env when using icx
if [[ ${CC} == 'icx' ]]; then
ICX_LATEST_VERSION=$(ls -1 /opt/intel/oneapi/compiler/ | grep -v latest | sort | tail -1)
Expand All @@ -64,6 +70,7 @@ $CTEST -VV --output-on-failure \
-Ddashboard_model=${DASHBOARD_MODEL} \
-Dbuild_shared_libs=${BUILD_SHARED} \
-Dbuild_dynamic_plugins=${BUILD_DYNAMIC_PLUGINS} \
-Dbuild_xdr=${MERCURY_USE_XDR} \
-Ddashboard_do_submit=${DASHBOARD_SUBMIT} \
-Ddashboard_allow_errors=TRUE \
-S $CTEST_SCRIPT
8 changes: 7 additions & 1 deletion Testing/script/gh_script.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,12 @@ endif()
if(NOT build_shared_libs)
set(lower_mercury_build_configuration ${lower_mercury_build_configuration}-static)
endif()
if(build_dynamic_plugins)
set(lower_mercury_build_configuration ${lower_mercury_build_configuration}-plugin)
endif()
if(build_xdr)
set(lower_mercury_build_configuration ${lower_mercury_build_configuration}-xdr)
endif()

set(CTEST_BUILD_NAME "${BUILD_NAME}-${OS_NAME}-$ENV{CC}-${lower_mercury_build_configuration}-${BUILD_NUMBER}")

Expand Down Expand Up @@ -265,7 +271,7 @@ MERCURY_ENABLE_COVERAGE:BOOL=${MERCURY_DO_COVERAGE}
MERCURY_ENABLE_DEBUG:BOOL=${enable_debug}
MERCURY_USE_BOOST_PP:BOOL=OFF
MERCURY_USE_CHECKSUMS:BOOL=${USE_CHECKSUMS}
MERCURY_USE_XDR:BOOL=OFF
MERCURY_USE_XDR:BOOL=${build_xdr}
NA_USE_DYNAMIC_PLUGINS:BOOL=${build_dynamic_plugins}
NA_DEFAULT_PLUGIN_PATH:PATH=${CTEST_BINARY_DIRECTORY}/bin
NA_USE_BMI:BOOL=${USE_BMI}
Expand Down

0 comments on commit 5237fe5

Please sign in to comment.