Skip to content

Commit

Permalink
ci: restore old cache (#499)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmic-vagabond authored May 15, 2024
1 parent e0ad1c7 commit 5772f9a
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/software-upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- name: Cache Directories
uses: actions/cache@v4
id: cache-elys-folders
id: cache-backup-directories
with:
path: |
/tmp/elys-backup
Expand All @@ -64,7 +64,7 @@ jobs:
echo "OLD_BINARY_PATH=$OLD_BINARY_PATH" >> $GITHUB_ENV
# TODO: retrieve upgrade-assure and upload-snapshot binaries
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Create git tag
run: git tag v999.999.999
Expand All @@ -91,17 +91,17 @@ jobs:
- name: Copy upgrade assure folder
run: |
cp -a ./cmd/upgrade-assure ./cmd/upgrade-assure-skip
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Check out latest tag
run: git checkout $LATEST_TAG
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

# TODO: to remove when upgrade-assure binary is available in previous release
- name: Copy old upgrade assure types.go file
run: |
cp -a ./scripts/upgrade-assure/types.go ./cmd/upgrade-assure-skip/types.go
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

# TODO: to remove when upgrade-assure binary is available in previous release
- name: Build old binaries
Expand All @@ -111,7 +111,7 @@ jobs:
OLD_UPGRADE_ASSURE_BINARY_PATH=./build/old-upgrade-assure
mv ./build/upgrade-assure-skip $OLD_UPGRADE_ASSURE_BINARY_PATH
echo "OLD_UPGRADE_ASSURE_BINARY_PATH=$OLD_UPGRADE_ASSURE_BINARY_PATH" >> $GITHUB_ENV
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Chain snapshot and export
run: |
Expand All @@ -120,7 +120,7 @@ jobs:
--skip-node-start \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Chain initialization
run: |
Expand All @@ -129,7 +129,7 @@ jobs:
--skip-node-start \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Check out new branch
run: git checkout ${{ github.head_ref }}
Expand All @@ -148,7 +148,7 @@ jobs:
--skip-upgrade-to-new-binary \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Save up space
run: |
Expand All @@ -164,7 +164,7 @@ jobs:
--skip-upgrade-to-new-binary \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Submit new proposal
uses: nick-fields/retry@v3
Expand All @@ -180,19 +180,19 @@ jobs:
--skip-upgrade-to-new-binary \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Backup elys folders
run: |
cp -a $HOME/.elys /tmp/elys-backup
cp -a $HOME/.elys2 /tmp/elys2-backup
if: steps.cache-elys-folders.outputs.cache-hit != 'true'
if: steps.cache-backup-directories.outputs.cache-hit != 'true'

- name: Restore elys folders from backup
run: |
mv /tmp/elys-backup $HOME/.elys
mv /tmp/elys2-backup $HOME/.elys2
if: steps.cache-elys-folders.outputs.cache-hit == 'true'
if: steps.cache-backup-directories.outputs.cache-hit == 'true'

- name: Upgrade to new binary
uses: nick-fields/retry@v3
Expand Down

0 comments on commit 5772f9a

Please sign in to comment.