-
Notifications
You must be signed in to change notification settings - Fork 39
114 lines (93 loc) · 3.2 KB
/
ci.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
112
113
114
on:
push:
branches:
- main
pull_request:
name: ci
jobs:
build_and_test:
name: Silius - ERC-4337 bundler in Rust
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install cargo tools
run: |
cargo install cargo-sort cargo-udeps
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
- name: Fetch third-party dependencies
run: |
make fetch-thirdparty
- name: Setup Yarn cache - submodule "thirdparty/account-abstraction"
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
cache-dependency-path: crates/contracts/thirdparty/account-abstraction
- name: Setup Yarn cache - submodule "thirdparty/bundler"
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
cache-dependency-path: tests/thirdparty/bundler
- name: Setup third-party dependencies
run: |
make setup-thirdparty
- name: Install Geth and solc
run: |
sudo add-apt-repository ppa:ethereum/ethereum
sudo apt-get update
sudo apt-get install solc
wget -c https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.12.0-e501b3b0.tar.gz
tar -xf geth-linux-amd64-1.12.0-e501b3b0.tar.gz
mv geth-linux-amd64-1.12.0-e501b3b0/geth /usr/local/bin/
chmod a+x /usr/local/bin/geth
- name: Build
run: |
make build
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: silius
path: target/release/silius
- name: Lint
run: |
make lint
- name: Test
run: |
make test
bundler_spec_tests:
name: Run bundler spec tests
runs-on: ubuntu-latest
needs: build_and_test
steps:
- uses: actions/checkout@v3
with:
repository: eth-infinitism/bundler-spec-tests
ref: 'bbd61f21e95ed1290678fcbfd9551b1502c81fe9'
submodules: true
- uses: actions/checkout@v3
with:
path:
silius
- run: curl -sSL https://raw.githubusercontent.com/pdm-project/pdm/main/install-pdm.py | python3 -
- run: pip install jq yq
- run: pdm install && git submodule update --init --recursive && cd @account-abstraction && git fetch --all --tags && git checkout tags/v0.6.0 -b v0.6.0 && yarn && yarn compile && cd ../spec && yarn && yarn build
- uses: actions/download-artifact@v3
with:
name: silius
path: silius-artifact
- run: mv silius-artifact/silius /usr/local/bin/
- run: chmod a+x /usr/local/bin/silius
- run: chmod a+x silius/bundler-spec-tests/launcher.sh
- uses: actions/setup-node@v3
with:
node-version: '16.17'
- run: npm install -g yarn
- name: Run tests
run: pdm run test --launcher-script silius/bundler-spec-tests/launcher.sh --url http://127.0.0.1:3000