From e26689189f92bf545ef7dd82e1d5ea0c03cb6352 Mon Sep 17 00:00:00 2001 From: WillQ Date: Sun, 5 Nov 2023 21:18:16 +0800 Subject: [PATCH] chore: optimize build size --- .github/workflows/ci.yml | 14 ++++++++++++-- Makefile | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 67816068..d9b76910 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,14 @@ jobs: name: Silius - ERC-4337 bundler in Rust 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@v2 - name: Setup Rust toolchain @@ -21,7 +29,9 @@ jobs: - name: Install cargo tools run: | - cargo install cargo-sort cargo-udeps + 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.43/cargo-udeps-v0.1.43-x86_64-unknown-linux-gnu.tar.gz | tar -xzvf - -C /tmp/ + mv /tmp/cargo-udeps-v0.1.43-x86_64-unknown-linux-gnu/cargo-udeps ~/.cargo/bin/ - name: Setup Rust cache uses: Swatinem/rust-cache@v2 @@ -66,7 +76,7 @@ jobs: uses: actions/upload-artifact@v3 with: name: silius - path: target/release/silius + path: target/debug/silius - name: Lint run: | diff --git a/Makefile b/Makefile index e4581f1a..62f13ccb 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ build: - cargo build --release + cargo build run-silius: cargo run --release -- bundler --eth-client-address http://127.0.0.1:8545 --mnemonic-file ${HOME}/.silius/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 --entry-points 0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789 --http --ws