Skip to content

Commit 3694c1b

Browse files
committed
remove more caches
1 parent 2163354 commit 3694c1b

File tree

3 files changed

+17
-21
lines changed

3 files changed

+17
-21
lines changed

.github/workflows/run-build.yml

+11-15
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@ jobs:
594594
"$next" >> "$2"
595595
next=$(egrep -i '^link: ' "$2.headers" | grep -P -i -o '(?<=<)([\S]*)(?=>; rel="next")') || [[ $? == 1 ]]
596596
done
597+
if [[ $RUNNER_DEBUG -eq 1 ]]; then
598+
echo "::group::$1"
599+
cat "$2"
600+
echo "::endgroup::"
601+
fi
597602
}
598603
599604
stamp=$(jq -n -r 'now')
@@ -606,18 +611,9 @@ jobs:
606611
jq -r '.[] | .number | "refs/pull/" + (. | tostring) + "/merge" | @json' pulls.json >> branch-names.json
607612
608613
if [[ $RUNNER_DEBUG -eq 1 ]]; then
609-
echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/git/matching-refs/heads"
610-
cat branches.json
611-
echo "::endgroup::"
612-
echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY//pulls?state=open"
613-
cat pulls.json
614-
echo "::endgroup::"
615-
echo "::group::$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches"
616-
cat caches.json
617-
echo "::endgroup::"
618-
echo "::group::Active Branches"
619-
cat branch-names.json
620-
echo "::endgroup::"
614+
echo "::group::Active Branches"
615+
cat branch-names.json
616+
echo "::endgroup::"
621617
fi
622618
623619
jq -r --slurpfile branches branch-names.json --argjson stamp "$stamp" '
@@ -688,18 +684,18 @@ jobs:
688684
fi
689685
690686
jq -r -s --argjson stamp "$stamp" '
691-
{ "cmake-utils": 1, "source": 1, "tools": 2, "vcpkg-registries": 1, "vcpkg_installed": 2 } as $keep |
687+
{ "tools": 2, "vcpkg_installed": 2 } as $keep |
692688
[
693689
.[]
694690
| .actions_caches
695691
| .[]
696692
| (. + {"$cache": .key
697-
| match("^cmu-(cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)-")
693+
| match("^((?<=cmu-)(?:cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)|codacy-clang-tidy|opencppcoverage)-")
698694
| .captures[0].string })
699695
]
700696
| group_by(."$cache")
701697
| map(. |= ( sort_by(.last_accessed_at)
702-
| .[:-$keep[.[0]."$cache"]]
698+
| .[:-$keep[.[0]."$cache" // 1]]
703699
| map( (.created_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))
704700
| select(.created_at <= $stamp)
705701
| (.last_accessed_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))

.github/workflows/run-codeql.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -420,18 +420,18 @@ jobs:
420420
fi
421421
422422
jq -r -s --argjson stamp "$stamp" '
423-
{ "cmake-utils": 1, "source": 1, "tools": 2, "vcpkg-registries": 1, "vcpkg_installed": 2 } as $keep |
423+
{ "tools": 2, "vcpkg_installed": 2 } as $keep |
424424
[
425425
.[]
426426
| .actions_caches
427427
| .[]
428428
| (. + {"$cache": .key
429-
| match("^cmu-(cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)-")
429+
| match("^((?<=cmu-)(?:cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)|codacy-clang-tidy|opencppcoverage)-")
430430
| .captures[0].string })
431431
]
432432
| group_by(."$cache")
433433
| map(. |= ( sort_by(.last_accessed_at)
434-
| .[:-$keep[.[0]."$cache"]]
434+
| .[:-$keep[.[0]."$cache" // 1]]
435435
| map( (.created_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))
436436
| select(.created_at <= $stamp)
437437
| (.last_accessed_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))

.github/workflows/test.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -265,18 +265,18 @@ jobs:
265265
fi
266266
267267
jq -r -s --argjson stamp "$stamp" '
268-
{ "cmake-utils": 1, "source": 1, "tools": 2, "vcpkg-registries": 1, "vcpkg_installed": 2 } as $keep |
268+
{ "tools": 2, "vcpkg_installed": 2 } as $keep |
269269
[
270270
.[]
271271
| .actions_caches
272272
| .[]
273273
| (. + {"$cache": .key
274-
| match("^cmu-(cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)-")
274+
| match("^((?<=cmu-)(?:cmake-utils|source|tools|vcpkg-registries|vcpkg_installed)|codacy-clang-tidy|opencppcoverage)-")
275275
| .captures[0].string })
276276
]
277277
| group_by(."$cache")
278278
| map(. |= ( sort_by(.last_accessed_at)
279-
| .[:-$keep[.[0]."$cache"]]
279+
| .[:-$keep[.[0]."$cache" // 1]]
280280
| map( (.created_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))
281281
| select(.created_at <= $stamp)
282282
| (.last_accessed_at |= (sub("\\.\\d+Z$"; "Z") | fromdateiso8601))

0 commit comments

Comments
 (0)