From c0e028518b5f5069e3b0aea268fbac41045cae0e Mon Sep 17 00:00:00 2001 From: sveitser Date: Tue, 19 Nov 2024 13:21:03 +0100 Subject: [PATCH 1/4] ci: remove cruft - Only checkout submodules when neeede (building contracts) - Only install forge when needed (build contracts, docs) - Nextest is already installed on ubuntu-latest --- .github/workflows/benchmark-build.yaml | 20 --------------- .github/workflows/build.yml | 20 --------------- .github/workflows/build_static.yml | 2 -- .github/workflows/coverage.yml | 5 ---- .github/workflows/slowtest.yaml | 13 ---------- .github/workflows/test.yml | 32 +----------------------- contracts/.github/workflows/test.yml | 34 -------------------------- 7 files changed, 1 insertion(+), 125 deletions(-) delete mode 100644 contracts/.github/workflows/test.yml diff --git a/.github/workflows/benchmark-build.yaml b/.github/workflows/benchmark-build.yaml index 8e679e0346..5b949e22b3 100644 --- a/.github/workflows/benchmark-build.yaml +++ b/.github/workflows/benchmark-build.yaml @@ -17,13 +17,6 @@ jobs: build: runs-on: ubuntu-latest steps: - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Install just command runner run: | sudo snap install --edge --classic just @@ -31,8 +24,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Enable Rust Caching uses: Swatinem/rust-cache@v2 @@ -76,17 +67,8 @@ jobs: build-arm: runs-on: buildjet-16vcpu-ubuntu-2204-arm steps: - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Enable Rust Caching uses: Swatinem/rust-cache@v2 @@ -144,8 +126,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Download executables AMD uses: actions/download-artifact@v4 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a66a0a3480..0b699000ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,13 +28,6 @@ jobs: steps: - uses: rui314/setup-mold@v1 - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Install just command runner run: | sudo snap install --edge --classic just @@ -42,8 +35,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Enable Rust Caching uses: Swatinem/rust-cache@v2 @@ -97,17 +88,8 @@ jobs: steps: - uses: rui314/setup-mold@v1 - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Enable Rust Caching uses: Swatinem/rust-cache@v2 @@ -177,8 +159,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Download executables AMD uses: actions/download-artifact@v4 diff --git a/.github/workflows/build_static.yml b/.github/workflows/build_static.yml index f23d4977be..5e5a78cfe2 100644 --- a/.github/workflows/build_static.yml +++ b/.github/workflows/build_static.yml @@ -101,8 +101,6 @@ jobs: steps: - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Download executables AMD uses: actions/download-artifact@v4 diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 6922623355..03cc44f6a3 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -31,11 +31,6 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - uses: dtolnay/rust-toolchain@nightly - name: Enable Rust Caching diff --git a/.github/workflows/slowtest.yaml b/.github/workflows/slowtest.yaml index 38b3641096..102380f455 100644 --- a/.github/workflows/slowtest.yaml +++ b/.github/workflows/slowtest.yaml @@ -26,21 +26,8 @@ jobs: slow-tests: runs-on: ubuntu-latest steps: - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - uses: taiki-e/install-action@nextest - - name: Checkout Repository uses: actions/checkout@v4 - with: - submodules: recursive - name: Configure Environment run: PATH="$PWD/target/release:$PATH" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 88389924e9..f5a795370a 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -29,8 +29,7 @@ jobs: - uses: rui314/setup-mold@v1 - uses: actions/checkout@v4 - with: - submodules: recursive + - name: Install nextest uses: taiki-e/install-action@nextest @@ -56,8 +55,6 @@ jobs: - uses: rui314/setup-mold@v1 - uses: actions/checkout@v4 - with: - submodules: recursive - name: Enable Rust Caching uses: Swatinem/rust-cache@v2 @@ -101,18 +98,7 @@ jobs: needs: build-test-artifacts runs-on: ubuntu-latest steps: - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - uses: actions/checkout@v4 - with: - submodules: recursive - name: Install nextest uses: taiki-e/install-action@nextest @@ -146,18 +132,7 @@ jobs: - name: Configure PATH run: PATH="$PWD/target/debug:$PATH" - - name: Fix submodule permissions check - run: | - git config --global --add safe.directory '*' - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - uses: actions/checkout@v4 - with: - submodules: recursive - uses: taiki-e/install-action@nextest @@ -196,15 +171,10 @@ jobs: needs: build-test-bins runs-on: ubuntu-latest steps: - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - - name: Install Nix uses: cachix/install-nix-action@V27 - uses: actions/checkout@v4 - with: - submodules: recursive - name: Download archive uses: actions/download-artifact@v4 diff --git a/contracts/.github/workflows/test.yml b/contracts/.github/workflows/test.yml deleted file mode 100644 index 09880b1d79..0000000000 --- a/contracts/.github/workflows/test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: test - -on: workflow_dispatch - -env: - FOUNDRY_PROFILE: ci - -jobs: - check: - strategy: - fail-fast: true - - name: Foundry project - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Run Forge build - run: | - forge --version - forge build --sizes - id: build - - - name: Run Forge tests - run: | - forge test -vvv - id: test From abf237d67d346d6e75534be3b2b027e2f7d67bb0 Mon Sep 17 00:00:00 2001 From: sveitser Date: Tue, 19 Nov 2024 13:27:30 +0100 Subject: [PATCH 2/4] ci: re-add nextest --- .github/workflows/slowtest.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/slowtest.yaml b/.github/workflows/slowtest.yaml index 102380f455..b892259c3e 100644 --- a/.github/workflows/slowtest.yaml +++ b/.github/workflows/slowtest.yaml @@ -26,6 +26,7 @@ jobs: slow-tests: runs-on: ubuntu-latest steps: + - uses: taiki-e/install-action@nextest - name: Checkout Repository uses: actions/checkout@v4 From 011886dab84b593d7c3b16a89c076d117e40b584 Mon Sep 17 00:00:00 2001 From: sveitser Date: Tue, 19 Nov 2024 13:56:02 +0100 Subject: [PATCH 3/4] ci: slowtest needs anvil binary --- .github/workflows/slowtest.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/slowtest.yaml b/.github/workflows/slowtest.yaml index b892259c3e..4eeb90f14e 100644 --- a/.github/workflows/slowtest.yaml +++ b/.github/workflows/slowtest.yaml @@ -26,7 +26,12 @@ jobs: slow-tests: runs-on: ubuntu-latest steps: + # These tests need the `anvil` binary provided by foundry + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - uses: taiki-e/install-action@nextest + - name: Checkout Repository uses: actions/checkout@v4 From c3f95e4cab158854bb678c26b4b8e7cf07f6dd55 Mon Sep 17 00:00:00 2001 From: sveitser Date: Tue, 19 Nov 2024 14:14:21 +0100 Subject: [PATCH 4/4] ci: test job needs anvil --- .github/workflows/test.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f5a795370a..2dadf85540 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -98,6 +98,9 @@ jobs: needs: build-test-artifacts runs-on: ubuntu-latest steps: + - name: Install Foundry + uses: foundry-rs/foundry-toolchain@v1 + - uses: actions/checkout@v4 - name: Install nextest