From f749a098daaf4ee63656fc190b261fcdf733e545 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 17:22:53 -0300 Subject: [PATCH 01/27] submodules: add zksync-era --- .gitmodules | 5 ++++- zksync-era | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) create mode 160000 zksync-era diff --git a/.gitmodules b/.gitmodules index a2fd0cad..7c267ab0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,6 @@ [submodule "era-compiler-tester"] path = era-compiler-tester - url = https://github.com/lambdaclass/era-compiler-tester.git \ No newline at end of file + url = https://github.com/lambdaclass/era-compiler-tester.git +[submodule "zksync-era"] + path = zksync-era + url = https://github.com/lambdaclass/zksync-era.git diff --git a/zksync-era b/zksync-era new file mode 160000 index 00000000..67689581 --- /dev/null +++ b/zksync-era @@ -0,0 +1 @@ +Subproject commit 67689581833f5994477b06c34e9d4ca41288edff From 386f8306b9e8ba1f99fcbc3ac5833fb8c1d47adc Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 17:43:25 -0300 Subject: [PATCH 02/27] ci: add era tests step --- .github/workflows/ci.yml | 58 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4bd8a0a..7356e633 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -440,3 +440,61 @@ 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 }} + + name: Run zksync-era tests + runs-on: ubuntu-latest + steps: + - name: System Dependencies + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: llvm clang clang-tools build-essential lld ninja-build librocksdb-dev libsnappy-dev nodejs yarn + version: 1.0 + + - 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-env + run: | + echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV + echo CI=1 >> $GITHUB_ENV + echo $(pwd)/bin >> $GITHUB_PATH + echo CI=1 >> .env + echo IN_DOCKER=1 >> .env + + - name: pre-download compiilers + run: | + # Download needed versions of vyper compiler + # Not sanitized due to unconventional path and tags + mkdir -p ./hardhat-nodejs/compilers-v2/vyper/linux + wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10+commit.91361694.linux + wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3+commit.48e326f0.linux + chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 + chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 + + COMPILERS_JSON='${{ inputs.compilers }}' + echo "$COMPILERS_JSON" | jq -r '.[] | to_entries[] | .key as $compiler | .value[] | "\(.),\($compiler)"' | while IFS=, read -r version compiler; do + mkdir -p "./hardhat-nodejs/compilers-v2/$compiler" + wget -nv -O "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" "https://github.com/matter-labs/${compiler}-bin/releases/download/v${version}/${compiler}-linux-amd64-musl-v${version}" + chmod +x "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" + done + + - name: start-services + run: | + mkdir -p ./volumes/postgres + run_retried docker compose pull zk postgres + docker compose up -d zk postgres + + - name: init + run: | + ci_run zk + ci_run zk compiler all + ci_run zk contract build + + - name: Run era tests + run: make era-test From 2b38ad3c800ce87cf3bb8d1fd571244501be0be8 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 17:44:10 -0300 Subject: [PATCH 03/27] makefile: add era-test --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 106b1a53..0ee50874 100644 --- a/Makefile +++ b/Makefile @@ -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/ @@ -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 From 975fac9e542ae5291b6e4bc896f598513c910f7f Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 17:46:28 -0300 Subject: [PATCH 04/27] makefile: update era-test target --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 0ee50874..6bdea93b 100644 --- a/Makefile +++ b/Makefile @@ -28,4 +28,4 @@ ci-test: export LLVM_SYS_170_PREFIX=$(LLVM_PATH) && $(MAKE) test era-test: submodules - cd ./zksync-era/core/lib/multivm && cargo t + cd ./zksync-era/core/lib/multivm && cargo t era_vm From 3cc97e30fe36bb584120acfb91bc54f96bfe656c Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:02:59 -0300 Subject: [PATCH 05/27] ci: fix ci yml --- .github/workflows/ci.yml | 57 +++++++++++----------------------------- 1 file changed, 15 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7356e633..4841b180 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,8 @@ env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: + era_tests: + runs-on: ubuntu-latest compile: name: Compile runs-on: ubuntu-latest @@ -441,60 +443,31 @@ jobs: 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 }} - name: Run zksync-era tests + + zksync_era_tests: runs-on: ubuntu-latest steps: - - name: System Dependencies - uses: awalsh128/cache-apt-pkgs-action@latest - with: - packages: llvm clang clang-tools build-essential lld ninja-build librocksdb-dev libsnappy-dev nodejs yarn - version: 1.0 - - - name: Checkout vm sources - uses: actions/checkout@v4 + - 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-env + submodules: "recursive" + - name: Setup environment run: | echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV - echo CI=1 >> $GITHUB_ENV echo $(pwd)/bin >> $GITHUB_PATH - echo CI=1 >> .env echo IN_DOCKER=1 >> .env - - name: pre-download compiilers - run: | - # Download needed versions of vyper compiler - # Not sanitized due to unconventional path and tags - mkdir -p ./hardhat-nodejs/compilers-v2/vyper/linux - wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 https://github.com/vyperlang/vyper/releases/download/v0.3.10/vyper.0.3.10+commit.91361694.linux - wget -nv -O ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 https://github.com/vyperlang/vyper/releases/download/v0.3.3/vyper.0.3.3+commit.48e326f0.linux - chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.10 - chmod +x ./hardhat-nodejs/compilers-v2/vyper/linux/0.3.3 - - COMPILERS_JSON='${{ inputs.compilers }}' - echo "$COMPILERS_JSON" | jq -r '.[] | to_entries[] | .key as $compiler | .value[] | "\(.),\($compiler)"' | while IFS=, read -r version compiler; do - mkdir -p "./hardhat-nodejs/compilers-v2/$compiler" - wget -nv -O "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" "https://github.com/matter-labs/${compiler}-bin/releases/download/v${version}/${compiler}-linux-amd64-musl-v${version}" - chmod +x "./hardhat-nodejs/compilers-v2/$compiler/${compiler}-v${version}" - done - - - name: start-services + - name: Start services run: | + run_retried docker-compose -f ${RUNNER_COMPOSE_FILE} pull mkdir -p ./volumes/postgres - run_retried docker compose pull zk postgres - docker compose up -d zk postgres + docker-compose -f ${RUNNER_COMPOSE_FILE} up --build -d zk postgres + ci_run sccache --start-server - - name: init + - name: Init run: | ci_run zk - ci_run zk compiler all - ci_run zk contract build + ci_run run_retried rustup show + ci_run zk db setup - - name: Run era tests + - name: Run tests run: make era-test From 7855d300011834e640ed20891636e5339ccdae4d Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:05:21 -0300 Subject: [PATCH 06/27] ci: remove unused job --- .github/workflows/ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4841b180..f830e45c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,8 +16,6 @@ env: BRANCH_NAME: ${{ github.head_ref || github.ref_name }} jobs: - era_tests: - runs-on: ubuntu-latest compile: name: Compile runs-on: ubuntu-latest From 563d78302f2c10adac60dd9d9fa3fd5030eb183b Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:07:08 -0300 Subject: [PATCH 07/27] makefile: fix era-test --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6bdea93b..28a6c0c4 100644 --- a/Makefile +++ b/Makefile @@ -28,4 +28,4 @@ ci-test: export LLVM_SYS_170_PREFIX=$(LLVM_PATH) && $(MAKE) test era-test: submodules - cd ./zksync-era/core/lib/multivm && cargo t era_vm + cd ./zksync-era/core/lib/multivm && cargo t era_vm From 12dc0565ca712ce06f7a46c236c73e07512716fa Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:11:01 -0300 Subject: [PATCH 08/27] ci: try again --- .github/workflows/ci.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f830e45c..325ad188 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -443,29 +443,29 @@ jobs: zksync_era_tests: + needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: submodules: "recursive" + + - name: Rustup toolchain install + uses: dtolnay/rust-toolchain@stable + with: + toolchain: ${{ env.RUST_VERSION }} + - name: Setup environment run: | + cd ./zksync-era echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV echo $(pwd)/bin >> $GITHUB_PATH echo IN_DOCKER=1 >> .env - - name: Start services - run: | - run_retried docker-compose -f ${RUNNER_COMPOSE_FILE} pull - mkdir -p ./volumes/postgres - docker-compose -f ${RUNNER_COMPOSE_FILE} up --build -d zk postgres - ci_run sccache --start-server - - name: Init run: | - ci_run zk - ci_run run_retried rustup show - ci_run zk db setup + zk + zk init - name: Run tests run: make era-test From 0f531face5b0d4e6c0849d1a5be32e825dc02ef1 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:14:25 -0300 Subject: [PATCH 09/27] ci: remove compile needed step --- .github/workflows/ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 325ad188..63a628d6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -443,7 +443,6 @@ jobs: zksync_era_tests: - needs: compile runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 From bd13f274f1adb7ce3d62a05bff225b2fcdc755ef Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:26:16 -0300 Subject: [PATCH 10/27] ci: add yarn --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 63a628d6..86094b2d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -449,6 +449,16 @@ jobs: with: submodules: "recursive" + - name: Setup nodejs + yarn + uses: actions/setup-node@v4 + with: + node-version: 18.20.2 + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: | + ./era_vm/zksync-era + - name: Rustup toolchain install uses: dtolnay/rust-toolchain@stable with: From 66f22769e145aed8bb555e0b933b334b6770480a Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:29:00 -0300 Subject: [PATCH 11/27] ci: properly run ci --- .github/workflows/ci.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 86094b2d..59a0ba73 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -464,15 +464,13 @@ jobs: with: toolchain: ${{ env.RUST_VERSION }} - - name: Setup environment + - name: Setup environment + init + working-directory: ${{ github.workspace }}/era_vm run: | cd ./zksync-era echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV echo $(pwd)/bin >> $GITHUB_PATH echo IN_DOCKER=1 >> .env - - - name: Init - run: | zk zk init From 60bdb3fd1ea34b4af9666270fb7dbe970d8832ff Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:32:05 -0300 Subject: [PATCH 12/27] ci: fix --- .github/workflows/ci.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 59a0ba73..f75f986a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -446,8 +446,9 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - submodules: "recursive" + + - name: submodules + run: make submodules - name: Setup nodejs + yarn uses: actions/setup-node@v4 @@ -456,8 +457,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - workspaces: | - ./era_vm/zksync-era + workspaces: ${{ github.workspace }}/era_vm/zksync_era - name: Rustup toolchain install uses: dtolnay/rust-toolchain@stable @@ -465,9 +465,8 @@ jobs: toolchain: ${{ env.RUST_VERSION }} - name: Setup environment + init - working-directory: ${{ github.workspace }}/era_vm + working-directory: ${{ github.workspace }}/era_vm/zksync_era run: | - cd ./zksync-era echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV echo $(pwd)/bin >> $GITHUB_PATH echo IN_DOCKER=1 >> .env @@ -475,4 +474,5 @@ jobs: zk init - name: Run tests + working-directory: ${{ github.workspace }}/zksync-era run: make era-test From 4d10e5c5f51f5c77b73576b2edb9e46ee9799ea3 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:33:50 -0300 Subject: [PATCH 13/27] ci: checkout --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f75f986a..7cd64f1c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -445,7 +445,8 @@ jobs: zksync_era_tests: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - name: Checkout sources + uses: actions/checkout@v4 - name: submodules run: make submodules From de7afb6073e6bc6e35527aade77955dea77f8afe Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:39:50 -0300 Subject: [PATCH 14/27] ci: properly do init --- .github/workflows/ci.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7cd64f1c..b0e1da49 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -468,11 +468,9 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync_era run: | - echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV - echo $(pwd)/bin >> $GITHUB_PATH - echo IN_DOCKER=1 >> .env - zk - zk init + set ZKSYNC_HOME=$(pwd) + ./bin/zk + ./bin/zk init - name: Run tests working-directory: ${{ github.workspace }}/zksync-era From dbaa2023146e9681a25508657eb58a0b2e952b54 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:46:21 -0300 Subject: [PATCH 15/27] ci: try again --- .github/workflows/ci.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b0e1da49..750f7901 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -448,7 +448,8 @@ jobs: - name: Checkout sources uses: actions/checkout@v4 - - name: submodules + - name: Setup compiler-tester submodule + working-directory: ${{ github.workspace }}/era_vm run: make submodules - name: Setup nodejs + yarn @@ -458,7 +459,7 @@ jobs: - uses: Swatinem/rust-cache@v2 with: - workspaces: ${{ github.workspace }}/era_vm/zksync_era + workspaces: ${{ github.workspace }} - name: Rustup toolchain install uses: dtolnay/rust-toolchain@stable @@ -466,12 +467,12 @@ jobs: toolchain: ${{ env.RUST_VERSION }} - name: Setup environment + init - working-directory: ${{ github.workspace }}/era_vm/zksync_era + working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | set ZKSYNC_HOME=$(pwd) ./bin/zk ./bin/zk init - name: Run tests - working-directory: ${{ github.workspace }}/zksync-era + working-directory: ${{ github.workspace }}/era_vm run: make era-test From 28484a42f7fa328d4eb2694bf8bfb180ef595cd1 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:47:51 -0300 Subject: [PATCH 16/27] ci: try again --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 750f7901..4837b557 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -445,8 +445,10 @@ jobs: zksync_era_tests: runs-on: ubuntu-latest steps: - - name: Checkout sources + - 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 From e947838bccf909611d40835bc1fa5ae9dc851de9 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:50:00 -0300 Subject: [PATCH 17/27] ci: properly set zksync_home --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4837b557..55fbefd5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,7 +471,7 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | - set ZKSYNC_HOME=$(pwd) + export ZKSYNC_HOME=$(pwd) ./bin/zk ./bin/zk init From 94d2848a96cf47014f99cad0539424767c6ebfa2 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 18:52:07 -0300 Subject: [PATCH 18/27] ci: add zk to path --- .github/workflows/ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55fbefd5..f473a667 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -472,8 +472,9 @@ jobs: working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | export ZKSYNC_HOME=$(pwd) - ./bin/zk - ./bin/zk init + export PATH=$PATH:./bin + zk + zk init - name: Run tests working-directory: ${{ github.workspace }}/era_vm From 2799b2b408b7bda36a4ee455f6d940c6b451fd5b Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:04:05 -0300 Subject: [PATCH 19/27] ci: start containers --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f473a667..6646f86b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,6 +471,8 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | + docker compose up -d + sleep 15 export ZKSYNC_HOME=$(pwd) export PATH=$PATH:./bin zk From 78ce59856d484c545f2d11b88b86dc3a2a42f778 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:10:22 -0300 Subject: [PATCH 20/27] ci: try -v switch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6646f86b..5bbb0d23 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,7 +471,7 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | - docker compose up -d + docker compose up -d -v sleep 15 export ZKSYNC_HOME=$(pwd) export PATH=$PATH:./bin From f1424fa586b10ba2736ff7f0613b351f717e1333 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:13:24 -0300 Subject: [PATCH 21/27] ci: correct docker switch --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bbb0d23..4ddfb3a3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,7 +471,7 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | - docker compose up -d -v + docker compose -v up -d sleep 15 export ZKSYNC_HOME=$(pwd) export PATH=$PATH:./bin From 75ce0e20a43d09698f5c0b5c529e2082cb8df965 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:19:33 -0300 Subject: [PATCH 22/27] ci: create data folder --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4ddfb3a3..1cdd6d6a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,6 +471,7 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | + mkdir -p ./volumes/era_vm/zksync-era/reth/data docker compose -v up -d sleep 15 export ZKSYNC_HOME=$(pwd) From cfb24e0e652db3163f9ca4e8eacbe306a8ccabb7 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:24:50 -0300 Subject: [PATCH 23/27] ci: postgres folder --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1cdd6d6a..6a1eb98f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -472,6 +472,7 @@ jobs: working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | mkdir -p ./volumes/era_vm/zksync-era/reth/data + mkdir -p ./volumes/era_vm/zksync-era/volumes/postgres docker compose -v up -d sleep 15 export ZKSYNC_HOME=$(pwd) From 4d8ec65a545513ef411ec41681cb39bebcf4aea3 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:30:11 -0300 Subject: [PATCH 24/27] cI: fix volumes paths --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6a1eb98f..4bbcb504 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -471,8 +471,8 @@ jobs: - name: Setup environment + init working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | - mkdir -p ./volumes/era_vm/zksync-era/reth/data - mkdir -p ./volumes/era_vm/zksync-era/volumes/postgres + mkdir -p ./volumes/reth/data + mkdir -p ./volumes/postgres docker compose -v up -d sleep 15 export ZKSYNC_HOME=$(pwd) From 33752e7610c2a081603fbf7e174fe09680529d1f Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:37:40 -0300 Subject: [PATCH 25/27] ci: use era's flake for deps --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4bbcb504..7278f37f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -469,6 +469,7 @@ jobs: toolchain: ${{ env.RUST_VERSION }} - name: Setup environment + init + uses: nicknovitski/nix-develop@v1 working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | mkdir -p ./volumes/reth/data From 7a6864f89d9d7b64302fc851561ab60bf114937e Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:43:28 -0300 Subject: [PATCH 26/27] ci: add nix --- .github/workflows/ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7278f37f..189f2a46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -468,10 +468,13 @@ jobs: with: toolchain: ${{ env.RUST_VERSION }} - - name: Setup environment + init - uses: nicknovitski/nix-develop@v1 + - name: Fetch nix + uses: cachix/install-nix-action@v17 + + - name: Setup zksync-era working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | + nix develop mkdir -p ./volumes/reth/data mkdir -p ./volumes/postgres docker compose -v up -d From 86a0481e876cdcdec02dbc0dea3ecad64f028459 Mon Sep 17 00:00:00 2001 From: Fran Date: Fri, 16 Aug 2024 19:53:10 -0300 Subject: [PATCH 27/27] ci: replace nix with simply doing cargo install --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 189f2a46..263c3e5a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -468,13 +468,10 @@ jobs: with: toolchain: ${{ env.RUST_VERSION }} - - name: Fetch nix - uses: cachix/install-nix-action@v17 - - name: Setup zksync-era working-directory: ${{ github.workspace }}/era_vm/zksync-era run: | - nix develop + cargo install sqlx-cli --version 0.8.0 mkdir -p ./volumes/reth/data mkdir -p ./volumes/postgres docker compose -v up -d