From 5259f1720e620f49474d5a07466dea04d6522bab Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Thu, 11 Jun 2026 16:19:40 -0500 Subject: [PATCH] COMP: Add one-off workflow to recover ExternalData objects from CI cache Nineteen Core/Common figure objects referenced by .cid links from PR #359 are absent from ITKTestingData and every IPFS mirror; the GitHub Actions ExternalData cache is the last remaining copy. This workflow restores the three cache families and uploads the objects as an artifact so they can be published to ITKTestingData. --- .../workflows/recover-externaldata-cache.yml | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/recover-externaldata-cache.yml diff --git a/.github/workflows/recover-externaldata-cache.yml b/.github/workflows/recover-externaldata-cache.yml new file mode 100644 index 000000000..08362fa47 --- /dev/null +++ b/.github/workflows/recover-externaldata-cache.yml @@ -0,0 +1,53 @@ +name: Recover ExternalData cache + +on: + pull_request: + paths: + - .github/workflows/recover-externaldata-cache.yml + +jobs: + recover: + runs-on: ubuntu-24.04 + steps: + - name: Restore cxx ExternalData cache + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/../bld/ExternalData/Objects + key: externaldata-v1-recover + restore-keys: | + externaldata-v1- + + - name: Restore docs ExternalData cache + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/../bld-docs/ExternalData/Objects + key: externaldata-docs-v1-recover + restore-keys: | + externaldata-docs-v1- + + - name: Restore superbuild ExternalData cache + uses: actions/cache/restore@v4 + with: + path: ${{ github.workspace }}/../bld-superbuild/ExternalData/Objects + key: externaldata-superbuild-v1-recover + restore-keys: | + externaldata-superbuild-v1-ubuntu-24.04- + + - name: Inventory recovered objects + run: | + mkdir -p recovered + for d in ../bld/ExternalData/Objects ../bld-docs/ExternalData/Objects ../bld-superbuild/ExternalData/Objects; do + if [ -d "$d" ]; then + rsync -a "$d/" recovered/ + fi + done + find recovered -type f | wc -l + ls -R recovered | head -50 + + - name: Upload recovered objects + uses: actions/upload-artifact@v4 + with: + name: recovered-externaldata-objects + path: recovered/ + if-no-files-found: error + retention-days: 14