Skip to content

Add datasheet

Add datasheet #3357

Workflow file for this run

name: bonsai
on:
merge_group:
pull_request:
branches: [main, "release-*"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
# this is needed to gain access via OIDC to the S3 bucket for caching
permissions:
id-token: write
contents: read
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RISC0_BUILD_LOCKED: 1
RISC0_TOOLCHAIN_VERSION: v2024-01-31.1
jobs:
changes:
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
bonsai: ${{ steps.filter.outputs.bonsai }}
steps:
- uses: actions/checkout@v4
- uses: risc0/paths-filter@4067d885736b84de7c414f582ac45897079b0a78
id: filter
with:
filters: |
bonsai:
- .github/actions/**
- .github/workflows/bonsai.yml
- bonsai/**
- risc0/**
- rust-toolchain.toml
bonsai:
if: needs.changes.outputs.bonsai == 'true'
needs: changes
runs-on: [self-hosted, prod, Linux, cpu]
steps:
# This is a workaround from: https://github.com/actions/checkout/issues/590#issuecomment-970586842
- name: checkout dummy commit (submodule bug workaround)
run: "git checkout -f $(git -c user.name=x -c user.email=x@x commit-tree $(git hash-object -t tree /dev/null) < /dev/null) || :"
- name: checkout code
uses: actions/checkout@v4
with:
lfs: true
submodules: recursive
# Install dependencies.
- uses: ./.github/actions/rustup
- uses: ./.github/actions/sccache
with:
key: Linux-default
- name: Install Foundry
uses: risc0/foundry-toolchain@2fe7e70b520f62368a0e3c464f997df07ede420f
with:
version: nightly-09fe3e041369a816365a020f715ad6f94dbce9f2
- name: Cargo install cargo-risczero
run: cargo install --force --path risc0/cargo-risczero
- run: cargo risczero install --version $RISC0_TOOLCHAIN_VERSION
# Lint
- name: check solidity code formatting in bonsai/ethereum
run: forge fmt --check
working-directory: bonsai/ethereum
- name: check solidity code formatting in bonsai/examples/governance
run: forge fmt --check
working-directory: bonsai/examples/governance
# Test
- name: run cargo tests in bonsai
run: cargo test --locked -- --include-ignored --nocapture
working-directory: bonsai
- name: run cargo tests in bonsai/examples/governance
run: cargo test --locked
working-directory: bonsai/examples/governance
- name: run forge tests in bonsai/ethereum
run: forge test -vvv
working-directory: bonsai/ethereum
- name: run forge tests without the zkVM in bonsai/examples/governance
env:
TEST_USE_ZKVM: false
run: forge test -vvv
working-directory: bonsai/examples/governance
- name: run forge tests with the zkvm in bonsai/examples/governance
env:
TEST_USE_ZKVM: true
run: forge test -vvv
working-directory: bonsai/examples/governance
- run: sccache --show-stats