Skip to content

Commit

Permalink
Merge branch 'yuji/download-hermes' (#1808)
Browse files Browse the repository at this point in the history
* origin/yuji/download-hermes:
  remove the changelog
  add changelog
  add script
  download Hermes for E2E tests
  • Loading branch information
Fraccaman committed Aug 14, 2023
2 parents 233e4b8 + 5ccd3d4 commit 123e14a
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,7 @@ jobs:
nightly_version: [nightly-2023-06-01]
mold_version: [1.7.0]
comet_bft: [0.37.2]
hermes: [1.6.0-namada-beta1]
make:
- name: e2e
suffix: ''
Expand Down Expand Up @@ -525,13 +526,19 @@ jobs:
curl -o cometbft.tar.gz -LO https://github.com/cometbft/cometbft/releases/download/v${{ matrix.comet_bft }}/cometbft_${{ matrix.comet_bft }}_linux_amd64.tar.gz
tar -xvzf cometbft.tar.gz
mv cometbft /usr/local/bin
- name: Download Hermes
run: |
curl -o hermes.tar.gz -LO https://github.com/heliaxdev/hermes/releases/download/v${{ matrix.hermes }}/hermes-v${{ matrix.hermes }}-x86_64-unknown-linux-gnu.tar.gz
tar -xvzf hermes.tar.gz
mv hermes /usr/local/bin
- name: Change permissions
run: |
chmod +x target/release/namada
chmod +x target/release/namadaw
chmod +x target/release/namadan
chmod +x target/release/namadac
chmod +x /usr/local/bin/cometbft
chmod +x /usr/local/bin/hermes
- name: Run e2e test
run: |
python3 .github/workflows/scripts/schedule-e2e.py
Expand Down
41 changes: 41 additions & 0 deletions scripts/get_hermes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/usr/bin/env bash

set -Eo pipefail

HERMES_MAJORMINOR="1.6"
HERMES_PATCH="0"
HERMES_SUFFIX="-namada-beta1"

HERMES_REPO="https://github.com/heliaxdev/hermes"

HERMES_VERSION="${HERMES_MAJORMINOR}.${HERMES_PATCH}${HERMES_SUFFIX}"

TARGET_PATH="/usr/local/bin"
TMP_PATH="/tmp"

error_exit()
{
echo "Error: $1" >&2
exit 1
}

read -r SYSTEM MACHINE <<< "$(uname -s -m)"

if [[ $SYSTEM = "Darwin" ]]; then
SYSTEM="apple-darwin"
else
SYSTEM="unknown-linux-gnu"
fi

ARCH="x86_64"
if [[ $MACHINE = "aarch64" ]] || [[ $MACHINE = "arm64" ]]; then
ARCH="aarch64"
fi

RELEASE_URL=${HERMES_REPO}/releases/download/v${HERMES_VERSION}/hermes-v${HERMES_VERSION}-${ARCH}-${SYSTEM}.tar.gz
echo "$RELEASE_URL"

curl -LsSfo "$TMP_PATH"/hermes.tar.gz "$RELEASE_URL" || error_exit "hermes release download failed"

cd $TARGET_PATH
sudo tar -xvzf $TMP_PATH/hermes.tar.gz hermes || error_exit "hermes release extraction failed"

0 comments on commit 123e14a

Please sign in to comment.