summaryrefslogtreecommitdiffstats
path: root/.gitlab
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2021-05-01 18:05:18 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2021-06-30 15:56:05 (GMT)
commitcb5c03ed04488d9976f0afaee59e901050c82c82 (patch)
tree05f8d41d18fc578868dffd0686db8d24165d7324 /.gitlab
parent722270ff502522ed88b14a48263f335939b0acac (diff)
downloadCMake-cb5c03ed04488d9976f0afaee59e901050c82c82.zip
CMake-cb5c03ed04488d9976f0afaee59e901050c82c82.tar.gz
CMake-cb5c03ed04488d9976f0afaee59e901050c82c82.tar.bz2
gitlab-ci: upload JUnit reports for builds
GitLab can render test results which come from JUnit files and inform which tests have started failing on an MR.
Diffstat (limited to '.gitlab')
-rw-r--r--.gitlab/artifacts.yml11
-rw-r--r--.gitlab/ci/ctest_test.cmake1
-rw-r--r--.gitlab/ci/ctest_test_external.cmake1
3 files changed, 13 insertions, 0 deletions
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml
index edd313f..45e4c5b 100644
--- a/.gitlab/artifacts.yml
+++ b/.gitlab/artifacts.yml
@@ -82,11 +82,22 @@
- build/cmake-*.tar.gz
- build/cmake-*.zip
+.cmake_junit_artifacts:
+ artifacts:
+ expire_in: 1d
+ when: always
+ reports:
+ junit:
+ - build/junit.xml
+
.cmake_test_artifacts:
artifacts:
expire_in: 1d
# External testing can be useful even if test jobs fail.
when: always
+ reports:
+ junit:
+ - build/junit.xml
paths:
# Take the install tree.
- build/install/
diff --git a/.gitlab/ci/ctest_test.cmake b/.gitlab/ci/ctest_test.cmake
index facf9ba..b02d032 100644
--- a/.gitlab/ci/ctest_test.cmake
+++ b/.gitlab/ci/ctest_test.cmake
@@ -20,6 +20,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
ctest_test(
PARALLEL_LEVEL "${nproc}"
TEST_LOAD "${nproc}"
+ OUTPUT_JUNIT "${CTEST_BINARY_DIRECTORY}/junit.xml"
RETURN_VALUE test_result
EXCLUDE "${test_exclusions}")
ctest_submit(PARTS Test)
diff --git a/.gitlab/ci/ctest_test_external.cmake b/.gitlab/ci/ctest_test_external.cmake
index 6576c26..48e910b 100644
--- a/.gitlab/ci/ctest_test_external.cmake
+++ b/.gitlab/ci/ctest_test_external.cmake
@@ -74,6 +74,7 @@ include("${CMAKE_CURRENT_LIST_DIR}/ctest_exclusions.cmake")
ctest_test(
PARALLEL_LEVEL "${nproc}"
TEST_LOAD "${nproc}"
+ OUTPUT_JUNIT "${CTEST_BINARY_DIRECTORY}/junit.xml"
RETURN_VALUE test_result
${ctest_label_args}
EXCLUDE "${test_exclusions}")