From f48318ac1c62f3cc2e40d889d05c20c0e9ee45db Mon Sep 17 00:00:00 2001 From: ctrlc03 <93448202+ctrlc03@users.noreply.github.com> Date: Fri, 27 Oct 2023 09:36:45 +0100 Subject: [PATCH] fix(ci) - make avaiable updated zkeys and updated download script --- .github/workflows/reusable-e2e.yml | 16 ++++++++-------- integrationTests/scripts/download_zkeys.sh | 21 +++++++-------------- 2 files changed, 15 insertions(+), 22 deletions(-) diff --git a/.github/workflows/reusable-e2e.yml b/.github/workflows/reusable-e2e.yml index a059809c42..aa00eb1d20 100644 --- a/.github/workflows/reusable-e2e.yml +++ b/.github/workflows/reusable-e2e.yml @@ -78,11 +78,11 @@ jobs: - name: Download circom Binary v2.0.8 run: | mkdir -p /home/runner/work/maci/.local/bin - wget -qO /home/runner/work/maci/.local/bin/circom https://github.com/iden3/circom/releases/download/v2.0.8/circom-linux-amd64 - chmod +x /home/runner/work/maci/.local/bin/circom + wget -qO /home/ubuntu/maci/.local/bin/circom https://github.com/iden3/circom/releases/download/v2.0.8/circom-linux-amd64 + chmod +x /home/ubuntu/maci/.local/bin/circom - name: Generate zkeys - # if: ${{ env.CHANGED == 'false' }} + if: ${{ env.CHANGED == 'false' }} run: | cd cli mkdir -p zkeys @@ -90,11 +90,11 @@ jobs: npx zkey-manager compile -c ./zkeys.config.yml npx zkey-manager genZkeys -c ./zkeys.config.yml - # - name: Download zkeys - # if: ${{ env.CHANGED == 'false' }} - # run: | - # cd integrationTests - # npm run download-zkeys + - name: Download zkeys + if: ${{ env.CHANGED == 'false' }} + run: | + cd integrationTests + npm run download-zkeys - name: Bespoke Test run: | diff --git a/integrationTests/scripts/download_zkeys.sh b/integrationTests/scripts/download_zkeys.sh index b019e1464c..5100109b28 100755 --- a/integrationTests/scripts/download_zkeys.sh +++ b/integrationTests/scripts/download_zkeys.sh @@ -5,19 +5,12 @@ cd .. mkdir -p ../cli/zkeys -PKGS="zkeys_10-2-1-2_glibc-211.tar.gz ProcessMessages_10-2-1-2_test.0.zkey TallyVotes_10-1-2_test.0.zkey SubsidyPerBatch_10-1-2_test.0.zkey" +URL=https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.2/maci_keys_10-2-1-2_dev.tar.gz +DIR_NAME="maci_keys.tar.gz" +OUT_DIR=../cli/ + +echo "downloading $URL" +curl $URL -o "$OUT_DIR/$DIR_NAME" +tar -xvf "$OUT_DIR/$DIR_NAME" -C "$OUT_DIR" -BASE_URL=https://maci-develop-fra.s3.eu-central-1.amazonaws.com/v1.1.1-aa4ba27/10-2-1-2 -OUT_DIR=../cli/zkeys -for p in $PKGS -do - url="$BASE_URL/$p" - echo "downloading $url" - curl $url -o "$OUT_DIR/$p" - extension="${p##*.}" - if [ "$extension" == "gz" ] - then - tar -xvf "$OUT_DIR/$p" -C "$OUT_DIR" - fi -done