Merge topic 'ci-nightly-ide-jobs' into release-3.20

e5698605d7 gitlab-ci: ignore failing tests for external IDE testing
beb130c65d gitlab-ci: allow some jobs to ignore failing tests on nightly runs
18d6737e96 gitlab-ci: always upload test and release artifacts

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5871
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml
index bd13646..bf8e8b6 100644
--- a/.gitlab/artifacts.yml
+++ b/.gitlab/artifacts.yml
@@ -71,6 +71,8 @@
 .cmake_release_artifacts:
     artifacts:
         expire_in: 5d
+        # Release artifacts are of interest even for failed jobs.
+        when: always
         paths:
             # Any packages made.
             - build/cmake-*-linux-x86_64.*
@@ -83,6 +85,8 @@
 .cmake_test_artifacts:
     artifacts:
         expire_in: 1d
+        # External testing can be useful even if test jobs fail.
+        when: always
         paths:
             # Take the install tree.
             - build/install/
diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml
index 810fdca..1ce96b3 100644
--- a/.gitlab/os-macos.yml
+++ b/.gitlab/os-macos.yml
@@ -70,6 +70,7 @@
     variables:
         CMAKE_CONFIGURATION: macos_x86_64_xcode
         CMAKE_GENERATOR: Xcode
+        CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
 
 .macos_arm64_xcode:
     extends: .macos
@@ -77,6 +78,7 @@
     variables:
         CMAKE_CONFIGURATION: macos_arm64_xcode
         CMAKE_GENERATOR: Xcode
+        CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
 
 ## Tags
 
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index 1fff2bb..3e9634d 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -50,6 +50,7 @@
         CMAKE_GENERATOR: "Visual Studio 16 2019"
         CMAKE_GENERATOR_PLATFORM: "x64"
         CMAKE_GENERATOR_TOOLSET: "v142,version=14.28"
+        CMAKE_CI_NIGHTLY_IGNORE_DEPS: "true"
 
 ## Tags
 
diff --git a/.gitlab/rules.yml b/.gitlab/rules.yml
index e8c527d..b3e5342 100644
--- a/.gitlab/rules.yml
+++ b/.gitlab/rules.yml
@@ -38,6 +38,8 @@
     rules:
         - if: '$CMAKE_CI_PACKAGE == "true"'
           when: never
+        - if: '($CMAKE_CI_NIGHTLY == "true" && $CMAKE_CI_NIGHTLY_IGNORE_DEPS == "true")'
+          when: always
         - if: '$CMAKE_CI_NIGHTLY == "true"'
           when: on_success
         - if: '($CMAKE_CI_NO_MR == "true" && $CI_MERGE_REQUEST_ID)'