-
Notifications
You must be signed in to change notification settings - Fork 376
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added workflow for generating protocol devchain
- Loading branch information
1 parent
29f6d70
commit 896fd06
Showing
2 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |