Skip to content

Commit

Permalink
Merge branch 'main' into nfts-tbz-s2-champion-game-draft
Browse files Browse the repository at this point in the history
  • Loading branch information
bearni95 committed Sep 19, 2024
2 parents b6211bf + fd1c039 commit 161dbc0
Show file tree
Hide file tree
Showing 399 changed files with 8,520 additions and 3,652 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/bridge-ui--ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@ on: workflow_call

jobs:
build:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@ name: Bridge UI CI/CD

on:
push:
paths:
- "packages/bridge-ui/**"
branches-ignore:
- dependabot/**
tags:
- "bridge-ui-v*"

pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/bridge-ui/**"

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docs-site--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,11 @@ on:

jobs:
deploy-docs-site-preview:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/docs-site--production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ on:

jobs:
deploy-docs-site-production:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
20 changes: 16 additions & 4 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
branches: [main]
paths:
- "packages/eventindexer/**"
- "go.mod"
- "go.sum"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/eventindexer/**"
- "go.mod"
Expand All @@ -14,7 +17,8 @@ on:
jobs:
lint-eventindexer:
name: lint-eventindexer
runs-on: [taiko-runner]
if: github.event_name == 'pull_request'
runs-on: [arc-runner-set]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -31,14 +35,18 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-eventindexer:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
needs: lint-eventindexer
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand All @@ -55,11 +63,15 @@ jobs:
flags: eventindexer

push-eventindexer-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]
runs-on: [arc-runner-set]

steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/fork-diff--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ on:

jobs:
deploy-fork-diff-preview:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/fork-diff--production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,11 @@ on:

jobs:
deploy-fork-diff-production:
runs-on: [taiko-runner]
runs-on: [arc-runner-set]
steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ on:
branches: [main]
paths:
- "packages/guardian-prover-health-check/**"
- "go.mod"
- "go.sum"
pull_request:
paths:
- "packages/guardian-prover-health-check/**"
Expand Down Expand Up @@ -55,7 +57,8 @@ jobs:
flags: guardian-prover-health-check

push-guardian-prover-health-check-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]

Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/nfts.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
name: NFTs

on:
push:
branches: [main]
paths:
- "packages/nfts/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/nfts/**"

jobs:
build-nfts-contracts:
runs-on: [taiko-runner]
if: github.event.pull_request.draft == false
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand Down
69 changes: 49 additions & 20 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,15 @@
name: Protocol

on:
push:
branches: [main]
paths:
- "packages/protocol/**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/protocol/**"

jobs:
build-protocol:
runs-on: [taiko-runner]
if: github.event.pull_request.draft == false
runs-on: [arc-runner-set]
permissions:
# Give the necessary permissions for stefanzweifel/git-auto-commit-action.
contents: write
Expand All @@ -21,6 +19,9 @@ jobs:
with:
access_token: ${{ github.token }}

- name: Prepare environment
run: sudo apt-get update && sudo apt-get install -y git nc

- name: Checkout repository
uses: actions/checkout@v4
with:
Expand All @@ -32,32 +33,60 @@ jobs:
- name: Install pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Unit tests
- name: Clean up and fmt
working-directory: ./packages/protocol
run: pnpm clean && pnpm test
run: pnpm clean && forge fmt

- name: Format solidity && update contract layout table
- name: L2-Unit tests
working-directory: ./packages/protocol
run: pnpm layout && forge fmt
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 table"

- name: Generate genesis
working-directory: ./packages/protocol
run: pnpm test:genesis

- name: Run snapshot (Foundry)
working-directory: ./packages/protocol
run: pnpm snapshot
commit_message: "forge fmt & update contract layout tables"

- name: Deploy L1 contracts
- name: L1-Deploy contracts
working-directory: ./packages/protocol
timeout-minutes: 2
run: |
anvil --hardfork cancun &
while ! nc -z localhost 8545; do
sleep 1
done
pnpm test:deploy
pnpm test:deploy:l1
genesis-docker:
if: github.event.pull_request.draft == false
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
20 changes: 16 additions & 4 deletions .github/workflows/relayer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ on:
branches: [main]
paths:
- "packages/relayer/**"
- "go.mod"
- "go.sum"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/relayer/**"
- "go.mod"
Expand All @@ -14,7 +17,8 @@ on:
jobs:
lint-relayer:
name: lint-relayer
runs-on: [taiko-runner]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
runs-on: [arc-runner-set]
steps:
- uses: actions/setup-go@v5
with:
Expand All @@ -31,14 +35,18 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-relayer:
runs-on: [taiko-runner]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
runs-on: [arc-runner-set]
needs: lint-relayer
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
Expand All @@ -55,11 +63,15 @@ jobs:
flags: relayer

push-relayer-docker-image:
if: ${{ github.event_name == 'pull_request' }}
# Skip dependabot PRs
if: ${{ github.event_name == 'pull_request' && ! startsWith(github.ref, 'refs/heads/dependabot/') }}
name: Build and push docker image
runs-on: [taiko-runner]
runs-on: [arc-runner-set]

steps:
- name: Install Git
run: sudo apt-get update && sudo apt-get install -y git

- name: Checkout
uses: actions/checkout@v4
with:
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/repo--auto-approve-pr.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Auto Approve PR

on: pull_request_target
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]

jobs:
auto-approve:
runs-on: ubuntu-latest
if: github.event.pull_request.draft == false && github.actor == 'dependabot[bot]'
runs-on: [arc-runner-set]
permissions:
pull-requests: write
if: github.actor == 'dependabot[bot]'
steps:
- uses: hmarr/auto-approve-action@v4
Loading

0 comments on commit 161dbc0

Please sign in to comment.