Skip to content

Change building env and thirdparty library for user to build as library #331

Change building env and thirdparty library for user to build as library

Change building env and thirdparty library for user to build as library #331

Workflow file for this run

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/account-abstraction
- name: Setup Yarn cache - submodule "thirdparty/bundler"
uses: actions/setup-node@v3
with:
node-version: '14'
cache: 'yarn'
cache-dependency-path: tests/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: 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
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 && pdm run update-deps
- 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-test/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-test/launcher.sh --url http://localhost:3000