Skip to content

Commit b49db60

Browse files
authored
More logging in GHA CI
1 parent f0783ac commit b49db60

File tree

4 files changed

+39
-9
lines changed

4 files changed

+39
-9
lines changed

.github/workflows/openms_ci_matrix_full.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ jobs:
273273
ENABLE_CLASS_TESTING: "ON"
274274
ENABLE_TUTORIALS: "OFF"
275275
ENABLE_GCC_WERROR: "OFF" # TODO think about that
276-
PACKAGE_TYPE: ${{ steps.set-vars.outputs.pkg_type }}
277276
SEARCH_ENGINES_DIRECTORY: ${{ github.workspace }}/_thirdparty
278277
WITH_GUI: "ON"
279278
ADDRESS_SANITIZER: "Off"
@@ -295,7 +294,8 @@ jobs:
295294

296295
- name: Test
297296
shell: bash
298-
run: ${{ steps.set-vars.outputs.xvfb }} ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
297+
run: |
298+
${{ steps.set-vars.outputs.xvfb }} ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/citest.cmake
299299
env:
300300
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
301301
CI_PROVIDER: "GitHub-Actions"
@@ -306,9 +306,18 @@ jobs:
306306
- if: steps.set-vars.outputs.pkg_type != 'none'
307307
name: Package
308308
shell: bash
309-
run: ${{ steps.set-vars.outputs.xvfb }} ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cipackage.cmake
309+
run: |
310+
${{ steps.set-vars.outputs.xvfb }} ctest --output-on-failure -V -S $GITHUB_WORKSPACE/OpenMS/tools/ci/cipackage.cmake
311+
retVal=$?
312+
if [ $retVal -ne 0 ]; then
313+
echo "\033[0;31m Errors in packaging:"
314+
find $GITHUB_WORKSPACE/OpenMS/bld/ -name "LastBuild*" -type f -exec cat {} \;
315+
fi
316+
exit $retVal
310317
env:
311318
SOURCE_DIRECTORY: "${{ github.workspace }}/OpenMS"
319+
PACKAGE_TYPE: ${{ steps.set-vars.outputs.pkg_type }}
320+
SEARCH_ENGINES_DIRECTORY: "${{ github.workspace }}/_thirdparty"
312321
CI_PROVIDER: "GitHub-Actions"
313322
BUILD_NAME: "${{ steps.extract_branch.outputs.RUN_NAME }}-${{ steps.set-vars.outputs.tp_folder }}-${{ matrix.compiler }}-class-topp-${{ github.run_number }}"
314323

tools/ci/cibuild.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,12 @@ else()
169169
set(_build_errors 0)
170170
endif()
171171

172+
string(REPLACE "+" "%2B" BUILD_NAME_SAFE ${CTEST_BUILD_NAME})
173+
string(REPLACE "." "%2E" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
174+
string(REPLACE "/" "%2F" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
175+
172176
if (_build_errors)
173-
message(FATAL_ERROR "Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
177+
message(FATAL_ERROR "There were errors: Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
174178
else()
175-
message("Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
179+
message("Build successful: Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
176180
endif()

tools/ci/cipackage.cmake

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,14 @@ set(CTEST_SITE "$ENV{CI_PROVIDER}")
88
set(CTEST_SOURCE_DIRECTORY "$ENV{SOURCE_DIRECTORY}")
99
set(CTEST_BINARY_DIRECTORY "${CTEST_SOURCE_DIRECTORY}/bld")
1010

11+
set(CONFIGURE_OPTIONS)
12+
set(VARS_TO_LOAD PACKAGE_TYPE SEARCH_ENGINES_DIRECTORY SIGNING_IDENTITY SIGNING_EMAIL)
13+
foreach(VAR IN VARS_TO_LOAD)
14+
if(DEFINED ENV{${VAR}})
15+
list(APPEND CONFIGURE_OPTIONS "-D${VAR}=$ENV{${VAR}})
16+
endif()
17+
endforeach()
18+
1119
# cdash server (fu-berlin) SSL certificate sometimes is revoked. Keeps CI running.
1220
set (CTEST_CURL_OPTIONS CURLOPT_SSL_VERIFYHOST_OFF CURLOPT_SSL_VERIFYPEER_OFF )
1321
@@ -19,15 +27,20 @@ ctest_start(Nightly GROUP Package)
1927
# build the dist target for packages
2028
if("$ENV{ENABLE_STYLE_TESTING}" STREQUAL "OFF")
2129
if(NOT "$ENV{PYOPENMS}" STREQUAL "ON")
30+
ctest_configure(OPTIONS ${CONFIGURE_OPTIONS} RETURN_VALUE _reconfig_package_ret_val)
2231
ctest_build(BUILD "${CTEST_BINARY_DIRECTORY}" TARGET "dist" NUMBER_ERRORS _build_errors)
2332
ctest_submit(PARTS Build)
2433
endif()
2534
else()
2635
set(_build_errors 0)
2736
endif()
2837
38+
string(REPLACE "+" "%2B" BUILD_NAME_SAFE ${CTEST_BUILD_NAME})
39+
string(REPLACE "." "%2E" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
40+
string(REPLACE "/" "%2F" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
41+
2942
if (_build_errors)
30-
message(FATAL_ERROR "Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
43+
message(FATAL_ERROR "There were errors: Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
3144
else()
32-
message("Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
45+
message("Packaging successful: Please check the build results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
3346
endif()

tools/ci/citest.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ endif()
3636
## send test results to CDash
3737
ctest_submit(PARTS Test Done)
3838

39+
string(REPLACE "+" "%2B" BUILD_NAME_SAFE ${CTEST_BUILD_NAME})
40+
string(REPLACE "." "%2E" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
41+
string(REPLACE "/" "%2F" BUILD_NAME_SAFE ${BUILD_NAME_SAFE})
42+
3943
if (_test_errors)
40-
message(FATAL_ERROR "Please check the test results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
44+
message(FATAL_ERROR "There were errors: Please check the test results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
4145
else()
42-
message("Please check the test results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${CTEST_BUILD_NAME}")
46+
message("Testing successful: Please check the test results at: https://cdash.openms.de/index.php?project=OpenMS&begin=2023-01-01&end=2030-01-01&filtercount=1&field1=buildname&compare1=63&value1=${BUILD_NAME_SAFE}")
4347
endif()

0 commit comments

Comments
 (0)