The cache/restore action supports partial key matches, which (when an exact match isn't available) will restore a cache if the current key matches some specified prefix of another cache key.
We change our AJ blueprint files often, but rarely all at once except for Blockbench / AJ version upgrades. We also already have last_exported_hashes.json to make the ajexport.js script effectively performing partial cache restores on local machines.
This PR hooks up last_exported_hashes.json to our custom CI action so we can:
restore a partial-matched cache of AJ export files, including last_exported_hashes.json
setup and run the auto-exporter
auto-exporter only exports changed models instead of re-exporting every model
Note: we do NOT perform a partial restore if the BB/AJ version has changed, because last_exported_hashes.json only saves the model file hashes. So if either of BB/AJ has a version change, we assume no other cache is valid for us.
Preview
The test runs of this resulted in significant speed increases (see commits):
Summary
closes #160
The cache/restore action supports partial key matches, which (when an exact match isn't available) will restore a cache if the current key matches some specified prefix of another cache key.
We change our AJ blueprint files often, but rarely all at once except for Blockbench / AJ version upgrades. We also already have
last_exported_hashes.json
to make theajexport.js
script effectively performing partial cache restores on local machines.This PR hooks up
last_exported_hashes.json
to our custom CI action so we can:last_exported_hashes.json
Note: we do NOT perform a partial restore if the BB/AJ version has changed, because
last_exported_hashes.json
only saves the model file hashes. So if either of BB/AJ has a version change, we assume no other cache is valid for us.Preview
The test runs of this resulted in significant speed increases (see commits):