From 261938e2a685af5a9b163b8fc54a7b0e893c5257 Mon Sep 17 00:00:00 2001 From: Sebastian Stammler Date: Sat, 10 Aug 2024 00:21:40 +0200 Subject: [PATCH] ci: manage versions in versions.json (#11415) * ci: manage versions in versions.json and optimize archive downloads to directly extract * ci: also pin just version --- .circleci/config.yml | 21 ++++++++++----------- versions.json | 5 ++++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index acc32ae6dc20..4a2fc967519f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -432,9 +432,9 @@ jobs: - run: name: Sign command: | - git clone https://github.com/ethereum-optimism/binary_signer - cd binary_signer/signer - git checkout tags/v1.0.3 + VER=$(jq -r .binary_signer < versions.json) + wget -O - "https://github.com/ethereum-optimism/binary_signer/archive/refs/tags/v${VER}.tar.gz" | tar xz + cd "binary_signer-${VER}/signer" IMAGE_PATH="<>/<>/<>:<>" echo $IMAGE_PATH @@ -1091,19 +1091,17 @@ jobs: - run: name: Install latest golang command: | - wget https://go.dev/dl/go1.21.1.linux-amd64.tar.gz + VER=$(jq -r .go < versions.json) sudo rm -rf /usr/local/go - sudo tar -C /usr/local -xzf go1.21.1.linux-amd64.tar.gz + wget "https://go.dev/dl/go${VER}.linux-amd64.tar.gz" -O - | sudo tar -C /usr/local -xz export PATH=$PATH:/usr/local/go/bin go version - run: name: Install Geth command: | - wget https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.13.14-2bd6bd01.tar.gz - # geth only provides md5 sums sadly - echo '76a04354dba9980fcbc35bece2957b30 geth-alltools-linux-amd64-1.13.14-2bd6bd01.tar.gz' | md5sum -c - - tar -xzvf geth-alltools-linux-amd64-1.13.14-2bd6bd01.tar.gz - sudo cp geth-alltools-linux-amd64-1.13.14-2bd6bd01/* /usr/local/bin + VER=$(jq -r .geth_release < versions.json) + wget "https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-${VER}.tar.gz" -O - | tar xz + sudo cp "geth-alltools-linux-amd64-${VER}"/* /usr/local/bin - run: name: Install eth2-testnet-genesis command: | @@ -1120,7 +1118,8 @@ jobs: - run: name: Install Just command: | - curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/bin + VER=$(jq -r .just < versions.json) + curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/bin --tag "${VER}" echo 'export PATH="${PATH}:$HOME/bin"' >> $BASH_ENV - install-contracts-dependencies - attach_workspace: diff --git a/versions.json b/versions.json index 4ae8f8b5ffc0..82c0c4931cef 100644 --- a/versions.json +++ b/versions.json @@ -1,10 +1,13 @@ { + "go": "1.22.6", "abigen": "v1.10.25", "foundry": "626221f5ef44b4af950a08e09bd714650d9eb77d", "geth": "v1.14.7", + "geth_release": "1.14.7-aa55f5ea", "eth2_testnet_genesis": "v0.10.0", "nvm": "v20.9.0", "slither": "0.10.2", "kontrol": "0.1.316", - "just": "1.34.0" + "just": "1.34.0", + "binary_signer": "1.0.4" }