From 43de5a84a19161be31ecf3e3b53afea8019b1dc5 Mon Sep 17 00:00:00 2001 From: Gianmarco Fraccaroli Date: Wed, 6 Mar 2024 16:10:48 +0100 Subject: [PATCH] ci: change hermes version per branch --- .github/workflows/build-and-test.yml | 15 ++++++++++++--- .github/workflows/scripts/hermes.json | 3 +++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/scripts/hermes.json diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index d7b3e727bd..f0dcf58b8e 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -571,7 +571,6 @@ jobs: nightly_version: [nightly-2024-02-10] mold_version: [2.4.0] comet_bft: [0.37.2] - hermes: [1.7.4-namada-beta7] make: - index: 0 - index: 1 @@ -649,9 +648,19 @@ jobs: 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 + echo "Using hermes for branch: ${BRANCH_NAME}" + HERMES_VERSION=$(cat .github/workflows/scripts/hermes.json | jq .${BRANCH_ENV:-invalid} -r -e) + HERMES_VERSION_DEFAULT=$(cat .github/workflows/scripts/hermes.json | jq .default -r) + if [ -z "$HERMES_VERSION" ] + then + HERMES_VERSION=$HERMES_VERSION_DEFAULT + fi + echo "Using hermes version: ${HERMES_VERSION}" + curl -o hermes.zip -LO https://github.com/heliaxdev/hermes/releases/download/v${HERMES_VERSION}/hermes-v${HERMES_VERSION}-x86_64-unknown-linux-gnu.zip + unzip hermes.zip mv hermes /usr/local/bin + env: + BRANCH_NAME: ${GITHUB_REF##*/} - name: Change permissions run: | chmod +x target/release/namada diff --git a/.github/workflows/scripts/hermes.json b/.github/workflows/scripts/hermes.json new file mode 100644 index 0000000000..01b3fefaba --- /dev/null +++ b/.github/workflows/scripts/hermes.json @@ -0,0 +1,3 @@ +{ + "default": "1.7.4-namada-beta7" +} \ No newline at end of file