Skip to content

Commit

Permalink
Added workflow for generating protocol devchain
Browse files Browse the repository at this point in the history
  • Loading branch information
jcortejoso committed Nov 8, 2023
1 parent 29f6d70 commit 896fd06
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/celo-monorepo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ jobs:
# https for all git operations that yarn may perform.
git config --global url."https://github.com".insteadOf git://github.com
yarn --cwd packages/protocol test:generate-old-devchain-and-build -b $RELEASE_TAG -d .tmp/released_chain -l /dev/stdout -g scripts/truffle/releaseGoldExampleConfigs.json
protocol-test-release:
name: Protocol Test Release
runs-on: ['self-hosted', 'monorepo-node18']
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/protocol-devchain.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: celo-monorepo CI/CD - generate protocol devchain
run-name: celo-monorepo Protocol devchain

on:
schedule:
# monthly on 1 at 0:00 UTC
- cron: 0 0 1 * *
workflow_dispatch:
push:
branches:
- jcortejoso/debug-ci

jobs:
generate-protocol-devchain:
name: Generate protocol devchain used in celo-monorepo.yml workflow
runs-on: ['self-hosted', 'monorepo-node18']
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
tag:
- core-contracts.v9
- core-contracts.v10
steps:
- uses: actions/checkout@v4
with:
ref: ${{ matrix.tag }}
fetch-depth: 0
submodules: recursive
- name: Install yarn dependencies
run: git config --global url."https://".insteadOf ssh:// && yarn install
- name: Build packages
run: yarn build --ignore docs --include-dependencies
# TODO: Needed?
- name: Opcode tests
run: |
yarn --cwd packages/protocol check-opcodes
- uses: actions/setup-node@v3
# Workaround for https://stackoverflow.com/questions/72978485/git-submodule-update-failed-with-fatal-detected-dubious-ownership-in-repositor
- name: Configure git safe directories
run: git config --global --add safe.directory '*'
- name: Generate devchain of previous release
run: |
mkdir devchain
GRANTS_FILE=packages/protocol/scripts/truffle/releaseGoldExampleConfigs.json
yarn --cwd packages/protocol devchain generate-tar devchain/devchain.tar.gz --release_gold_contracts $GRANTS_FILE
mv packages/protocol/build/contracts* devchain/
- name: Upload devchain as artifact
uses: actions/upload-artifact@v2
with:
name: devchain-${{ matrix.tag }}
path: devchain

0 comments on commit 896fd06

Please sign in to comment.