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

chore: add cache to ci #45

Merged
merged 7 commits into from
Feb 1, 2023
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
30 changes: 29 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,54 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1

- name: Setup Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy

- 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: thirdparty/account-abstraction

- name: Setup Yarn cache - submodule "thirdparty/bundler"
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
cache-dependency-path: 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 add-apt-repository ppa:ethereum/ethereum-dev
sudo apt-get update
sudo apt-get install solc
sudo apt-get install ethereum

- name: Build
run: |
make build

- name: Lint
run: |
make lint

- name: Test
run: |
make test
8 changes: 5 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ run-bundler-rpc:
run-create-wallet:
cargo run --bin create-wallet -- --output-path ${HOME}/.aa-bundler

setup-thirdparty:
fetch-thirdparty:
git submodule update --init
cd thirdparty/account-abstraction && yarn install && yarn compile && cd ../..
cd thirdparty/bundler && yarn install && yarn preprocess && cd ../..

setup-thirdparty:
cd thirdparty/account-abstraction && yarn install --frozen-lockfile --immutable && yarn compile && cd ../..
cd thirdparty/bundler && yarn install --frozen-lockfile --immutable && yarn preprocess && cd ../..

test:
cargo test
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ For more information: https://hackmd.io/@Vid201/aa-bundler-rust
Set up third-party dependencies (EIP-4337 smart contracts and bundler tests):

```bash
make fetch-thirdparty
make setup-thirdparty
```

Expand Down