diff --git a/.circleci/config.yml b/.circleci/config.yml index 0953aceaa0..e31a8c5d4e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -311,17 +311,26 @@ jobs: steps: - restore_cache: keys: - - foundry-bin-${foundry_locked_commit}-12 + - foundry-bin-latest-${foundry_cache_version} - rust/install: {} - - run: | - if [ ! -d ~/.foundry ]; then - curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup - ./foundryup -C $foundry_locked_commit - fi - rm -rf * - echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV + - run: + name: "Install Foundry" + working_directory: ~/ + environment: + SHELL: /bin/bash + command: |- + export PATH="$PATH:$HOME/.foundry/bin" + echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV + if command -v anvil; then + echo "Anvil already installed" + anvil --version + else + curl -L https://foundry.paradigm.xyz | bash + foundryup + fi + rm -rf * - save_cache: - key: foundry-bin-${foundry_locked_commit}-12 + key: foundry-bin-latest-${foundry_cache_version} paths: - ~/.foundry/bin - checkout diff --git a/.circleci/src/jobs/job-test-deploy-script.yml b/.circleci/src/jobs/job-test-deploy-script.yml index 77b498333d..6b5c3351a0 100644 --- a/.circleci/src/jobs/job-test-deploy-script.yml +++ b/.circleci/src/jobs/job-test-deploy-script.yml @@ -5,18 +5,28 @@ steps: # get foundry - restore_cache: keys: - - foundry-bin-${foundry_locked_commit}-12 + - foundry-bin-latest-${foundry_cache_version} - rust/install: {} - - run: | - if [ ! -d ~/.foundry ]; then - curl -O https://raw.githubusercontent.com/foundry-rs/foundry/master/foundryup/foundryup && chmod +x ./foundryup - ./foundryup -C $foundry_locked_commit - fi - rm -rf * - echo 'export PATH="$PATH:$HOME/.foundry/bin"' >> $BASH_ENV + - run: + name: "Install Foundry" + working_directory: ~/ + environment: + SHELL: /bin/bash + command: |- + export PATH="$PATH:$HOME/.foundry/bin" + echo 'export PATH=$PATH:$HOME/.foundry/bin' >> $BASH_ENV + + if command -v anvil; then + echo "Anvil already installed" + anvil --version + else + curl -L https://foundry.paradigm.xyz | bash + foundryup + fi + rm -rf * - save_cache: - key: foundry-bin-${foundry_locked_commit}-12 + key: foundry-bin-latest-${foundry_cache_version} paths: - ~/.foundry/bin