-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(toolbox): add zk_toolbox ci (#1985)
## What ❔ - Adds zk_toolbox CI with ecosystem initialization - Add zk_supervisor integration-tests command - Make paths in ecosystem config absolute ## Why ❔ - Improve CI flow ## Checklist <!-- Check your PR fulfills the following items. --> <!-- For draft PRs check the boxes as you complete them. --> - [x] PR title corresponds to the body of PR (we generate changelog entries from PRs). - [x] Tests for the changes have been added / updated. - [x] Documentation comments have been added / updated. - [x] Code has been formatted via `zk fmt` and `zk lint`. - [x] Spellcheck has been run via `zk spellcheck`.
- Loading branch information
Showing
53 changed files
with
358 additions
and
56 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Workflow template for CI jobs for Core Components | ||
on: | ||
workflow_call: | ||
|
||
env: | ||
CLICOLOR: 1 | ||
|
||
jobs: | ||
lint: | ||
name: lint | ||
uses: ./.github/workflows/ci-core-lint-reusable.yml | ||
|
||
build: | ||
runs-on: [matterlabs-ci-runner] | ||
|
||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
|
||
- name: Setup environment | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
echo IN_DOCKER=1 >> .env | ||
- name: Start services | ||
run: | | ||
ci_localnet_up | ||
- name: Build | ||
run: | | ||
ci_run bash -c "cd zk_toolbox && cargo build --release" | ||
# Compress with tar to avoid permission loss | ||
# https://github.com/actions/upload-artifact?tab=readme-ov-file#permission-loss | ||
- name: Tar zk_toolbox binaries | ||
run: | | ||
tar -C ./zk_toolbox/target/release -cvf zk_toolbox.tar zk_inception zk_supervisor | ||
- name: Upload zk_toolbox binaries | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: zk_toolbox | ||
path: zk_toolbox.tar | ||
compression-level: 0 | ||
|
||
integration_test: | ||
runs-on: [matterlabs-ci-runner] | ||
needs: [build] | ||
|
||
steps: | ||
- uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4 | ||
with: | ||
submodules: "recursive" | ||
fetch-depth: 0 | ||
|
||
- name: Download zk_toolbox binaries | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: zk_toolbox | ||
path: . | ||
|
||
- name: Extract zk_toolbox binaries | ||
run: | | ||
tar -xvf zk_toolbox.tar -C ./bin | ||
- name: Setup environment | ||
run: | | ||
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV | ||
echo $(pwd)/bin >> $GITHUB_PATH | ||
echo IN_DOCKER=1 >> .env | ||
- name: Start services | ||
run: | | ||
ci_localnet_up | ||
- name: Initialize ecosystem | ||
run: | | ||
ci_run zk_inception ecosystem init --deploy-paymaster --deploy-erc20 \ | ||
--deploy-ecosystem --l1-rpc-url=http://reth:8545 \ | ||
--server-db-url=postgres://postgres:notsecurepassword@postgres:5432 \ | ||
--server-db-name=zksync_server_localhost_era \ | ||
--prover-db-url=postgres://postgres:notsecurepassword@postgres:5432 \ | ||
--prover-db-name=zksync_prover_localhost_era \ | ||
--ignore-prerequisites --verbose | ||
- name: Run server | ||
run: | | ||
ci_run zk_inception server --ignore-prerequisites &>server.log & | ||
ci_run sleep 5 | ||
- name: Run integration tests | ||
run: | | ||
ci_run zk_supervisor integration-tests --ignore-prerequisites --verbose | ||
- name: Show server.log logs | ||
if: always() | ||
run: ci_run cat server.log || true |
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
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
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
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 @@ | ||
/build |
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,13 @@ | ||
{ | ||
"name": "utils", | ||
"version": "0.1.0", | ||
"license": "MIT", | ||
"main": "build/index.js", | ||
"types": "build/index.d.ts", | ||
"scripts": { | ||
"build": "tsc" | ||
}, | ||
"dependencies": { | ||
"chalk": "^4.0.0" | ||
} | ||
} |
File renamed without changes.
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,15 @@ | ||
{ | ||
"compilerOptions": { | ||
"target": "es2019", | ||
"module": "commonjs", | ||
"outDir": "build", | ||
"strict": true, | ||
"esModuleInterop": true, | ||
"noEmitOnError": true, | ||
"skipLibCheck": true, | ||
"declaration": true | ||
}, | ||
"files": [ | ||
"src/index.ts" | ||
] | ||
} |
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
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
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
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
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
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
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
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
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
Oops, something went wrong.