Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/clp-core-build-macos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,37 @@ jobs:
--num-jobs $(getconf _NPROCESSORS_ONLN)
--test-spec "~[Stopwatch]"

# NOTE: We don't use the cache for scheduled runs so that they run lint:check-cpp-static-full
# on all files.
- if: "'schedule' != github.event_name"
name: "Restore lint:check-cpp-static-full cache"
id: "cache-restore-lint-check-cpp-static-full"
uses: "actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684"
with:
path: |
.task/checksum/lint-check-cpp-static-full
.task/checksum/utils-cpp-lint-clang-tidy-*
build/lint-clang-tidy

# NOTE: We use a per-OS cache since different OSes may trigger different clang-tidy
# violations.
key: "main-branch-${{matrix.os}}-lint:check-cpp-static-full"

# TODO: When enough files are passing clang-tidy, switch to a full pass on schedule only.
# - run: >-
# task lint:check-cpp-${{(github.event_name == 'schedule') && 'full' || 'diff'}}
- run: "task lint:check-cpp-full"
shell: "bash"

# Cache the source file checksums and the generated files (logs) for the
# lint:check-cpp-static-full task, but only if it runs successfully on the main branch.
# NOTE: If we don't cache the generated files, the task will re-run to generate them.
- if: "'pull_request' != github.event_name && 'refs/heads/main' == github.ref"
name: "Update lint:check-cpp-static-full cache"
uses: "actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684"
with:
path: |
.task/checksum/lint-check-cpp-static-full
.task/checksum/utils-cpp-lint-clang-tidy-*
build/lint-clang-tidy
key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}"
29 changes: 29 additions & 0 deletions .github/workflows/clp-core-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,22 @@ jobs:
run: "chown $(id -u):$(id -g) -R ."
shell: "bash"

# NOTE: We don't use the cache for scheduled runs so that they run lint:check-cpp-static-full
# on all files.
- if: "'schedule' != github.event_name"
name: "Restore lint:check-cpp-static-full cache"
id: "cache-restore-lint-check-cpp-static-full"
uses: "actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684"
with:
path: |
.task/checksum/lint-check-cpp-static-full
.task/checksum/utils-cpp-lint-clang-tidy-*
build/lint-clang-tidy

# NOTE: We use a per-OS cache since different OSes may trigger different clang-tidy
# violations.
key: "main-branch-ubuntu-jammy-lint:check-cpp-static-full"

- uses: "./.github/actions/run-on-image"
env:
OS_NAME: "ubuntu-jammy"
Expand All @@ -339,3 +355,16 @@ jobs:
# run_command: >-
# task lint:check-cpp-${{(github.event_name == 'schedule') && 'full' || 'diff'}}
run_command: "task lint:check-cpp-full"

# Cache the source file checksums and the generated files (logs) for the
# lint:check-cpp-static-full task, but only if it runs successfully on the main branch.
# NOTE: If we don't cache the generated files, the task will re-run to generate them.
- if: "'pull_request' != github.event_name && 'refs/heads/main' == github.ref"
name: "Update lint:check-cpp-static-full cache"
uses: "actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684"
with:
path: |
.task/checksum/lint-check-cpp-static-full
.task/checksum/utils-cpp-lint-clang-tidy-*
build/lint-clang-tidy
key: "${{steps.cache-restore-lint-check-cpp-static-full.outputs.cache-primary-key}}"