-
Notifications
You must be signed in to change notification settings - Fork 39
132 lines (106 loc) · 3.84 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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
on:
push:
branches:
- main
pull_request:
name: ci
jobs:
build_and_test:
name: build and test Silius
runs-on: ubuntu-latest
steps:
# github action worker got about 14GB available space for building which is not enough
# remove some unused binary in the image to get more spaces
- name: Make more space to compilation
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: dtolnay/[email protected]
with:
components: clippy
- name: Install cargo tools
run: |
curl -L https://github.com/DevinR528/cargo-sort/releases/download/v1.0.9/cargo-sort-x86_64-unknown-linux-gnu.tar.gz | tar -zxvf - -C ~/.cargo/bin/
curl -L https://github.com/est31/cargo-udeps/releases/download/v0.1.47/cargo-udeps-v0.1.47-x86_64-unknown-linux-gnu.tar.gz | tar -xzvf - -C /tmp/
mv /tmp/cargo-udeps-v0.1.47-x86_64-unknown-linux-gnu/cargo-udeps ~/.cargo/bin/
- name: Setup Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- 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: '16.17'
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: '16.17'
cache: 'yarn'
cache-dependency-path: tests/thirdparty/bundler
- name: Setup third-party dependencies
run: |
make setup-thirdparty
- name: Install geth
run: .github/scripts/install_geth.sh
- name: Install solc
run: .github/scripts/install_solc.sh
- name: Build
run: |
make build-debug-mode
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: silius
path: target/debug/silius
- name: Test
run: |
make test
- name: Examples
run: |
make run-examples
- name: Setup Rust toolchain (nightly)
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
- name: Lint
run: |
make lint
bundler_spec_tests:
name: bundler spec tests
runs-on: ubuntu-latest
needs: build_and_test
steps:
- uses: actions/checkout@v4
with:
repository: eth-infinitism/bundler-spec-tests
ref: '08cbbfcb9e37b84c0ef9e546975f88fa638cac61'
submodules: true
- uses: actions/checkout@v4
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 v0.6.0 && yarn && yarn compile && cd ../spec && yarn && yarn build && cd ..
- 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