diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1335899..fe9f7c2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,38 @@ 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 @@ -26,12 +51,15 @@ jobs: 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 diff --git a/Makefile b/Makefile index 833fc631..fc0c9590 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/README.md b/README.md index 5d1338d0..4a03fca4 100644 --- a/README.md +++ b/README.md @@ -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 ```