Skip to content

Pacaya

Pacaya #11512

Workflow file for this run

name: Protocol
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/protocol/**"
- "!packages/protocol/contract_layout_*"
- "!packages/protocol/audit/**"
- "!packages/protocol/docs/**"
- "!packages/protocol/simulation/**"
- "!packages/protocol/deployments/**"
- "!packages/protocol/script/layer2/hekla/**"
- "!packages/protocol/script/layer2/mainnet/**"
- "!packages/protocol/script/layer1/hekla/**"
- "!packages/protocol/script/layer1/mainnet/**"
- "!packages/protocol/script/layer1/preconf/**"
- "!packages/protocol/script/layer1/provers/**"
- "!packages/protocol/script/layer1/team/**"
branches-ignore:
- release-please--branches--**
jobs:
build-protocol:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
contents: write
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Prepare environment
continue-on-error: true
run: sudo apt-get update && sudo apt-get install -y git wget
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/[email protected]
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
- name: Clean up and fmt
working-directory: ./packages/protocol
run: pnpm clean && forge fmt
- name: L2-Unit tests
working-directory: ./packages/protocol
run: pnpm compile:l2 && pnpm test:l2 && pnpm layout:l2
- name: L1-Unit tests
working-directory: ./packages/protocol
run: pnpm compile:l1 && pnpm test:l1 && pnpm layout:l1
- name: Commit contract layout table
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "forge fmt & update contract layout tables"
- name: L1-Deploy contracts
working-directory: ./packages/protocol
timeout-minutes: 2
run: |
anvil --hardfork cancun &
until cast chain-id --rpc-url "http://localhost:8545" 2> /dev/null; do
sleep 1
done
pnpm test:deploy:l1
genesis-docker:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [taiko-runner]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
contents: write
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install Foundry
uses: foundry-rs/[email protected]
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies
- name: Compile
working-directory: ./packages/protocol
run: pnpm clean && pnpm compile
- name: L2-Generate Genesis (using docker)
working-directory: ./packages/protocol
run: pnpm genesis:test