Skip to content

Migrate to version-aware expression for generated merkle root columns… #3972

Migrate to version-aware expression for generated merkle root columns…

Migrate to version-aware expression for generated merkle root columns… #3972

Workflow file for this run

name: Contracts
on:
push:
branches:
- main
- release-*
tags:
# YYYYMMDD
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*"
pull_request:
branches:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
RUST_LOG: info,libp2p=off
jobs:
contracts:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- name: Install Nix
uses: cachix/install-nix-action@V27
- name: Enable Cachix
uses: cachix/cachix-action@v15
# If PR is from a non-collaborator (e. g. dependabot) the secrets are missing and the login to cachix fails.
continue-on-error: true
with:
name: espresso-systems-private
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
extraPullNames: nix-community
skipPush: ${{ github.actor == 'dependabot[bot]' }}
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
with:
prefix-key: v2-rust
- name: Check toolchain versions
run: nix develop --accept-flake-config -c ./scripts/show-toolchain-versions
- name: Format check
run: nix develop --accept-flake-config -c pre-commit run forge-fmt --all-files --show-diff-on-failure
- name: Solhint solidity linter
run: nix develop --accept-flake-config -c pre-commit run solhint --all-files --show-diff-on-failure
- name: Build non-test contracts without warnings
run: nix develop --accept-flake-config -c forge build --skip test --deny-warnings
- name: Build all contracts
run: nix develop --accept-flake-config -c forge build
- name: Check if bindings up to date
run: nix develop --accept-flake-config -c pre-commit run contract-bindings --all-files --show-diff-on-failure
- name: Print changes to bindings
if: ${{ failure() }}
run: |
git status
git diff
- name: Build diff-test
run: |
nix develop --accept-flake-config -c cargo build --locked --bin diff-test --release
- name: Run tests (quick version for PR)
if: ${{ github.event_name == 'pull_request' }}
run: |
export FOUNDRY_PROFILE=quick
nix develop --accept-flake-config -c forge test -vvv
- name: Run tests (full version for main)
if: ${{ github.event_name != 'pull_request' }}
run: |
nix develop --accept-flake-config -c forge test -vvv
- name: Print light contract gas benchmark
run: |
nix develop --accept-flake-config -c forge test --mt testCorrectUpdateBench