Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests: era_vm + zksync era #204

Merged
merged 27 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -440,3 +440,47 @@ jobs:
system-contracts: system-contracts-${{ matrix.encoding == 'test' && 'test' || 'prod' }}.o
encoding: ${{ matrix.encoding == 'test' && '--use-test-encoding' || '' }}
run: ./target/release/compiler-tester --load-system-contracts ${{ env.system-contracts}} ${{ env.encoding }} --target EraVM ${{ matrix.mode }} --path ${{ matrix.testgroup }}


zksync_era_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout vm sources
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}/era_vm

- name: Setup compiler-tester submodule
working-directory: ${{ github.workspace }}/era_vm
run: make submodules

- name: Setup nodejs + yarn
uses: actions/setup-node@v4
with:
node-version: 18.20.2

- uses: Swatinem/rust-cache@v2
with:
workspaces: ${{ github.workspace }}

- name: Rustup toolchain install
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ env.RUST_VERSION }}

- name: Setup zksync-era
working-directory: ${{ github.workspace }}/era_vm/zksync-era
run: |
cargo install sqlx-cli --version 0.8.0
mkdir -p ./volumes/reth/data
mkdir -p ./volumes/postgres
docker compose -v up -d
sleep 15
Comment on lines +475 to +478
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't zk init handle these by itself?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it wasn't working on the ci 🤷

export ZKSYNC_HOME=$(pwd)
export PATH=$PATH:./bin
zk
zk init

- name: Run tests
working-directory: ${{ github.workspace }}/era_vm
run: make era-test
5 changes: 4 additions & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "era-compiler-tester"]
path = era-compiler-tester
url = https://github.com/lambdaclass/era-compiler-tester.git
url = https://github.com/lambdaclass/era-compiler-tester.git
[submodule "zksync-era"]
path = zksync-era
url = https://github.com/lambdaclass/zksync-era.git
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: clean lint test deps submodules
.PHONY: clean lint test deps submodules era-test

LLVM_PATH?=$(shell pwd)/era-compiler-tester/target-llvm/target-final/

Expand Down Expand Up @@ -26,3 +26,6 @@ test: deps
# CI test uses LLVM from the era-compiler-llvm repository, doesn't need to build it
ci-test:
export LLVM_SYS_170_PREFIX=$(LLVM_PATH) && $(MAKE) test

era-test: submodules
cd ./zksync-era/core/lib/multivm && cargo t era_vm
1 change: 1 addition & 0 deletions zksync-era
Submodule zksync-era added at 676895
Loading