Browse Source

gitlab-ci: use a single rules block for "manual" jobs

Co-authored-by: Brad King <[email protected]>
Ben Boeckel 1 month ago
parent
commit
51fc225941
3 changed files with 47 additions and 24 deletions
  1. 39 19
      .gitlab-ci.yml
  2. 4 2
      .gitlab/os-linux.yml
  3. 4 3
      .gitlab/rules.yml

+ 39 - 19
.gitlab-ci.yml

@@ -180,9 +180,10 @@ b:fedora43-gcc-gcov:
         - .cmake_build_linux
         - .cmake_build_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:fedora43-gcc-gcov:
     extends:
@@ -216,9 +217,10 @@ b:fedora43-bullseye-coverage:
         - .cmake_build_linux
         - .cmake_build_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:fedora43-bullseye-coverage:
     extends:
@@ -254,9 +256,10 @@ b:centos7-x86_64:
         - .cmake_build_linux_release
         - .cmake_release_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_ARTIFACTS_NAME: "artifacts-centos7-x86_64"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:centos8-aarch64:
     extends:
@@ -264,10 +267,11 @@ b:centos8-aarch64:
         - .cmake_build_linux_release
         - .cmake_release_artifacts
         - .linux_aarch64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_ARTIFACTS_NAME: "artifacts-centos8-aarch64"
         CMAKE_CI_JOB_NO_MR: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:debian13-ninja:
     extends:
@@ -676,9 +680,10 @@ b:fedora43-ninja:
         - .cmake_build_linux
         - .cmake_build_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_CONTINUOUS: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:fedora43-makefiles-symlinked:
     extends:
@@ -686,45 +691,50 @@ b:fedora43-makefiles-symlinked:
         - .cmake_build_linux
         - .cmake_build_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:debian13-makefiles-inplace:
     extends:
         - .debian13_makefiles_inplace
         - .cmake_build_linux_standalone
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:debian13-extdeps:
     extends:
         - .debian13_extdeps
         - .cmake_build_linux_standalone
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:debian13-aarch64-extdeps:
     extends:
         - .debian13_aarch64_extdeps
         - .cmake_build_linux_standalone
         - .linux_aarch64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:fedora43-extdeps:
     extends:
         - .fedora43_extdeps
         - .cmake_build_linux_standalone
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:fedora43-ninja:
     extends:
@@ -1085,9 +1095,10 @@ b:fedora43-asan:
         - .cmake_build_linux
         - .cmake_build_artifacts
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:fedora43-asan:
     extends:
@@ -1122,9 +1133,10 @@ b:macos-x86_64-ninja:
         - .cmake_build_macos
         - .cmake_build_artifacts
         - .macos_x86_64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NO_MR: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:macos-arm64-ninja:
     extends:
@@ -1132,9 +1144,10 @@ b:macos-arm64-ninja:
         - .cmake_build_macos
         - .cmake_build_artifacts
         - .macos_arm64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_CONTINUOUS: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:macos-arm64-ninja-symlinked:
     extends:
@@ -1142,18 +1155,20 @@ b:macos-arm64-ninja-symlinked:
         - .cmake_build_macos
         - .cmake_build_artifacts
         - .macos_arm64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:macos-arm64-pch:
     extends:
         - .macos_arm64_pch
         - .cmake_build_macos
         - .macos_arm64_tags
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:macos-x86_64-ninja:
     extends:
@@ -1199,7 +1214,9 @@ b:macos-x86_64-makefiles:
         - .cmake_build_macos
         - .cmake_build_artifacts
         - .macos_x86_64_tags
-        - .run_manually
+        - .rules
+    variables:
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:macos-x86_64-makefiles:
     extends:
@@ -1370,18 +1387,20 @@ b:windows-vs2026-x64-ninja:
         - .cmake_build_windows
         - .cmake_build_artifacts
         - .windows_x86_64_tags_nonconcurrent_vs2026
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_CONTINUOUS: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 b:windows-vs2026-x64-pch:
     extends:
         - .windows_vs2026_x64_pch
         - .cmake_build_windows
         - .windows_x86_64_tags_nonconcurrent_vs2026
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:windows-vs2026-x64-ninja:
     extends:
@@ -1670,9 +1689,10 @@ b:windows-arm64-vs2026-ninja:
         - .cmake_build_windows
         - .cmake_build_artifacts
         - .windows_arm64_tags_nonconcurrent_vs2026
-        - .run_manually
+        - .rules
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 t:windows-arm64-vs2026-ninja:
     extends:

+ 4 - 2
.gitlab/os-linux.yml

@@ -903,21 +903,23 @@
         - .intelclassic_makefiles
         - .cmake_test_linux_release
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
         - .needs_centos7_x86_64
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
         CMAKE_CI_JOB_NO_MR: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 .cmake_test_linux_inteloneapi_makefiles:
     extends:
         - .inteloneapi_makefiles
         - .cmake_test_linux_release
         - .linux_x86_64_tags
-        - .run_manually
+        - .rules
         - .needs_centos7_x86_64
     variables:
         CMAKE_CI_JOB_NIGHTLY: "true"
+        CMAKE_CI_JOB_RUN_MANUALLY: "true"
 
 .cmake_build_sunos_release:
     stage: build

+ 4 - 3
.gitlab/rules.yml

@@ -184,9 +184,10 @@ workflow:
         - if: '$CI_PIPELINE_SOURCE == "schedule"'
           when: on_success
 
-.run_manually:
-    rules:
-        - when: manual
+        ### Other pipelines.
+        # Other pipelines run manual jobs upon request.
+        - if: '$CMAKE_CI_JOB_RUN_MANUALLY == "true"'
+          when: manual
 
 .run_automatically:
     rules: