Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: move tmp files to home #535

Merged
merged 1 commit into from
May 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 11 additions & 9 deletions .github/workflows/software-upgrade-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ jobs:
id: retrieve-info-json
run: |
DOWNLOAD_URL=https://snapshots-testnet.stake-town.com/elys/info.json
curl -L $DOWNLOAD_URL -o /tmp/info.json
curl -L $DOWNLOAD_URL -o /home/runner/info.json
echo "Info.json downloaded to check snapshot version."

# retrieve blockHeight field value from info.json
SNAPSHOT_BLOCK_HEIGHT=$(cat /tmp/info.json | awk -F'"' '/"blockHeight":/{print $4}')
SNAPSHOT_BLOCK_HEIGHT=$(cat /home/runner/info.json | awk -F'"' '/"blockHeight":/{print $4}')
echo "SNAPSHOT_BLOCK_HEIGHT=$SNAPSHOT_BLOCK_HEIGHT" >> $GITHUB_ENV
echo "Snapshot block height: $SNAPSHOT_BLOCK_HEIGHT"

Expand All @@ -57,7 +57,7 @@ jobs:
echo "SNAPSHOT_DOWNLOAD_URL=$SNAPSHOT_DOWNLOAD_URL" >> $GITHUB_OUTPUT

# set snapshot file path
SNAPSHOT_FILE_PATH=/tmp/snapshot.tar.lz4
SNAPSHOT_FILE_PATH=/home/runner/snapshot.tar.lz4
echo "SNAPSHOT_FILE_PATH=$SNAPSHOT_FILE_PATH" >> $GITHUB_ENV
echo "SNAPSHOT_FILE_PATH=$SNAPSHOT_FILE_PATH" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -87,7 +87,7 @@ jobs:
- name: Set old binary path
id: set-old-binary-path
run: |
OLD_BINARY_PATH=/tmp/elysd-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }}
OLD_BINARY_PATH=/home/runner/elysd-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }}
echo "OLD_BINARY_PATH=$OLD_BINARY_PATH" >> $GITHUB_ENV
echo "OLD_BINARY_PATH=$OLD_BINARY_PATH" >> $GITHUB_OUTPUT

Expand Down Expand Up @@ -260,7 +260,7 @@ jobs:
path: |
/home/runner/.elys
/home/runner/.elys2
/tmp/genesis.json
/home/runner/genesis.json
key: ${{ runner.os }}-chain-snapshot-and-export-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }}
lookup-only: true

Expand Down Expand Up @@ -321,7 +321,8 @@ jobs:
--skip-chain-init \
--skip-node-start \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
--timeout-wait-for-node 100000 \
--genesis-file-path /home/runner/genesis.json
if: steps.cache-chain-snapshot-and-export.outputs.cache-hit != 'true'

chain-init:
Expand Down Expand Up @@ -367,7 +368,7 @@ jobs:
path: |
/home/runner/.elys
/home/runner/.elys2
/tmp/genesis.json
/home/runner/genesis.json
key: ${{ runner.os }}-chain-snapshot-and-export-${{ needs.retrieve-latest-tag.outputs.LATEST_TAG }}
if: steps.cache-chain-init.outputs.cache-hit != 'true'

Expand Down Expand Up @@ -407,7 +408,8 @@ jobs:
--skip-snapshot \
--skip-node-start \
--timeout-next-block 100000 \
--timeout-wait-for-node 100000
--timeout-wait-for-node 100000 \
--genesis-file-path /home/runner/genesis.json
if: steps.cache-chain-init.outputs.cache-hit != 'true'

create-second-validator:
Expand Down Expand Up @@ -756,7 +758,7 @@ jobs:
SANITIZED_HEAD_REF=${{ github.head_ref || github.ref }}
SANITIZED_HEAD_REF=$(echo "$SANITIZED_HEAD_REF" | sed 's|refs/heads/||; s|/|_|g')
NEW_SNAPSHOT_FILENAME="elys-snapshot-${SANITIZED_HEAD_REF}.tar.lz4"
NEW_SNAPSHOT_PATH="/tmp/${NEW_SNAPSHOT_FILENAME}"
NEW_SNAPSHOT_PATH="/home/runner/${NEW_SNAPSHOT_FILENAME}"
echo "NEW_SNAPSHOT_FILENAME=$NEW_SNAPSHOT_FILENAME" >> $GITHUB_ENV
echo "NEW_SNAPSHOT_PATH=$NEW_SNAPSHOT_PATH" >> $GITHUB_ENV
cd /home/runner
Expand Down
Loading