From a7a2960c0dd17ac08a91c702ff0b20e6c71072c8 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 10:58:18 +0100 Subject: [PATCH 1/7] chore: add cache to ci --- .github/workflows/ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f1335899..f80e5da8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,13 +12,30 @@ 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@v1 + + - name: Setup Yarn cache - submodule "thirdparty/account-abstraction" + uses: c-hive/gha-yarn-cache@v2 + with: + directory: thirdparty/account-abstraction + + - name: Setup Yarn cache - submodule "thirdparty/bundler" + uses: c-hive/gha-yarn-cache@v2 + with: + directory: 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 +43,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 From c949920258e76c162f9837808542957a70cc132e Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 11:03:18 +0100 Subject: [PATCH 2/7] chore: fix ci --- .github/workflows/ci.yml | 4 ++++ Makefile | 4 +++- README.md | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f80e5da8..29b3ff4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,10 @@ jobs: - name: Setup Rust cache uses: Swatinem/rust-cache@v1 + - name: Fetch third-party dependencies + run: | + make fetch-thirdparty + - name: Setup Yarn cache - submodule "thirdparty/account-abstraction" uses: c-hive/gha-yarn-cache@v2 with: diff --git a/Makefile b/Makefile index 833fc631..5816b449 100644 --- a/Makefile +++ b/Makefile @@ -13,8 +13,10 @@ run-bundler-rpc: run-create-wallet: cargo run --bin create-wallet -- --output-path ${HOME}/.aa-bundler -setup-thirdparty: +fetch-thirdparty: git submodule update --init + +setup-thirdparty: cd thirdparty/account-abstraction && yarn install && yarn compile && cd ../.. cd thirdparty/bundler && yarn install && yarn preprocess && cd ../.. 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 ``` From 553af7409d8af26e1b1ee0623432d1b0c47a8f73 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 11:18:02 +0100 Subject: [PATCH 3/7] chore: update ci with newer packages --- .github/workflows/ci.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 29b3ff4b..a4e843d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,20 +20,24 @@ jobs: components: rustfmt, clippy - name: Setup Rust cache - uses: Swatinem/rust-cache@v1 + uses: Swatinem/rust-cache@v2 - name: Fetch third-party dependencies run: | make fetch-thirdparty - name: Setup Yarn cache - submodule "thirdparty/account-abstraction" - uses: c-hive/gha-yarn-cache@v2 + uses: actions/setup-node@v3 with: + node-version: '14' + cache: 'yarn' directory: thirdparty/account-abstraction - name: Setup Yarn cache - submodule "thirdparty/bundler" - uses: c-hive/gha-yarn-cache@v2 + uses: actions/setup-node@v3 with: + node-version: '14' + cache: 'yarn' directory: thirdparty/bundler - name: Setup third-party dependencies From 9d420fc152b60405a0261b4815cc9e25afd425c1 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 11:21:10 +0100 Subject: [PATCH 4/7] chore: fix ci --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4e843d1..fe9f7c2b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,14 +31,14 @@ jobs: with: node-version: '14' cache: 'yarn' - directory: thirdparty/account-abstraction + cache-dependency-path: thirdparty/account-abstraction - name: Setup Yarn cache - submodule "thirdparty/bundler" uses: actions/setup-node@v3 with: node-version: '14' cache: 'yarn' - directory: thirdparty/bundler + cache-dependency-path: thirdparty/bundler - name: Setup third-party dependencies run: | From cabbf4b1ef2a48de0d4df8a491308ccea8c429c8 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 11:36:05 +0100 Subject: [PATCH 5/7] chore: trigger ci From 5526a25b30d9726ba67a2311ceedeee0892adbe5 Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 12:01:15 +0100 Subject: [PATCH 6/7] chore: fix yarn cache --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 5816b449..fc0c9590 100644 --- a/Makefile +++ b/Makefile @@ -17,8 +17,8 @@ fetch-thirdparty: git submodule update --init setup-thirdparty: - cd thirdparty/account-abstraction && yarn install && yarn compile && cd ../.. - cd thirdparty/bundler && yarn install && yarn preprocess && cd ../.. + 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 From 16ddc067cbdf0589ef42db1317dc729d0c7b18ec Mon Sep 17 00:00:00 2001 From: Vid Kersic Date: Wed, 1 Feb 2023 12:07:32 +0100 Subject: [PATCH 7/7] chore: trigger ci