Skip to content

Commit 99d353a

Browse files
Merge branch 'main' into bundle-mariadb
2 parents 42fba6c + 8d241c1 commit 99d353a

File tree

5 files changed

+303
-229
lines changed

5 files changed

+303
-229
lines changed

.github/workflows/clp-artifact-build.yaml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -463,8 +463,10 @@ jobs:
463463
run: "chown $(id -u):$(id -g) -R ."
464464
shell: "bash"
465465

466-
# NOTE: We don't use the cache for scheduled runs so that they run lint:check-cpp-static-full
467-
# on all files.
466+
# NOTE: We don't restore the cache for `schedule` runs so that below,
467+
# `lint:check-cpp-static-full` runs on all files. If we don't do this periodically,
468+
# `lint:check-cpp-static-full` could miss issues in files that haven't changed but depend on
469+
# files which have changed.
468470
- if: "'schedule' != github.event_name"
469471
name: "Restore lint:check-cpp-static-full cache"
470472
id: "cache-restore-lint-check-cpp-static-full"
@@ -475,9 +477,10 @@ jobs:
475477
.task/checksum/utils-cpp-lint-clang-tidy-*
476478
build/lint-clang-tidy
477479
478-
# NOTE: We use a per-OS cache since different OSes may trigger different clang-tidy
479-
# violations.
480-
key: "main-branch-ubuntu-jammy-lint:check-cpp-static-full"
480+
# NOTE: This key must be kept in-sync with the key prefix in the `actions/cache/save` step
481+
# below (we can't use the output of the current step since `schedule` workflow runs don't
482+
# run this step).
483+
key: "lint:check-cpp-static-full-on-ubuntu-24.04"
481484

482485
- uses: "./.github/actions/run-on-image"
483486
env:
@@ -505,7 +508,15 @@ jobs:
505508
.task/checksum/lint-check-cpp-static-full
506509
.task/checksum/utils-cpp-lint-clang-tidy-*
507510
build/lint-clang-tidy
508-
key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}"
511+
512+
# NOTE: This key prefix (without the hash) must be kept in-sync with the
513+
# `actions/cache/restore` step above.
514+
key: >-
515+
lint:check-cpp-static-full-on-ubuntu-24.04-${{hashFiles(
516+
'.task/checksum/lint-check-cpp-static-full',
517+
'.task/checksum/utils-cpp-lint-clang-tidy-*',
518+
'build/lint-clang-tidy/**/*'
519+
)}}
509520
510521
package-image:
511522
name: "package-image"

.github/workflows/clp-core-build-macos.yaml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,10 @@ jobs:
9494
--num-jobs $(getconf _NPROCESSORS_ONLN)
9595
--test-spec "~[Stopwatch]"
9696
97-
# NOTE: We don't use the cache for scheduled runs so that they run lint:check-cpp-static-full
98-
# on all files.
97+
# NOTE: We don't restore the cache for `schedule` runs so that below,
98+
# `lint:check-cpp-static-full` runs on all files. If we don't do this periodically,
99+
# `lint:check-cpp-static-full` could miss issues in files that haven't changed but depend on
100+
# files which have changed.
99101
- if: "'schedule' != github.event_name"
100102
name: "Restore lint:check-cpp-static-full cache"
101103
id: "cache-restore-lint-check-cpp-static-full"
@@ -106,9 +108,11 @@ jobs:
106108
.task/checksum/utils-cpp-lint-clang-tidy-*
107109
build/lint-clang-tidy
108110
109-
# NOTE: We use a per-OS cache since different OSes may trigger different clang-tidy
110-
# violations.
111-
key: "main-branch-${{matrix.os}}-lint:check-cpp-static-full"
111+
# NOTE: This key must be kept in-sync with the key prefix in the `actions/cache/save` step
112+
# below (we can't use the output of the current step since `schedule` workflow runs don't
113+
# run this step).
114+
key: "lint:check-cpp-static-full-on-${{matrix.os}}-with\
115+
-${{matrix.use_shared_libs == true && 'shared' || 'static'}}-libs"
112116

113117
# TODO: When enough files are passing clang-tidy, switch to a full pass on schedule only.
114118
# - run: >-
@@ -129,4 +133,14 @@ jobs:
129133
.task/checksum/lint-check-cpp-static-full
130134
.task/checksum/utils-cpp-lint-clang-tidy-*
131135
build/lint-clang-tidy
132-
key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}"
136+
137+
# NOTE: This key prefix (without the hash) must be kept in-sync with the
138+
# `actions/cache/restore` step above.
139+
key: >-
140+
lint:check-cpp-static-full-on-${{matrix.os}}-with-${{
141+
matrix.use_shared_libs == true && 'shared' || 'static'
142+
}}-libs-${{hashFiles(
143+
'.task/checksum/lint-check-cpp-static-full',
144+
'.task/checksum/utils-cpp-lint-clang-tidy-*',
145+
'build/lint-clang-tidy/**/*'
146+
)}}

0 commit comments

Comments
 (0)