Skip to content

Commit

Permalink
ci(devnet): lock anvil version
Browse files Browse the repository at this point in the history
  • Loading branch information
endersonmaia committed Oct 31, 2024
1 parent dae7520 commit deb11f8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .changeset/olive-buckets-lay.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cartesi/devnet": major
---

lock anvil version in CI to the same anvil used by cartesi/rollups-contracts
19 changes: 19 additions & 0 deletions .github/workflows/devnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,27 @@ jobs:
node-version: 20
cache: "pnpm"

- name: Capture anvil version from @cartesi/rollups-contracts release
id: anvil-version
working-directory: packages/devnet
run: |
CARTESI_ROLLUPS_CONTRACTS_VERSION="$(jq -r '.devDependencies."@cartesi/rollups"' package.json)"
ANVIL_NIGHTLY_VERSION="$(
gh release view v${CARTESI_ROLLUPS_CONTRACTS_VERSION} \
--repo cartesi/rollups-contracts \
--json assets \
--jq '.assets[] | select(.name | contains("anvil")) | .name | capture(".*-anvil-nightly-(?<hash>[a-f0-9]{40})\\.tar\\.gz").hash'
)"
printf "Detected @cartesi/rollups-contracts version: %s\n" "${CARTESI_ROLLUPS_CONTRACTS_VERSION}"
printf "Detected anvil nightly version: %s\n" "${ANVIL_NIGHTLY_VERSION}"
echo "ANVIL_VERSION=${ANVIL_NIGHTLY_VERSION}" >> "$GITHUB_OUTPUT"
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: ${{ steps.anvil-version.outputs.ANVIL_VERSION }}

- name: Install dependencies
run: pnpm install
Expand Down

0 comments on commit deb11f8

Please sign in to comment.