From 22c759c9a6cad85edc801d3b42e65470af40c772 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Fri, 14 Jun 2024 09:07:50 +0200 Subject: [PATCH 1/3] [CI] Added job summarizing OGS logs --- scripts/ci/jobs/package.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/scripts/ci/jobs/package.yml b/scripts/ci/jobs/package.yml index 893354969c1..0dd3a7e2f43 100644 --- a/scripts/ci/jobs/package.yml +++ b/scripts/ci/jobs/package.yml @@ -64,6 +64,28 @@ create cpm cache: curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file ext.tar.gz \ ${CI_API_V4_URL}/projects/${CI_PROJECT_ID}/packages/generic/external-dependencies/${EXT_VERSION}/ext.tar.gz + +aggregate ctest logs: + stage: package + tags: [envinf, shell] + script: + - | + python -m venv .venv_custom_job + . .venv_custom_job/bin/activate + pip install pandas + mkdir -p build/log_summary + set -x + Applications/Python/ogs/dev/ogs_log_summary.py --snippet-out build/log_summary/ -v build/*/logs &>build/log_summary/ogs_log_summary.txt + rules: + - when: always + artifacts: + name: all-artifacts + paths: + - "build/**/*.txt" + - "build/log_summary/**" + expire_in: 12 hrs + + offline configure: stage: package tags: [envinf, shell] From d86cf7730ee94190ae81b191ec1c27bd50d757f5 Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Tue, 18 Jun 2024 10:37:06 +0200 Subject: [PATCH 2/3] [scr] Made CI build dir names unique --- scripts/ci/extends/template-build-linux.yml | 2 +- scripts/ci/extends/template-build-win.yml | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/ci/extends/template-build-linux.yml b/scripts/ci/extends/template-build-linux.yml index b6242a809a4..b1032fe2471 100644 --- a/scripts/ci/extends/template-build-linux.yml +++ b/scripts/ci/extends/template-build-linux.yml @@ -11,7 +11,7 @@ - rm -rf $build_dir_full - mkdir -p $build_dir_full build - if [[ "$OSTYPE" == "darwin"* ]] ; then readlink_cmd=greadlink; else readlink_cmd=readlink; fi - - ln -s `$readlink_cmd -f $build_dir_full` build/${CMAKE_PRESET} + - ln -s `$readlink_cmd -f $build_dir_full` build/${CMAKE_PRESET}-${CI_JOB_NAME_SLUG}-${CI_JOB_ID} - ([[ $BUILD_CTEST_LARGE_ON_MASTER && "${CI_COMMIT_BRANCH}" == "master" ]]) && export BUILD_CTEST_LARGE=true - cmake --preset=$CMAKE_PRESET --log-level=VERBOSE -Wno-dev $CMAKE_ARGS # Activate .venv via .envrc diff --git a/scripts/ci/extends/template-build-win.yml b/scripts/ci/extends/template-build-win.yml index aca415906b3..e9d1fe363f8 100644 --- a/scripts/ci/extends/template-build-win.yml +++ b/scripts/ci/extends/template-build-win.yml @@ -8,12 +8,13 @@ variables: script: - $build_directory_full = "..\build\" + $env:CMAKE_PRESET + - $artifacts_dir = "build\" + $env:CMAKE_PRESET + "-" + $env:CI_JOB_NAME_SLUG + "-" + $env:CI_JOB_ID - $log_file = $build_directory_full + "\make.txt" - (rm -r -fo $build_directory_full) - cmd /c if not exist $build_directory_full mkdir $build_directory_full - - mkdir build + - mkdir build # We are inside the OGS source directory, now. This "build" dir will be, too. # Create symlink https://stackoverflow.com/a/34905638/80480 - - cmd /c mklink /D build\$env:CMAKE_PRESET $env:CI_PROJECT_DIR\$build_directory_full + - cmd /c mklink /D $artifacts_dir $env:CI_PROJECT_DIR\$build_directory_full - $cmake_cmd = "cmake --preset=$env:CMAKE_PRESET --log-level=VERBOSE -Wno-dev $env:CMAKE_ARGS" - $cmake_cmd - Invoke-Expression $cmake_cmd From 1a073ec6278dabf6a58ff758f9cbf9fb42427f3c Mon Sep 17 00:00:00 2001 From: Christoph Lehmann Date: Wed, 19 Jun 2024 07:56:25 +0200 Subject: [PATCH 3/3] [CI] Removed output on failure --- CMakeLists.txt | 1 - CMakePresets.json | 3 --- scripts/cmake/test/Test.cmake | 5 +---- 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2ba12779790..67d8a387b28 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -237,7 +237,6 @@ endif() set(_envrc_content "[ -d \"${PROJECT_BINARY_DIR}/.venv\" ] && source ${PROJECT_BINARY_DIR}/.venv/bin/activate" "export PATH=$PATH:${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}" - "export CTEST_OUTPUT_ON_FAILURE=1" ) if(TFEL_WITH_PYTHON) set(_envrc_content "${_envrc_content}" diff --git a/CMakePresets.json b/CMakePresets.json index 0b94463cb33..931a98bed5b 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -345,9 +345,6 @@ { "name": "release", "configurePreset": "release", - "output": { - "outputOnFailure": true - }, "filter": { "include": { "label": "default" diff --git a/scripts/cmake/test/Test.cmake b/scripts/cmake/test/Test.cmake index 6d0b42d44e6..ef7d99790e6 100644 --- a/scripts/cmake/test/Test.cmake +++ b/scripts/cmake/test/Test.cmake @@ -48,10 +48,7 @@ NotebookTest( TRUE ) -# output 25 kb of tailed logs on failure -set(_ctest_parameter -T Test --force-new-ctest-process --output-on-failure - --test-output-size-failed 25 -) +set(_ctest_parameter -T Test --force-new-ctest-process) if(CMAKE_CONFIGURATION_TYPES) list(APPEND _ctest_parameter --build-config "$") endif()