forked from matter-labs/zksync-era
-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (92 loc) · 2.92 KB
/
ci-evm-yul.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: CI Yul equivalent EVM
on:
pull_request:
merge_group:
push:
branches:
- staging
- trying
- main
- evm-equivalence-yul
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
tests:
runs-on: ubuntu-latest
name: Run tests
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2
submodules: "recursive"
- name: Install Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Install node
uses: actions/setup-node@v4
with:
node-version: 21.7
- name: Install yarn
run: corepack enable
# https://yarnpkg.com/corepack
- name: Install preprocessor
run: npm install -g preprocess-cli-tool
- name: Install sqlx
run: cargo install sqlx-cli@^0.5 --locked
- name: Download solc
run: |
curl -L -o bin/solc https://github.com/ethereum/solidity/releases/download/v0.8.24/solc-static-linux \
&& chmod +x bin/solc
- name: Download zksolc
run: |
curl -L -o bin/zksolc https://github.com/matter-labs/zksolc-bin/releases/download/v1.4.0/zksolc-linux-amd64-musl-v1.4.0 \
&& chmod +x bin/zksolc
- name: Setup environment
run: |
echo ZKSYNC_HOME=$(pwd) >> $GITHUB_ENV
echo $(pwd)/bin >> $GITHUB_PATH
echo IN_DOCKER=1 >> .env
echo ZKSYNC_DEBUG_LOGS=true >> .env
- name: Build system contracts
run: |
cd contracts/system-contracts \
&& yarn install \
&& yarn build
- name: Build EVM test contracts
run: |
cd etc/evm-contracts-test-data \
&& yarn install \
&& yarn build
- name: Build zkEVM test contracts
run: |
cd etc/contracts-test-data \
&& sed -i 's/zksolc-macosx-arm64/zksolc-linux-amd64-musl/' hardhat.config.ts \
&& yarn install \
&& yarn build
- name: Compile EVM interpreter
run: bash recompile_interpreter.sh
- name: Run unit tests
run: ZKSYNC_HOME=$(pwd) cargo test evm_simulator
env:
RUSTFLAGS: ""
- name: Start services
run: |
mkdir -p ./volumes/postgres ./volumes/reth/data
docker compose up -d
- name: Init
run: |
sed -i 's/zksolc-macosx-arm64/zksolc-linux-amd64-musl/' etc/contracts-test-data/hardhat.config.ts
zk
zk env dev
zk config compile dev
zk init
env:
RUSTFLAGS: ""
- name: Run integration tests
run: |
zk server --components "api,tree,eth,state_keeper,housekeeper" >/dev/null &
sleep 10
cd core/tests/ts-integration && yarn test evm-contracts-test.ts
env:
RUSTFLAGS: ""