Skip to content

Commit

Permalink
Merge branch 'main' into nfts-tbz-s1-champion-game-contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
bearni95 committed Dec 6, 2024
2 parents 0dec153 + 5a6f431 commit 1d9cfda
Show file tree
Hide file tree
Showing 479 changed files with 29,168 additions and 17,925 deletions.
28 changes: 15 additions & 13 deletions .github/workflows/bridge-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
- "packages/bridge-ui/**"
branches-ignore:
- dependabot/**
- release-please--branches--**
tags:
- "bridge-ui-v*"

Expand All @@ -16,26 +17,27 @@ on:

jobs:
build-and-test:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
uses: ./.github/workflows/bridge-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(bridge-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>

# Internal Devnet
deploy_bridge-ui_devnet_preview:
if: ${{ github.ref_type != 'tag' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_INTERNAL }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}
# deploy_bridge-ui_devnet_preview:
# if: ${{ github.event_name == 'pull_request' && (contains(github.event.pull_request.labels.*.name, 'option.workflow_on') || github.event.pull_request.draft == false && github.head_ref != 'release-please-*') }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
# environment: "preview"
# flags: ""
# secrets:
# vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_BRIDGE_UI_INTERNAL }}
# vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
# vercel_token: ${{ secrets.VERCEL_TOKEN }}

# Hekla testnet
deploy_bridge-ui_hekla_preview:
if: ${{ github.ref_type != 'tag' }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -60,7 +62,7 @@ jobs:

# Mainnet
deploy_bridge-ui_mainnet_preview:
if: ${{ github.ref_type != 'tag' }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/docs-site--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_DOCS_SITE }}

on:
push:
branches-ignore:
- main
- release-please-*
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/docs-site/**"
branches-ignore:
- release-please--branches--**

jobs:
deploy-docs-site-preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
Expand Down
14 changes: 8 additions & 6 deletions .github/workflows/eventindexer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,18 @@ on:
- "packages/eventindexer/**"
- "go.mod"
- "go.sum"
branches-ignore:
- release-please--branches--**

jobs:
lint-eventindexer:
name: lint-eventindexer
if: github.event_name == 'pull_request'
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please' && !startsWith(github.head_ref, 'refs/heads/dependabot/')) }}
runs-on: [arc-runner-set]
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21.0
go-version: 1.23.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
Expand All @@ -32,11 +34,11 @@ jobs:

# Optional: working directory, useful for monorepos
working-directory: ./packages/eventindexer
args: --config=.golangci.yml --timeout=4m
args: --config=.golangci.yml --timeout=10m

test-eventindexer:
runs-on: [arc-runner-set]
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please' && !startsWith(github.head_ref, 'refs/heads/dependabot/')) }}
needs: lint-eventindexer
steps:
- name: Cancel Previous Runs
Expand All @@ -50,7 +52,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ">=1.21.0"
go-version: ">=1.23.0"

- name: eventindexer - Unit Tests
working-directory: ./packages/eventindexer
Expand All @@ -64,7 +66,7 @@ jobs:

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

Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/fork-diff--preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ env:
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID_FORK_DIFF }}

on:
workflow_dispatch:
push:
branches-ignore:
- main
- release-please-*
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/fork-diff/**"
branches-ignore:
- release-please--branches--**

jobs:
deploy-fork-diff-preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Install Git
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/guardian-prover-health-check-ui--ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on: workflow_call

jobs:
check-guardian-prover-health-check-ui:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') && !startsWith(github.head_ref, 'refs/heads/dependabot/') }}
runs-on: [taiko-runner]
steps:
- name: Cancel previous runs
Expand Down
35 changes: 20 additions & 15 deletions .github/workflows/guardian-prover-health-check-ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,26 +7,31 @@ on:
pull_request:
paths:
- "packages/guardian-prover-health-check-ui/**"
branches-ignore:
- release-please--branches--**

jobs:
build-and-test:
uses: ./.github/workflows/guardian-prover-health-check-ui--ci.yml

# Deployment name follow the pattern: deploy_<appname(guardian-prover-health-check-ui)>_<network(devnet|hekla|mainnet)>_<environment(preview|production)>
deploy_guardians-ui_mainnet_preview:
if: ${{ github.ref_name != 'main' }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

# deploy_guardians-ui_devnet_preview:
# if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
# needs: build-and-test
# uses: ./.github/workflows/repo--vercel-deploy.yml
# with:
# environment: "preview"
# flags: ""
# secrets:
# vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_INTERNAL }}
# vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
# vercel_token: ${{ secrets.VERCEL_TOKEN }}



deploy_guardians-ui_hekla_preview:
if: ${{ github.ref_name != 'main' }}
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
Expand All @@ -37,15 +42,15 @@ jobs:
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

deploy_guardians-ui_devnet_preview:
if: ${{ github.ref_name != 'main' }}
deploy_guardians-ui_mainnet_preview:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
needs: build-and-test
uses: ./.github/workflows/repo--vercel-deploy.yml
with:
environment: "preview"
flags: ""
secrets:
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_INTERNAL }}
vercel_project_id: ${{ secrets.VERCEL_PROJECT_ID_GUARDIAN_UI_MAINNET }}
vercel_org_id: ${{ secrets.VERCEL_ORG_ID }}
vercel_token: ${{ secrets.VERCEL_TOKEN }}

Expand Down
10 changes: 7 additions & 3 deletions .github/workflows/guardian-prover-health-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,18 @@ on:
- "packages/guardian-prover-health-check/**"
- "go.mod"
- "go.sum"
branches-ignore:
- release-please--branches--**

jobs:
lint-guardian-prover-health-check:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
name: lint-guardian-prover-health-check
runs-on: [taiko-runner]
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.21.0
go-version: 1.23.0
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
Expand All @@ -33,6 +36,7 @@ jobs:
args: --config=.golangci.yml --timeout=4m

test-guardian-prover-health-check:
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [taiko-runner]
needs: lint-guardian-prover-health-check
steps:
Expand All @@ -44,7 +48,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.21.0"
go-version: "1.23.0"

- name: guardian-prover-health-check - Unit Tests
working-directory: ./packages/guardian-prover-health-check
Expand All @@ -58,7 +62,7 @@ jobs:

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

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/nfts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/nfts/**"
- "!packages/nfts/contract_layout_*"
branches-ignore:
- release-please--branches--**

jobs:
build-nfts-contracts:
if: github.event.pull_request.draft == false
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'release-please') }}
runs-on: [arc-runner-set]
steps:
- name: Cancel previous runs
Expand Down
39 changes: 39 additions & 0 deletions .github/workflows/protocol-monitors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Monitors

on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
paths:
- "packages/monitors/**"
branches-ignore:
- release-please--branches--**

jobs:
deploy-protocol-monitors:
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 pnpm dependencies
uses: ./.github/actions/install-pnpm-dependencies

- name: Deploy Monitors on OZ Defender
working-directory: packages/monitors/defender/mainnet
env:
DEFENDER_API_KEY: ${{ secrets.DEFENDER_API_KEY }}
DEFENDER_API_SECRET: ${{ secrets.DEFENDER_API_SECRET }}
SERVERLESS_ACCESS_KEY: ${{ secrets.SERVERLESS_ACCESS_KEY }}
run: |
npx serverless deploy
16 changes: 12 additions & 4 deletions .github/workflows/protocol.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,17 @@ on:
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/**"
branches-ignore:
- release-please--branches--**

jobs:
build-protocol:
if: github.event.pull_request.draft == false
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.
Expand All @@ -20,7 +27,8 @@ jobs:
access_token: ${{ github.token }}

- name: Prepare environment
run: sudo apt-get update && sudo apt-get install -y git nc
continue-on-error: true
run: sudo apt-get update && sudo apt-get install -y git wget

- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -55,13 +63,13 @@ jobs:
timeout-minutes: 2
run: |
anvil --hardfork cancun &
while ! nc -z localhost 8545; do
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
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.
Expand Down
Loading

0 comments on commit 1d9cfda

Please sign in to comment.