Skip to content

Commit df4d385

Browse files
bdrouvotAWSCommitfest Bot
authored and
Commitfest Bot
committed
Allow CI to only run the compiler warnings task
That could be useful to only run the CI compiler warnings task when addressing compiler warnings issues. Renaming ci-os-only to ci-task-only and adding filtering for the "compilerwarnings" task.
1 parent 92ee8a4 commit df4d385

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

.cirrus.tasks.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ task:
7272
# push-wait-for-ci cycle time a bit when debugging operating system specific
7373
# failures. Uses skip instead of only_if, as cirrus otherwise warns about
7474
# only_if conditions not matching.
75-
skip: $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:.*'
75+
skip: $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:.*'
7676

7777
env:
7878
CPUS: 4
@@ -167,7 +167,7 @@ task:
167167
<<: *freebsd_task_template
168168

169169
depends_on: SanityCheck
170-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*freebsd.*'
170+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*freebsd.*'
171171

172172
sysinfo_script: |
173173
id
@@ -257,7 +257,7 @@ task:
257257

258258
matrix:
259259
- name: NetBSD - Meson
260-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*netbsd.*'
260+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*netbsd.*'
261261
env:
262262
OS_NAME: netbsd
263263
IMAGE_FAMILY: pg-ci-netbsd-postgres
@@ -274,7 +274,7 @@ task:
274274
<<: *netbsd_task_template
275275

276276
- name: OpenBSD - Meson
277-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*openbsd.*'
277+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*openbsd.*'
278278
env:
279279
OS_NAME: openbsd
280280
IMAGE_FAMILY: pg-ci-openbsd-postgres
@@ -414,7 +414,7 @@ task:
414414
<<: *linux_task_template
415415

416416
depends_on: SanityCheck
417-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*linux.*'
417+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*linux.*'
418418

419419
ccache_cache:
420420
folder: ${CCACHE_DIR}
@@ -613,7 +613,7 @@ task:
613613
<<: *macos_task_template
614614

615615
depends_on: SanityCheck
616-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*(macos|darwin|osx).*'
616+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*(macos|darwin|osx).*'
617617

618618
sysinfo_script: |
619619
id
@@ -719,7 +719,7 @@ task:
719719
<<: *windows_task_template
720720

721721
depends_on: SanityCheck
722-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*windows.*'
722+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*windows.*'
723723

724724
setup_additional_packages_script: |
725725
REM choco install -y --no-progress ...
@@ -758,8 +758,8 @@ task:
758758
# due to resource constraints we don't run this task by default for now
759759
trigger_type: manual
760760
# worth using only_if despite being manual, otherwise this task will show up
761-
# when e.g. ci-os-only: linux is used.
762-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:[^\n]*mingw.*'
761+
# when e.g. ci-task-only: linux is used.
762+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*mingw.*'
763763
# otherwise it'll be sorted before other tasks
764764
depends_on: SanityCheck
765765

@@ -818,7 +818,7 @@ task:
818818
# use always: to continue after failures. Task that did not run count as a
819819
# success, so we need to recheck SanityChecks's condition here ...
820820
depends_on: SanityCheck
821-
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-os-only:.*'
821+
only_if: $CIRRUS_CHANGE_MESSAGE !=~ '.*\nci-task-only:.*' || $CIRRUS_CHANGE_MESSAGE =~ '.*\nci-task-only:[^\n]*compilerwarnings.*'
822822

823823
env:
824824
CPUS: 4

src/tools/ci/README

+4-3
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,11 @@ Controlling CI via commit messages
6161
The behavior of CI can be controlled by special content in commit
6262
messages. Currently the following controls are available:
6363

64-
- ci-os-only: {(freebsd|linux|macos|mingw|netbsd|openbsd|windows)}
64+
- ci-task-only: {(freebsd|linux|macos|mingw|netbsd|openbsd|windows|compilerwarnings)}
6565

66-
Only runs CI on operating systems specified. This can be useful when
67-
addressing portability issues affecting only a subset of platforms.
66+
Only runs CI on operating systems specified or only runs compiler warnings
67+
checks. This can be useful when addressing portability issues affecting only a
68+
subset of platforms or when addressing compiler warnings issues.
6869

6970

7071
Using custom compute resources for CI

0 commit comments

Comments
 (0)