From 8017fac767d1b716e1fb7e30bc71e4ab2127c00b Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Wed, 15 Jan 2025 15:19:42 -0800 Subject: [PATCH 1/5] CDash dashboard support --- CMakeLists.txt | 3 ++- CTestConfig.cmake | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 CTestConfig.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 90771cbbb29..f1dcece8ce1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -193,7 +193,8 @@ if(WarpX_FFT) set(ABLASTR_FFT ON CACHE STRING "FFT-based solvers" FORCE) endif() -# this defined the variable BUILD_TESTING which is ON by default +# Define the variable BUILD_TESTING (ON by default), +# include CDash dashboard testing module include(CTest) diff --git a/CTestConfig.cmake b/CTestConfig.cmake new file mode 100644 index 00000000000..f419078a430 --- /dev/null +++ b/CTestConfig.cmake @@ -0,0 +1,20 @@ +## This file should be placed in the root directory of your project. +## Then modify the CMakeLists.txt file in the root directory of your +## project to incorporate the testing dashboard. +## +## # The following are required to submit to the CDash dashboard: +## ENABLE_TESTING() +## INCLUDE(CTest) + +set(CTEST_PROJECT_NAME WarpX) +set(CTEST_NIGHTLY_START_TIME 08:00:00 UTC) + +if(CMAKE_VERSION VERSION_GREATER 3.14) + set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=WarpX) +else() + set(CTEST_DROP_METHOD "https") + set(CTEST_DROP_SITE "my.cdash.org") + set(CTEST_DROP_LOCATION "/submit.php?project=WarpX") +endif() + +set(CTEST_DROP_SITE_CDASH TRUE) From eb7f107fb870739276298ba3dd4ff5f6a886861c Mon Sep 17 00:00:00 2001 From: Axel Huebl Date: Wed, 15 Jan 2025 15:48:53 -0800 Subject: [PATCH 2/5] Simplify --- CTestConfig.cmake | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index f419078a430..5944252d922 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -9,12 +9,6 @@ set(CTEST_PROJECT_NAME WarpX) set(CTEST_NIGHTLY_START_TIME 08:00:00 UTC) -if(CMAKE_VERSION VERSION_GREATER 3.14) - set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=WarpX) -else() - set(CTEST_DROP_METHOD "https") - set(CTEST_DROP_SITE "my.cdash.org") - set(CTEST_DROP_LOCATION "/submit.php?project=WarpX") -endif() +set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=WarpX) set(CTEST_DROP_SITE_CDASH TRUE) From 6adb907e4a4cc69fa26b2d2f11b0ed1f6507ff39 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Thu, 16 Jan 2025 10:52:33 -0800 Subject: [PATCH 3/5] Update Azure workflow file --- .azure-pipelines.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 28c4e03d102..508f9d66ce1 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -155,8 +155,15 @@ jobs: - bash: | # set options set -o nounset errexit pipefail - # run tests (exclude pytest.AMReX when running Python tests) - ctest --test-dir build --output-on-failure -E AMReX + # determine if the build was triggered by a push to the development branch + if [[ "$(Build.SourceBranch)" == "refs/heads/development" ]]; then + # run tests (exclude pytest.AMReX when running Python tests) + # and submit results to CDash as Continuous + ctest --test-dir build --output-on-failure -E AMReX -D Continuous + else + # run tests (exclude pytest.AMReX when running Python tests) + ctest --test-dir build --output-on-failure -E AMReX + fi displayName: 'Test' - bash: | From 49df5c87633d236e770dc8742b21bdb36fec3285 Mon Sep 17 00:00:00 2001 From: Edoardo Zoni Date: Thu, 16 Jan 2025 11:01:45 -0800 Subject: [PATCH 4/5] Add site and build names --- CTestConfig.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CTestConfig.cmake b/CTestConfig.cmake index 5944252d922..938d2a4f518 100644 --- a/CTestConfig.cmake +++ b/CTestConfig.cmake @@ -12,3 +12,7 @@ set(CTEST_NIGHTLY_START_TIME 08:00:00 UTC) set(CTEST_SUBMIT_URL https://my.cdash.org/submit.php?project=WarpX) set(CTEST_DROP_SITE_CDASH TRUE) + +# Additional settings +set(CTEST_SITE "Azure-Pipelines") +set(CTEST_BUILD_NAME "CI-Development") From 3a4867f5120819be4aa18e823b7ad78558236c5d Mon Sep 17 00:00:00 2001 From: Edoardo Zoni <59625522+EZoni@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:19:36 -0800 Subject: [PATCH 5/5] Run tests and submit to CDash as `Experimental` --- .azure-pipelines.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 508f9d66ce1..badedcb994c 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -158,8 +158,9 @@ jobs: # determine if the build was triggered by a push to the development branch if [[ "$(Build.SourceBranch)" == "refs/heads/development" ]]; then # run tests (exclude pytest.AMReX when running Python tests) - # and submit results to CDash as Continuous - ctest --test-dir build --output-on-failure -E AMReX -D Continuous + # and submit results to CDash as Experimental + ctest --test-dir build --output-on-failure -E AMReX \ + -D ExperimentalTest -D ExperimentalSubmit else # run tests (exclude pytest.AMReX when running Python tests) ctest --test-dir build --output-on-failure -E AMReX