Compare commits

...
Author SHA1 Message Date
Kris Austin f83bfa17ff ci: keep older compiler cache entries when the save wrote nothing (#15828)
#15668 saves the compiler cache on cancelled and failed builds and then
drops the older entries for the leg on the ref. actions/cache/save only
warns when its tar fails, so a cancelled build whose ccache directory
was still being written saved nothing, the drop ran anyway and deleted
the leg's last good entry. The next run on main restored nothing and
compiled cold, and so did every PR that restored in the gap. Run
35405244634 (Flatpak x86_64, 2026-09-18) did this to
ccache-Flatpak-x86_64-35397824860-1; between 13 and 18 September 9 of
87 cancelled main build jobs did the same.

Look the new entry up before deleting anything, and keep the older ones
when it is not there.
2026-09-22 15:41:30 -03:00
7ca2b9ad9c update FlyingBear Ghost7 0.4 nozzle.json, InfiMech EX 0.4 nozzle.json… (#15707)
update FlyingBear Ghost7 0.4 nozzle.json, InfiMech EX 0.4 nozzle.json, InfiMech EX+APS 0.4 nozzle.json

Co-authored-by: Flyingbear <adam@3dflyingbear.com>
Co-authored-by: SoftFever <103989404+SoftFever@users.noreply.github.com>
2026-09-23 01:46:05 +08:00
5 changed files with 18 additions and 3 deletions
+8
View File
@@ -413,6 +413,14 @@ jobs:
GH_TOKEN: ${{ github.token }}
run: |
api="$GITHUB_API_URL/repos/$GITHUB_REPOSITORY/actions/caches"
# The save step reports success even when its tar failed, so keep
# the older entries unless the new one is listed.
if ! curl -sSf -H "Authorization: Bearer $GH_TOKEN" \
"$api?ref=$GITHUB_REF&key=$CCACHE_ENTRY" \
| jq -e --arg entry "$CCACHE_ENTRY" 'any(.actions_caches[]; .key == $entry)' > /dev/null; then
echo "$CCACHE_ENTRY was not saved; keeping the older entries."
exit 0
fi
curl -sSf -H "Authorization: Bearer $GH_TOKEN" \
"$api?ref=$GITHUB_REF&key=ccache-$CCACHE_LEG-&per_page=100" \
| jq -r --arg prefix "ccache-$CCACHE_LEG-" --argjson run "$GITHUB_RUN_ID" \
+7
View File
@@ -798,6 +798,13 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
run: |
# The save step reports success even when its tar failed, so keep
# the older entries unless the new one is listed.
if ! gh cache list --ref "$GITHUB_REF" --key "$CCACHE_ENTRY" --json key \
| jq -e --arg entry "$CCACHE_ENTRY" 'any(.[]; .key == $entry)' > /dev/null; then
echo "$CCACHE_ENTRY was not saved; keeping the older entries."
exit 0
fi
gh cache list --ref "$GITHUB_REF" --key "ccache-$CCACHE_LEG-" --limit 100 --json id,key \
| jq -r --arg prefix "ccache-$CCACHE_LEG-" --argjson run "$GITHUB_RUN_ID" \
'.[] | select((.key | ltrimstr($prefix) | split("-")[0] | tonumber?) < $run) | .id' \
@@ -198,6 +198,6 @@
"0.4"
],
"z_hop_types": [
"Normal Lift"
"Auto Lift"
]
}
@@ -198,6 +198,6 @@
"0.4"
],
"z_hop_types": [
"Normal Lift"
"Auto Lift"
]
}
@@ -198,6 +198,6 @@
"0.4"
],
"z_hop_types": [
"Normal Lift"
"Auto Lift"
]
}